2015-02-19 23:10:06 +01:00
|
|
|
(function(g){g(document).ready(function(){g(window).load(function(){g("#st-container").removeClass("disable-scrolling");g("#loading-animation").fadeOut();g("#preloader").delay(350).fadeOut(800);d();equalheight(".same-height")});if(g(window).width()>1500){g(".effect-wrapper").addClass("col-lg-3")}if(g(window).width()<768){g(".animated").removeClass("animated").removeClass("hiding");g(".stat span").removeClass("timer");g(".timeslot-label").addClass("stick-label")}if(g(window).height()<512){g("#bottom-navlinks").removeClass("bottom-navlinks").addClass("bottom-navlinks-small")}if(g(window).scrollTop()>=100){g("#top-header").addClass("after-scroll");g("#logo-header .logo").removeClass("logo-light").addClass("logo-dark")}g(window).scroll(function(){var p=g(this).scrollTop();var t=g("#top-header");var s=g("#logo-header .logo");var q=g(".right-nav-button");var r=t.height()+g(".track-header").height();if(p>=100){t.addClass("after-scroll");s.removeClass("logo-light").addClass("logo-dark")}else{t.removeClass("after-scroll");s.removeClass("logo-dark").addClass("logo-light")}if(p>=g(".top-section").height()&&g(window).width()>767){q.removeClass("right-nav-button-hidden")}else{if(p<g(".top-section").height()&&g(window).width()>767){q.addClass("right-nav-button-hidden")}}g(".slot").each(function(){var v=g(this).offset().top-p;var u=r+g(this).find(".slot-title").height();if(v<=u&&v>=0){g(".track-header.sticky").find(".slot-detail").html(g(this).data("slotDetail"))}})});g(window).resize(function(){if(g(window).width()>1500){g(".effect-wrapper").addClass("col-lg-3")}else{g(".effect-wrapper").removeClass("col-lg-3")}if(g(window).width()<768){g(".same-height").css("height","100%");g(".timeslot-label").addClass("stick-label")}else{g(".timeslot-label").removeClass("stick-label");if(m.hasClass("st-menu-open")){m.removeClass("st-menu-open");g("body").css("overflow","auto")}equalheight(".same-height")}if(g(window).height()<512){g(".st-menu").addClass("scrollable");g("#bottom-navlinks").removeClass("bottom-navlinks").addClass("bottom-navlinks-small")}else{g(".st-menu").removeClass("scrollable");g("#bottom-navlinks").removeClass("bottom-navlinks-small").addClass("bottom-navlinks")}});g(function(){g("a[href*=#]:not([href=#])").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var p=g(this.hash);p=p.length?p:g("[name="+this.hash.slice(1)+"]");if(p.length){g("html,body").animate({scrollTop:p.offset().top},1000);return false}}})});g(function(){g("a[href=#]").click(function(){event.preventDefault()})});g(function(){if(window.location.href.indexOf("schedule")>-1&&window.location.hash){var p=window.location.hash;g(p).click()}});g(function(){var s,q,r,v,u,p,t;t=g(".appear-animation");for(u=0,p=t.length;u<p;u++){r=t[u];v=r.offsetLeft+r.offsetTop;q=v/1000;g(r).css("transition-delay",""+(q*0.47)+"s");g(r).css("transition-duration",""+0.2+"s")}});g(".appear-animation-trigger").appear(function(){setTimeout(function(){g(".appear-animation-trigger").parent("div").find(".appear-animation").addClass("visible")},1000)});g(".animated").appear(function(){var q=g(this);var r=q.data("animation");var p=q.data("delay");if(p){setTimeout(function(){q.addClass(r+" visible");q.removeClass("hiding");if(q.hasClass("counter")){q.find(".timer").countTo()}},p)}else{q.addClass(r+" visible");q.removeClass("hiding");if(q.hasClass("counter")){q.find(".timer").countTo()}}},{accY:-150});equalheight=function(q){var p=0,r=0,u=new Array(),t,s=0;g(q).each(function(){t=g(this);g(t).height("auto");topPostion=t.position().top;if(r!=topPostion){for(currentDiv=0;currentDiv<u.length;currentDiv++){u[currentDiv].height(p)}u.length=0;r=topPostion;p=t.height();u.push(t)}else{u.push(t);p=(p<t.height())?(t.height()):(p)}for(currentDiv=0;currentDiv<u.length;currentDiv++){u[currentDiv].height(p)}})};var m=g(".st-container");g("#menu-trigger").click(function(p){p.stopPropagation();m.toggleClass("st-menu-open")});g(".st-pusher").click(function(){if(m.hasClass("st-menu-open")){m.removeClass("st-menu-open")}});g(".track-header").each
|