var kompass = new KompassWeb(); function kompass_cd(i) { $('#banner_over #percent span').text(i); if (i < 40) { $('#banner_over #percent span').oneTime(20, function () { kompass_cd(++i) }) } } function kompass_cd2(i) { $('#banner_over #countries').text(i); if (i < 16) { $('#banner_over #countries').oneTime(50, function () { kompass_cd2(++i) }) } } function roll1() { $('#banner_over').animate({ left: 2000 }, 1000); $('#banner_over2').animate({ left: 0 }, 1000); $('#banner_over_wrapper').oneTime(5000, function () { }) } function roll2() { $('#banner_over').animate({ left: 0 }, 1000); $('#banner_over2').animate({ left: -2000 }, 1000); $('#banner_over_wrapper').oneTime(5000, function () { roll1() }) } $(document).ready(function () { $('#banner').everyTime(8000, function () { $(this).children('span.visible').each(function () { $(this).removeClass('visible').fadeOut(1000, function () { var a = Math.floor(Math.random() * $(this).siblings().length); $(this).siblings().eq(a).addClass('visible').fadeIn(1000) }) }) }); $('#banner_top a.button img').everyTime(4000, function () { $(this).fadeOut(500, function () { var a = $(this).attr('src'); if (/_1/.test(a)) { a = a.replace(/_1/, '_2') } else { a = a.replace(/_2/, '_1') } $(this).attr('src', a); $(this).fadeIn(500) }) }); $('#banner_over #countries').text(0); $('#banner_over #percent span').text(0); $('#banner_over2').css('left', '-2000px'); $('#banner_over_wrapper').css('top', '-2000px').animate({ top: 58 }, 800, function () { kompass_cd(0); kompass_cd2(0); $('#banner_over_wrapper').oneTime(6000, function () { roll1() }) }); $('.banner_over a.close').add('.banner_over a.close2').click(function () { $('#banner_over_wrapper').fadeOut(500); return false }); $('a#print').click(function () { window.print(); return false }); $('a[rel=external]').click(function () { window.open($(this).attr('href')); return false }); if ($('#srcKeyword').length) { kompass.searchBoxDefaultText = $('#srcKeyword').val(); $('#srcKeyword').focus(function () { if ($(this).val() == kompass.searchBoxDefaultText) { $('#srcKeyword').val('') } }); $('#srcKeyword').keypress(function (e) { if (e.which == 13) { kompass.searchFormSubmit(); return false } else { return true } }); $('#srcSubmit').click(function () { kompass.searchFormSubmit(); return false }) } if ($(".product_buttons a img").length) { $(".product_buttons a img:eq(0)").hover(function () { $(this).attr("src", "Images/button.products.gallery.hover.png") }, function () { $(this).attr("src", "Images/button.products.gallery.png") }); $(".product_buttons a img:eq(1)").hover(function () { $(this).attr("src", "Images/button.products.demo.hover.png") }, function () { $(this).attr("src", "Images/button.products.demo.png") }); $(".product_buttons a img:eq(2)").hover(function () { $(this).attr("src", "Images/button.products.buy.hover.png") }, function () { $(this).attr("src", "Images/button.products.buy.png") }) } if ($(".faq_answer").length) { $(".faq_answer").fadeOut(10); $(".faq_question").click(function () { if ($(this).next(".faq_answer").get(0).style.display == 'none') { $(this).next(".faq_answer").fadeIn(500) } else { $(this).next(".faq_answer").fadeOut(500) } return false }) } $('div.dynamic_articles div.news_article div.imgwrap:even').css('float', 'left').css('margin-right', '10px'); $('div.dynamic_articles div.news_article div.imgwrap:odd').css('float', 'right').css('margin-left', '10px') });
