
$(document).ready(function(){var imageSum=$(".image_reel div.reel_divs_scorrevole").size();var imageWidth=$(".window").width();var imageReelWidth=imageWidth*imageSum;$(".image_reel").css({'width':imageReelWidth});$(".paging div.thumbnail:first").addClass("active");rotate=function(){var triggerID=$active.children("a").attr("rel")-1;var image_reelPosition=triggerID*imageWidth;$(".paging div.thumbnail").removeClass("active");$active.addClass('active');$("#flash").fadeIn(200,function(){$("#flash").fadeOut(200);});$(".image_reel").animate({left:-image_reelPosition},500);};rotateSwitch=function(){play=setInterval(function(){$active=$(".paging div.active").next();if($active.length!=0){rotate();}},7000);};rotateSwitch();$(".main_view").hover(function(){$(".paging_menu").animate({"height":"25px","opacity":"1"},200);$(".riquadro_desc").show(200);clearInterval(play);},function(){$(".paging_menu").fadeOut(300).css({'height':'0px'});$(".riquadro_desc").fadeOut(300);rotateSwitch();});$(".arrows").hover(function(){var src=$(this).attr("src").match(/[^\.]+/)+"_on.png";$(this).attr("src",src);},function(){var src=$(this).attr("src").replace("_on","");$(this).attr("src",src);});$(".paging div.thumbnail").click(function(){$active=$(this);rotate();return false;});$('#myController').jFlow({slides:'#mySlides',width:'990px',height:'15px',auto:true,direction:'right',ciclic:true,duration:300});});
