
$(function(){var numberAdditional=2;var classToShowButNotInteractWith='notactive';var scrollThing=$("div#sliderwrap").scrollable({items:"#slideritems",item:"div.slideitem:not(."+classToShowButNotInteractWith+")",size:1,next:".right",prev:".left",clickable:false,speed:300}).circular({numAdditional:numberAdditional,clonedNotActive:classToShowButNotInteractWith}).autoscroll({api:true});scrollThing.seekTo(1+numberAdditional);$("#featurescroll li a").eq(0).addClass("slideshowhere");var numSlides=$(".slideitem:not(.cloned)").length;$("#featurescroll li a").each(function(i,e){var triggerIndex=i+numSlides+numberAdditional;$(this).attr("rel",triggerIndex);$(this).click(function(){$(".slideshowhere").removeClass("slideshowhere");var currentScroll=scrollThing.getIndex();var moveAmount=$(this).attr("rel")-currentScroll;moveAmount=moveAmount-numSlides;scrollThing.move(moveAmount);$(this).addClass("slideshowhere"); scrollThing.stop();return false;});});scrollThing.onSeek(function(){var currentScroll=scrollThing.getIndex()-numberAdditional;if(currentScroll>=numSlides){currentScroll=currentScroll-numSlides;}

$(".slideshowhere").removeClass("slideshowhere");$("#featurescroll li a").eq(currentScroll).addClass("slideshowhere");});
$(".browse").click(function() { scrollThing.stop(); return false; });
$(".screen").css({opacity: .4});
});