-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.min.js
1 lines (1 loc) · 14.6 KB
/
script.min.js
1
function whiteMast(){$("#mobile-mast").css("background-color","rgba(255,255,255,.95)")}function clearMast(){$("#mobile-mast").css("background-color","transparent")}function scrollUp(){$("html, body").animate({scrollTop:0},"slow")}function correctLeft(){$("#signature-paralyzer-id").scrollLeft($("#signature-paralyzer-image").width()-600),$("#barbed-paralyzer-id").scrollLeft($("#barbed-paralyzer-image").width()-500),$("#flopper-head-id").scrollLeft($("#flopper-head-image").width()-500),$("#slip-tip-id").scrollLeft($("#slip-tip-image").width()-500),$("#inshore-id").scrollLeft($("#inshore-image").width()-3e3)}function mobileBreak(){$(".thumbs a").wrap("<div class='thumb-containers'></div>"),$(".sixfooter").show(),$(".sixfooter,.sevenfooter, .eightfooter,.ninefooter,.tenfooter").addClass("window").unwrap(),$(".vid-1-description").before($(".vid-1")),$(".vid-2-description").before($(".vid-2")),$(".vid-3-description").before($(".vid-3")),$(".vid-4-description").before($(".vid-4")),$(".vid-5-description").before($(".vid-5")),$(".vid-6-description").before($(".vid-6")),$(".video").unwrap(),$(".video1").hide(),$(".video-description div").addClass("v-des"),$("iframe").wrap("<div class='video1'></div>"),$("#you-window").detach();var e=$(".window"),t=$(".mobile-logo");e.hide(),$(".window1").show(),$("#m-click-heads").click(function(){e.hide(),$("#store").show(),$("#mobile-titles").html("STORE"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-home").click(function(){e.hide(),$("#home").show(),$("#mobile-titles").html(""),t.show(),clearMast(),scrollUp()}),$("#m-polespear").click(function(){e.hide(),$("#polespear-section").show(),$("#mobile-titles").html("POLESPEARS"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-sigpar").click(function(){e.hide(),$("#sigpar").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-barpar").click(function(){e.hide(),$("#barpar").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-flopper").click(function(){e.hide(),$("#flopper").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-sliptip").click(function(){e.hide(),$("#sliptip").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-polespear").click(function(){e.hide(),$("#store"),$("#store").show(),$("#mobile-titles").html("STORE"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-sixfooter").click(function(){e.hide(),$(".sixfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-sevenfooter").click(function(){e.hide(),$("#polespear-section"),$(".sevenfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-eightfooter").click(function(){e.hide(),$("#polespear-section"),$(".eightfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-ninefooter").click(function(){e.hide(),$("#polespear-section"),$(".ninefooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-tenfooter").click(function(){e.hide(),$("#polespear-section"),$(".tenfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-extras").click(function(){e.hide(),$("#store").show(),$("#mobile-titles").html("STORE"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-inshore-shrinker").click(function(){e.hide(),$("#inshore-shrinker").show(),$("#mobile-titles").html("ACCESSORIES"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-knife").click(function(){e.hide(),$("#knife").show(),$("#mobile-titles").html("ACCESSORIES"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-bands-window").click(function(){e.hide(),$("#bands-window").show(),$("#mobile-titles").html("ACCESSORIES"),t.hide(),whiteMast(),scrollUp(),correctLeft()}),$("#m-video").click(function(){e.hide(),$("#video-window").show(),$("#mobile-titles").html("VIDEOS"),t.hide(),whiteMast(),scrollUp()}),$("#m-contact").click(function(){e.hide(),$("#contact-window").show(),$("#mobile-titles").html("CONTACT"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-sliptip").click(function(){e.hide(),$("#sliptip").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),setTimeout(function(){correctLeft()},10)}),$("#m-store-barpar").click(function(){e.hide(),$("#barpar").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),setTimeout(function(){correctLeft()},10)}),$("#m-store-sigpar").click(function(){e.hide(),$("#sigpar").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),setTimeout(function(){correctLeft()},10)}),$("#m-store-flopper").click(function(){e.hide(),$("#flopper").show(),$("#mobile-titles").html("HEADS"),t.hide(),whiteMast(),scrollUp(),setTimeout(function(){correctLeft()},10)}),$("#m-store-sixfooter").click(function(){e.hide(),$(".sixfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-sevenfooter").click(function(){e.hide(),$(".sevenfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-sevenfooter").click(function(){e.hide(),$(".sevenfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-eightfooter").click(function(){e.hide(),$(".eightfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-ninefooter").click(function(){e.hide(),$(".ninefooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-tenfooter").click(function(){e.hide(),$(".tenfooter").show(),$("#mobile-titles").html("POLES"),t.hide(),whiteMast(),scrollUp()}),$("#m-store-inshore-shrinker").click(function(){e.hide(),$("#inshore-shrinker").show(),$("#mobile-titles").html("ACCESSORIES"),t.hide(),whiteMast(),scrollUp(),setTimeout(function(){correctLeft()},10)}),$("#m-store-knife").click(function(){e.hide(),$("#knife").show(),$("#mobile-titles").html("ACCESSORIES"),t.hide(),whiteMast(),scrollUp(),setTimeout(function(){correctLeft()},10)}),$("#m-store-bands-window").click(function(){e.hide(),$("#bands-window").show(),$("#mobile-titles").html("ACCESSORIES"),t.hide(),whiteMast(),scrollUp(),correctLeft()})}$(document).ready(function(){function e(){return"none"==$("#mast").css("display")?!0:!1}function t(){$(".vid-click").click(function(){$("iframe, .video-description div").css("display","none");var e=$(this).attr("activates"),t=$("."+e),o=$("."+e+"-description");t.show(),o.show()})}function o(){$("#polespear-section").waypoint(function(){var e=$("select.poles-menu").val();$("."+e).show()},{offset:function(){return $(this).height()}})}function i(){var e=$(this).attr("title");$(".sixfooter,.sevenfooter, .eightfooter,.ninefooter,.tenfooter").hide(),$("."+e).toggle(),correctLeft(),$("select.poles-menu").val(e),f.placement()}function s(){u.hide(),w.waypoint(function(){g.addClass("downscroll").removeClass("header"),u.show(),b.hide()},{offset:50}),w.waypoint(function(){g.addClass("header").removeClass("downscroll"),u.hide(),b.show()},{offset:100})}function l(){$(window).scrollTop()>$(window).height()&&(g.addClass("downscroll").removeClass("header"),u.show(),b.hide())}function n(e,t,o,i){e.waypoint(function(){t.removeClass("link-bold")},{offset:o}),e.waypoint(function(){t.addClass("link-bold")},{offset:function(){return-$(this).height()}}),e.waypoint(function(){t.addClass("link-bold")},{offset:i}),e.waypoint(function(){t.removeClass("link-bold")},{offset:function(){return-$(this).height()}})}function r(){var e=.18*$("#you-container").width()+"px";$(".you-pic-container").css("width",e);var t=$(".you-pic-container").width()+"px";$(".you-pic-container").css("height",t)}var c={init:function(){c.showFirst(),c.tabActive(),c.slightTabBorder(),c.setHeight()},resize:function(){c.setHeight()},showFirst:function(){$(".sectionFirst").show()},tabActive:function(){var e=$(".info-module-tab");e.click(function(){var e=$(this).parent().find(".info-module-tab"),t=$(this).attr("activates");e.removeClass("info-module-active"),$(this).addClass("info-module-active"),c.sectionShow(t,$(this))})},sectionShow:function(e,t){t.parent().prev().children("div").hide(),t.parent().prev().children("."+e+"-section").show()},difficultyHover:function(){},slightTabBorder:function(){$(".info-module-tab").each(function(){$(this).append("<div class='tab-slight-border'></div>")})},setHeight:function(){var e=$(".info-module"),t=e.width(),o=.58;e.each(function(){$(this).height(t*o)}),e.promise().done()}},a={init:function(){a.setHeight()},resize:function(){a.setHeight()},setHeight:function(){var e=$(".info-module").height(),t=.95;$(".echeckbox").each(function(){$(this).height(e*t)})}};c.init(),a.init(),$(window).resize(function(){c.resize(),a.resize()}),$("#mobile-menu").mmenu(),$("#owl-example").owlCarousel(),$(".actual-size-button").css("background-color","black");var h={init:function(){h.fadeOut()},fadeOut:function(){setTimeout(function(){$("#blinder").fadeOut(800)},2500)}};h.init();var f={init:function(){e()||($("select.poles-menu").change(f.values),f.values(),f.placement())},placement:function(){var e=$("select.poles-menu").val(),t=$("."+e+" .p-product-title").find("small"),o=t.offset().left,i=t.position().top+$("."+e+" .polespear-content").position().top+$("."+e).position().top;$(".pole-product-title").css({left:o+100,top:i-70})},values:function(){var e=$("select.poles-menu").val();$(".sixfooter,.sevenfooter, .eightfooter,.ninefooter,.tenfooter").hide(),$("."+e).toggle(),correctLeft(),f.placement()}};f.init();var d={styling:function(e){var t=$(".eshop input + label");t.each(function(){var e=$(this).html();-1!=e.indexOf("InshoreShrinker")&&$(this).addClass("inshore-label")}),t.promise().done(e)},attachments:function(){var e=$(".inshore-label");e.each(function(){$(this).prepend("<img src='"+directory+"/img/red-star.png' class='redstar'>").append("<a href='#inshore-shrinker'><img src='"+directory+"/img/magnify.png' class='magnify'></a>")})}};d.styling(d.attachments);var m={init:function(){$(".image-size-controller span:first-child").click(m.actualSize),$(".image-size-controller span:last-child").click(m.fitScreen)},fitScreen:function(){var e=$(this).attr("base");$("#"+e+"-image").removeClass("polespear-image").addClass("polespear-image-fit"),$(this).css("background-color","black"),$("#"+e+"-actual-size").css("background-color","LightGrey"),$("#"+e+"-arrows").hide(),console.log("in an object!")},actualSize:function(){var e=$(this).attr("base");$("#"+e+"-image").removeClass("polespear-image-fit").addClass("polespear-image"),correctLeft(),$(this).css("background-color","black"),$("#"+e+"-fit-screen").css("background-color","LightGrey"),$("#"+e+"-arrows").show(),console.log("in an object too!")}};m.init();var p={init:function(){p.pulse()},bubbleIsHovered:function(){$(".bubble-arrow").hide(),$(".bubble").hover(function(){$(".bubble-arrow").fadeIn("fast"),clearInterval(p.pulse())},function(){$(".bubble-arrow").stop().fadeOut("fast"),p.pulse()})},pulse:function(){setInterval(function(){$(".bubble-arrow").fadeIn().delay(750).fadeOut()},2e3)}};p.init(),e()||($(".secondary-vid, .secondary-vid-description").hide(),t()),o(),$(".thumbs a, .links a").click(i);var u=$("#below-logo"),w=$(".window2"),b=$("#home-logo"),g=$("#mast");s(),l();var v=$(".window2"),k=$(".store-link"),y=$("#video-window"),S=$(".video-link"),L=$("#you-window"),E=$(".you-link"),C=$("#contact-window"),M=$(".contact-link");n(v,k,100,50),n(y,S,100,50),n(L,E,100,50),n(C,M,100,50),$("a[href*=#]").bind("click",function(e){e.preventDefault();var t=$(this).attr("href");return $("html, body").stop().animate({scrollTop:$(t).offset().top},400,function(){location.hash=t}),!1}),$(function(){var e=$("#mobile-menu"),t=$("html, body");$("#mobile-menu-hit").click(function(t){t.stopImmediatePropagation(),t.preventDefault(),e.trigger(e.hasClass("mm-opened")?"close.mm":"open.mm")}),e.mmenu(),e.find("li > a").on("click",function(){var o=$(this).attr("href");"#"==o.slice(0,1)&&e.one("closed.mm",function(){setTimeout(function(){t.animate({scrollTop:$(o).offset().top})},10)})})}),$.fn.exists=function(e){var t=[].slice.call(arguments,1);return this.length&&e.call(this,t),this},$(".thumb-containers").exists(function(){$("#heads-store .thumb-containers:first-child").after('<p class="mobile-store-titles"><strong>Paralyzer</strong><small>/SIGNATURE</small></p>'),$("#heads-store .thumb-containers:nth-of-type(2)").after('<p class="mobile-store-titles"><strong>Paralyzer</strong><small>/BARBED</small></p>'),$("#heads-store .thumb-containers:nth-of-type(3)").after('<p class="mobile-store-titles"><strong>Slip-tip</strong</p>'),$("#heads-store .thumb-containers:nth-of-type(4)").after('<p class="mobile-store-titles"><strong>Flopper</strong></p>'),$("#tails-store .thumb-containers:nth-of-type(1)").after('<p class="mobile-store-titles"><strong>Six</strong>\'er<small>/182cm</small></p>'),$("#tails-store .thumb-containers:nth-of-type(2)").after('<p class="mobile-store-titles"><strong>Seven</strong>\'er<small>/213cm</small></p>'),$("#tails-store .thumb-containers:nth-of-type(3)").after('<p class="mobile-store-titles"><strong>Eight</strong>\'er<small>/243cm</small></p>'),$("#tails-store .thumb-containers:nth-of-type(4)").after('<p class="mobile-store-titles"><strong>Nine</strong>\'er<small>/274cm</small></p>'),$(".tails .thumb-containers:nth-of-type(5)").after('<p class="mobile-store-titles"><strong>Ten</strong>\'er<small>/304cm</small></p>'),$(".extras .thumb-containers:nth-of-type(1)").after('<p class="mobile-store-titles"><strong>Inshore Shrinker</strong></p>'),$(".extras .thumb-containers:nth-of-type(2)").after('<p class="mobile-store-titles"><strong>Budk Knife</strong></p>'),$(".extras .thumb-containers:nth-of-type(3)").after('<p class="mobile-store-titles"><strong>Bands</strong></p>')}),r(),$(window).resize(function(){r(),f.placement()});for(var U=$("#you-carousel .you-a-container"),O=0;O<U.length;O+=15){var A=$("<div/>",{"class":"you-pane"});U.slice(O,O+15).wrapAll(A)}$("#you-carousel").owlCarousel({autoPlay:!1});var x=$("#you-carousel .owl-prev");x.hide(),$("#you-carousel .owl-next, #you-carousel .owl-pagination .owl-page:nth-of-type(n+1)").click(function(){x.fadeIn("slow")}),$("#you-carousel .owl-pagination .owl-page:nth-of-type(1)").click(function(){x.fadeOut("slow")}),x.click(function(){$("#you-carousel .owl-pagination .owl-page:nth-of-type(1)").hasClass("active")&&x.fadeOut("slow")}),$(".checkout-exists").exists(function(){$("#below-logo").show()}),$("#barpar .product-title").append("<span><small><small><small><small><small><small> /PARALYZER</small></small></small></small></small></small></span>"),$("#sigpar .product-title").append("<span><small><small><small><small><small><small> /PARALYZER</small></small></small></small></small></small></span>")}),"none"===$("#mast").css("display")&&mobileBreak(),window.onload=function(){correctLeft()},$(window).load(function(){});