var SquawkHomeRotator={timer:"",images:[],delay:2500,dataType:"json",callback:"",offset:0,seed:7,path:"",refresh:function(){blocks=$("#home_image_rotator div.block img");quantity=Math.round(Math.random()*this.seed)+1;change=[];for(i=0;i<quantity;i++){num=Math.round(Math.random()*blocks.length);change[num]=num}var a=$("#home_image_rotator div.block img");for(i in change){$("#home_image_rotator div.block:nth-child("+i+") img").fadeOut(1200,function(){SquawkHomeRotator.offset++;if(SquawkHomeRotator.offset>=
SquawkHomeRotator.images.length)SquawkHomeRotator.offset=0;duplicate=false;a.each(function(){if($(this).attr("src")==SquawkHomeRotator.path+SquawkHomeRotator.images[SquawkHomeRotator.offset])duplicate=true});duplicate==false&&$(this).attr("src",SquawkHomeRotator.path+SquawkHomeRotator.images[SquawkHomeRotator.offset])});for(i in change)$("#home_image_rotator div.block:nth-child("+i+") img").fadeIn(1200)}this.timer=setTimeout("SquawkHomeRotator.refresh()",SquawkHomeRotator.delay)},init:function(a){this.path=
a;for(i=1;i<=25&&i<this.images.length;i++){this.offset++;i!=12&&i!=14&&$("#home_image_rotator div.block:nth-child("+i+")").append('<img src="'+this.path+this.images[i]+"\" alt=''/>")}$("#home_image_rotator div.block img").fadeIn("slow");this.timer=setTimeout("SquawkHomeRotator.refresh()",SquawkHomeRotator.delay)}};

