$(document).ready(function(){$('#ftr-more-info-hs img').css({opacity:0.65});$('#bottom-image img').css('clip','rect(53px, 855px, 148px, 0px)');$('#ftr-more-info').data('isPlaying',false);$('#nav-tab-hs img, #ftr-more-info-hs img').mouseenter(function(){if(!$('#ftr-more-info-hs img').data('isPlaying')){$('#ftr-more-info-hs img').stop();$('#ftr-more-info-hs img').css({opacity:1});$('#nav-tab img').attr('src','images/nav/nav-tab-hover.png');}});$('#nav-tab-hs img, #ftr-more-info-hs img').mouseleave(function(){if(!$('#ftr-more-info-hs img').data('isPlaying')){$('#ftr-more-info-hs img').stop();$('#ftr-more-info-hs img').css({opacity:0.65});if(!$('#ftr-more-info-hs img').data('isPlaying'))$('#nav-tab img').attr('src','images/nav/nav-tab.png');}});$('#bottom-image').data('toggle',true);$('#nav-tab-hs img, #ftr-more-info-hs img').click(function(){$('#ftr-more-info-hs img').data('isPlaying',true);$('#bottom-image').data('reset',false);$('#nav-tab img').attr('src','images/nav/nav-tab-hover.png');$('#bottom-image img, #ftr-more-items, #ftr-more, #ftr-more-info-hs img').stop();var difference;if($('#bottom-image').data('toggle')){$('#bottom-image').data('toggle',false);difference=Math.abs(parseInt($('#ftr-more').css('height'))-54);toggleFade(true);toggleClip(true);toggleHeight(true,difference);}else{$('#bottom-image').data('toggle',true);difference=Math.abs(parseInt($('#ftr-more').css('height')));toggleFade(false);toggleClip(false);toggleHeight(false,difference);}});function toggleFade(down){if(down){$('#ftr-more-info-hs img').animate({opacity:0},{duration:400,queue:false,complete:function(){$('#ftr-more-info-hs img').css('display','none');$('#ftr-more-items').css('display','inline');$('#ftr-more-items').css({opacity:0});$('#ftr-more-items').fadeTo(200,1,function(){$('#ftr-more-info-hs img').data('isPlaying',false);});}});}else{$('#ftr-more-items').fadeTo(200,0,function(){$('#ftr-more-items').css('display','none');$('#ftr-more-info-hs img').css('display','inline');$('#ftr-more-info-hs img').css({opacity:0});$('#ftr-more-info-hs img').fadeTo(300,0.65,function(){$('#ftr-more-info-hs img').data('isPlaying',false);});});}};function toggleHeight(down,difference){var toggle=down?'+='+difference:'-='+difference;$('#ftr-more').animate({height:toggle},{duration:500,queue:false,complete:function(){if(!$('#bottom-image').data('reset')){$('#nav-tab img').attr('src','images/nav/nav-tab.png');$('#bottom-image').data('reset',true);resetCss(down);}}});};function toggleClip(down){var toggle=down?0:53;$('#bottom-image img').animate({clip:'rect('+toggle+'px 855px 148px 0px)'},500);};function resetCss(down){if(down){$('#ftr-more').css('height','54px');$('#bottom-image img').css('clip','rect(0px, 855px, 148px, 0px');}else{$('#ftr-more').css('height','1px');$('#bottom-image img').css('clip','rect(53px, 855px, 148px, 0px');}}});
