var slidenavtop,descriptiontop;function hidefooter(){$('#item .description').animate({top:descriptiontop+50,height:0,paddingTop:0,paddingBottom:0,opacity:0});}
$(document).ready(function(){$('#slideshow').cycle({timeout:8000,next:'img.nextPage',prev:'img.prevPage',pager:'#slidenav',pagerAnchorBuilder:function(idx,slide){return'#slidenav a:eq('+(idx)+')';}}).hover(function(){$(this).cycle('pause')},function(){$(this).cycle('resume');});if($('#cmsplus-bar').length){slidenavtop=195;descriptiontop=795;document.getElementById('toggleslidenav').style.top=slidenavtop+'px';}else{slidenavtop=155;descriptiontop=755;}
$('#item .description').animate({top:descriptiontop},function(){setTimeout("hidefooter()",6000);});$('#toggleslidenav span').toggle(function(){$('#slidenav').show();$('#slidenav').animate({top:slidenavtop},function(){$('#slidenav li').show();$('#slidenav').cycle({timeout:5000});});$('#toggleslidenav').animate({top:slidenavtop+70});},function(){$('#toggleslidenav').animate({top:slidenavtop});$('#slidenav').animate({top:slidenavtop-70},function(){$('#slidenav li').hide();$('#slidenav').hide();});});$('div#category-links li:not(.preview)').mouseenter(function(){var link=$(this).children('a');if(link.attr('data-preview-img')){var imgsrc='/pics/'+link.attr('data-preview-img')+'-178x110-c.jpg';$('li.preview > img').hide().attr('src',imgsrc);}});$('div#category-links').mouseenter(function(){$(this).find('li.preview').slideDown('normal');}).mouseleave(function(){var li=$(this).find('li.preview');li.find('img').fadeOut('normal',function(){li.slideUp('normal');})});$('li.preview > img').bind('load',function(){$(this).fadeIn('normal');});});
