$(function(){$("#econtent").hide();$("#ec-minus").hide();$("#video").hide();$("#vipit-info").hide();$("#share-content").hide();$('body').removeClass('js-disabled').addClass('js-enabled');$('#highlight-nav').navInit();$('#tabs > ul').tabs();$('#testimonial blockquote').innerfade({speed:2000,timeout:8500,type:'random_start',containerheight:'140px'});$('#options').innerfade({speed:1000,timeout:7000,type:'random_start',containerheight:'60px'});$("#slideshow-control").click(function(){$("#slideshow").show();$("#video").hide()});$("#video-control").click(function(){$("#slideshow").hide();$("#video").show()});$("li.shareme a").click(function(){$("#share-content").toggle()});$("#vipit").click(function(){$("#vipit-info").toggle();$("#std-price").toggle()});$("#vipit-return").click(function(){$("#vipit-info").toggle();$("#std-price").toggle()})});$.fn.navInit=function(){return this.each(function(){var jump_nav=$('.jump a',this);jump_nav.click(function(){if(scrolling)window.clearInterval(scrolling);scrollSplashTo.call(this)});function scrollSplashTo(){var splash=$("#"+$(this).parents('li').get(0).id.replace(/^nav-/,'highlight-'));var splashLeft=splash.parent().children().index(splash)*940+'px';$("#scroller").animate({scrollLeft:splashLeft},800);jump_nav.parent("li").removeClass("selected");$(this).parent("li").addClass("selected");this.blur();return false}$('#nav_prev',this).click(function(){if(scrolling)window.clearInterval(scrolling);$('#highlight-nav .jump li.selected').prev('li').children('a').click();return false});$('#nav_next',this).click(function(){if(scrolling)window.clearInterval(scrolling);$('#highlight-nav .jump li.selected').next('li').children('a').click();return false});scrollSplashTo.call($('#highlight-nav ul.jump a:first'));var scrolling=window.setInterval(function(){currentLi=$('#highlight-nav .jump li.selected');if(currentLi.next('li').length>0){scrollSplashTo.call(currentLi.next('li').children('a'))}else{scrollSplashTo.call($('#highlight-nav .jump li:first>a'))}},6000)})}
