jQuery(document).ready(function(){var b={numImgs:photogs.length-1,data:photogs,currentImgIndex:1,cacheBuster:"?cb="+Math.floor(Math.random()*100001),theImage:jQuery("#user-spotlight img"),theTitle:jQuery("#user-spotlight dt a"),theBlurb:jQuery("#user-spotlight dd"),navDots:false,holdTime:7E3,transitionTime:800,delayTime:1500,initiateTime:0,doIncrement:true,dontIncrement:false,interval:false,timeout1:false,timeout2:false,timeout3:false,initiate:function(){this.initiateTime=this.currentTime();this.preloadImages(2);
this.setupNavigation();this.data[1].imgLoaded=true},preloadImages:function(a){if(a>this.numImgs)a=1;var c=new Image;jQuery(c).load(function(){b.data[a].imgLoaded=true;a!=1&&b.preloadImages(a+1);a==2&&b.startShow()}).attr("src",this.getImgSrc(a))},setupNavigation:function(){var a="",c;for(i=1;i<=this.numImgs;i++){c=i==1?' class="active"':"";a=a+'<span id="dot'+i+'"'+c+">\u2022</span>"}jQuery("#user-spotlight dl").append('<span id="dots"></span>');jQuery("#dots").html(a);this.navDots=jQuery("#dots span");
this.navDots.click(function(){b.stopShow();if(!jQuery(this).hasClass("active")){var d=jQuery(this).attr("id").replace("dot","");b.updateNavLocation(d);b.goToImage(d)}});jQuery("#user-spotlight img").click(function(){window.location.href=jQuery("#user-spotlight dt a").attr("href")})},startShow:function(){var a=this.currentTime()-this.initiateTime;a=a>this.holdTime?0:this.holdTime-a;var c=a+this.holdTime;this.timeout1=setTimeout(function(){b.advanceImage()},a);this.timeout2=setTimeout(function(){b.setupInterval()},
c)},stopShow:function(){clearInterval(this.interval);clearTimeout(this.timeout1);clearTimeout(this.timeout2)},delayShow:function(){this.stopShow();this.timeout1=setTimeout(function(){b.advanceImage()},this.delayTime);this.timeout2=setTimeout(function(){b.setupInterval()},this.delayTime+this.holdTime)},setupInterval:function(){clearInterval(this.interval);this.interval=setInterval(function(){b.advanceImage()},this.holdTime+2*this.transitionTime)},goToImage:function(a){if(this.imgIsLoaded(a))this.switchImages(a,
this.dontIncrement);else{preloadImages(a);this.timeout3=setTimeout(function(){this.goToImage(a)},this.delayTime)}},advanceImage:function(){this.imgIsLoaded(this.nextImgIndex())?this.switchImages(this.nextImgIndex(),this.doIncrement):this.delayShow()},switchImages:function(a,c){this.theImage.fadeOut(this.transitionTime,function(){var d="view "+b.data[a].title+"'s ProPhoto blog";b.theImage.attr("src",b.getImgSrc(a)).attr("title",d).fadeIn(b.transitionTime);b.updateNavLocation(a);b.theTitle.text(b.data[a].title).attr("href",
b.data[a].url).attr("title",d);b.theBlurb.text(b.data[a].blurb);c&&b.incrementCurrentImgIndex()})},updateNavLocation:function(a){this.navDots.removeClass("active");jQuery("#dot"+a).addClass("active")},currentTime:function(){return(new Date).getTime()},nextImgIndex:function(){return this.currentImgIndex<this.numImgs?this.currentImgIndex+1:1},incrementCurrentImgIndex:function(){this.currentImgIndex=this.nextImgIndex()},getImgSrc:function(a){return mtheme+"/static/img/home_feature_"+this.data[a].ID+
".jpg"+this.cacheBuster},imgIsLoaded:function(a){return this.data[a].imgLoaded}};b.initiate();window.attachEvent&&jQuery("#dots span, #user-spotlight dl, #user-spotlight h3").css("opacity","0.7");jQuery("#video-tour").click(function(){lightbox('<div class="dualVideo self-clear" id="overview_p3_holder" rel="overview_p3" bgcolor="#000000" autostart="true"><h3>ProPhoto Video Tour</h3><div class="embed-wrap"></div><a id="lb-requirements" href="requirements/" title="see a short video explaining what you need to use ProPhoto">Requirements</a><a id="lb-buy-now" href="buy/" title="see packages & pricing, and purchase ProPhoto">Buy Now</a></div>',
660,630,false,0.84,function(){embedDualVideos();b.stopShow()});return false});jQuery("#lb-requirements").live("click",function(){jQuery(".embed-wrap").empty().parent().attr("id","requirements_holder").attr("rel","requirements").children("h3").text("ProPhoto Requirements");embedDualVideos();return false})});

