jQuery(document).ready(function() { jQuery('a').click(function(e) { if(jQuery(this).attr('href') == '#'){ e.preventDefault(); } }); //Hotspots jQuery('.hotspots li.item1').hover(function() { jQuery(this).parent().parent().parent().children('.hotspots-content').children('.item1').addClass('active'); }, function() { jQuery(this).parent().parent().parent().children('.hotspots-content').children('.item1').removeClass('active'); }); //Animate $(window).load(function() { jQuery('header .parallax-layer').parallax({ mouseport: jQuery('.parallax-area'), xparallax: false }); }); /*================================= = Analytics = =================================*/ $('.parallax-layer').hover(function(event) { _gaq.push(['_trackEvent', 'Animação', 'Mão recarregando impressora']); }); $('a.appstore').click(function(event) { _gaq.push(['_trackEvent', 'Link', 'Apple App Store']); }); $('a.google-play').click(function(event) { _gaq.push(['_trackEvent', 'Link', 'Google Play Store']); }); /*Hotspots*/ $('.hotspots a').hover(function() { var theTitle = $(this).parent().parent().parent().parent().find('.hotspots-content img').attr('title'); _gaq.push(['_trackEvent', 'Hotspots', theTitle]); }); }); $(window).load(function() { $('.preload').attr('src', function(i,a){ $(this).attr('src','') .removeClass('preload') .attr('src',a); }); //Counter contador4000(); setTimeout(contador6500, 3500); }); // Função Timer function contador4000(){ //Counter $('.timer4000').countTo({ from: 0, to: 4000, speed: 200, refreshInterval: 1, onComplete: function (value) { setTimeout(contador4000, 3500) } }); } function contador6500(){ //Counter $('.timer6500').countTo({ from: 0, to: 6500, speed: 300, refreshInterval: 1, onComplete: function (value) { setTimeout(contador6500, 3650) } }); }