var imgPath="/res/i/";$(window).bind('load',function(){var preload=['img-08.jpg','img-07.jpg','img-06.jpg','img-05.jpg','img-04.jpg','img-03.jpg','img-02.jpg','img-01.jpg'];var img=document.createElement('img');$(img).bind('load',function(){if(preload[0]){this.src=imgPath+preload.shift();}}).trigger('load');});$(function(){if(screen.height<=1024&&screen.height>$(window).height()+6){window.setTimeout(function(){$('#disclaimer').fadeIn('fast');},2500);window.setTimeout(function(){$('#disclaimer').fadeOut('fast');},21000);}var primaryNav=$('#primaryNav li');var galleryNav=$('#galleryNav li');primaryNav.hover(function(){$(this).addClass('over');},function(){$(this).removeClass('over');});galleryNav.hover(function(){$(this).addClass('over');},function(){$(this).removeClass('over');});var activeSlide=0;var slideWidth=795;var slider=$('#slideShell');primaryNav.each(function(index){$(this).click(function(){showSlide(index);$(this).addClass('active');});});function showSlide(index){slider.animate({'left': '-'+slideWidth*index+'px'},370,$.easing.easeInOutQuint());activeSlide=index;primaryNav.removeClass('active');}var activeImage=0;var heroImage=$('#heroImage');var imageTitle=$('#imgTitle');galleryNav.eq(activeImage).addClass("active");imageTitle.html(galleryNav.eq(activeImage).attr("title"));galleryNav.click(function(){showImage(galleryNav.index(this));});heroImage.click(function(){nextImage();});function showImage(index){heroImage.hide().attr("src",imgPath+galleryNav.eq(index).attr("rel")).fadeIn(700);imageTitle.html(galleryNav.eq(index).attr("title"));galleryNav.eq(index).addClass("active").end().eq(activeImage).removeClass("active");activeImage=index;}function nextImage(){if(activeImage<galleryNav.size()-1)showImage(activeImage+1);else showImage(0);}});