$(document).ready(function(){$("#boat_single #simpleGallery").hide();$("#boat_single h3").first().hide();$(".lightbox").lightbox();$("#boat_single .premium_package ul li:even").addClass("alt");$("#mycarousel a.content_box").click(function(){var a=$(this);$("#home_box div").fadeOut("fast",function(){$("#home_box").load(a.attr("href")+" #featured_content")});return false});$("#dropdown").hide();$("#top nav ul li a.dropdown").click(function(b){b.preventDefault();$("#top nav .current").removeClass("current");$(this).addClass("current");var a=$(this).attr("href");if($("#dropdown").hasClass("hidden")){$(a).show();$("#dropdown").slideDown("slow").removeClass("hidden");$("#content").animate({paddingTop:"130px"},600)}$(".boat_series").not(a).hide();$(a).fadeIn(600)});$("#slider").easySlider({auto:true,continuous:false,speed:800,pause:4000,controlsBefore:'<p id="controls">',controlsAfter:"</p>",prevId:"prevBtn",nextId:"nextBtn"});$("#mycarousel").jcarousel({scroll:1,auto:5});$(".search .search_text").focus(function(){$(this).val("")});$(".dealer input").focus(function(){$(this).val("")});$("#dealer_results").hide();$("#getDealers ").submit(function(a){a.preventDefault();$("#dealers").load("http://legendboats.com/en/welcome/dealers_result?"+$(this).serialize(),function(){initialize();$("#dealers_result").show()})});$("#controls").hide();$("#slider_container").hover(function(){$("#controls").fadeIn(500)},function(){$("#controls").fadeOut(500)});$("#mainGallery").children().hide().filter(":first").show();$("#simpleGallery .thumbs img:first").addClass("current");$("#simpleGallery .thumbs img").css({opacity:0.5}).filter(".current").css({opacity:1});$("#simpleGallery .thumbs img").hover(function(){$(this).fadeTo("fast",1)},function(){$("#simpleGallery .thumbs img:not('.current')").animate({opacity:0.5},300)});$("#simpleGallery .thumbs a").click(function(a){var b=$(document).scrollTop();a.preventDefault();$("#simpleGallery .thumbs img").css({opacity:0.5});$(this).children().addClass("current").css({opacity:1});$("#mainGallery").children().hide();$("#mainGallery "+this.hash).fadeIn("slow");$("body").scrollTop(b)});$(".inline a").click(function(g){g.preventDefault();var b=this.href;var f=b.split("#");var a=f[1];var d=$("#"+a).offset();var c=d.top;$("html, body").animate({scrollTop:c},500)});$(".back_top a").click(function(a){a.preventDefault();$("html, body").animate({scrollTop:0},500)});$("#boat_single h3 a").click(function(a){a.preventDefault();$(this).toggleClass("collapsed");$(this.hash).slideToggle()});$(".buttons .view").click(function(a){a.preventDefault();$("#boat_single div").show()});$(".buttons .hide").click(function(a){a.preventDefault();$("#boat_single div").hide()});$("#boat_single .print a").click(function(){$("#boat_single div").show();window.print();return false});$("#deck_storage2").hide();$("#deck_storage a").click(function(a){a.preventDefault();$(this.hash).show().siblings("div").hide()});$("#boat_single .motor_upgrades tbody tr:even").addClass("odd");$target=$("#feedback");$target.find("h5").click(function(){if($target.hasClass("active")){$target.animate({right:"-=360"},500).removeClass("active")}else{$target.animate({right:"+=360"},700).addClass("active")}});if($("#map_canvas").length!=0){initialize()}});
