datamad2017/js/scripts.min.js

1 line
12 KiB
JavaScript
Raw Normal View History

(function(g){g(document).ready(function(){g("body").css("overflow","hidden");g(window).load(function(){var v=350,t=800;function u(){var x=g("#loading-animation"),w=g("#preloader");x.fadeOut();w.delay(v).fadeOut(t)}g("body").css("overflow","auto");u();d();r();setTimeout(function(){g(".explore").removeClass("hidden")},1000)});g(".track-header").each(function(){var u=g(this).closest(".schedule-table").find(".slot").first();var t;while(t===undefined){t=u.data("slotDetail");u=u.next()}g(this).find(".slot-detail").html(t)});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 t=g(this).scrollTop();var x=g("#top-header");var w=g("#logo-header .logo");var u=g(".right-nav-button");var v=x.height()+g(".track-header").height();if(t>=100){x.addClass("after-scroll");w.removeClass("logo-light").addClass("logo-dark")}else{x.removeClass("after-scroll");w.removeClass("logo-dark").addClass("logo-light")}if(t>=g(".top-section").height()){u.removeClass("right-nav-button-hidden")}else{u.addClass("right-nav-button-hidden")}g(".slot").each(function(){var z=g(this).offset().top-t;var y=v+g(this).find(".slot-title").height();if(z<=y&&z>=0){g(".track-header.sticky").find(".slot-detail").html(g(this).data("slotDetail"))}})});g(function(){var u=[];g(".rockstar-speakers-item").each(function(){u[u.length]=g(this).attr("data-id")});u=q(u);for(var t=0;t<4;t++){g("#rockstar-speaker-"+u[t]).removeClass("hidden")}});function q(w){for(var u,t,v=w.length;v;u=parseInt(Math.random()*v),t=w[--v],w[v]=w[u],w[u]=t){}return w}var n=parseInt(g(".increment-animation").attr("data-delay"));g(".increment-animation").not("hidden").each(function(t){g(this).attr("data-delay",t*n)});g(".animated").appear(function(){var u=g(this);var v=u.data("animation");var t=u.data("delay");if(t){setTimeout(function(){u.addClass(v+" visible");u.removeClass("hiding");if(u.hasClass("counter")){u.find(".timer").countTo()}},t)}else{u.addClass(v+" visible");u.removeClass("hiding");if(u.hasClass("counter")){u.find(".timer").countTo()}}},{accY:-150});g(function(){var w,u,v,z,y,t,x;x=g(".appear-animation");for(y=0,t=x.length;y<t;y++){v=x[y];z=v.offsetLeft+v.offsetTop;u=z/1000;g(v).css("transition-delay",""+(u*0.47)+"s");g(v).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(function(){g("a[href*=#]:not([href=#])").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var t=g(this.hash);t=t.length?t:g("[name="+this.hash.slice(1)+"]");if(t.length){g("html,body").animate({scrollTop:t.offset().top},1000);return false}}})});g(function(){g("a[href=#]").click(function(){event.preventDefault()})});function r(){if(g(window).width()>767){g(".same-height-wrapper").each(function(){var t=0;g(".same-height").each(function(){var u=g(this).height();if(u>t){t=u}});g(".same-height").each(function(){g(this).height(t)})})}}g("#post-section .post-body p").each(function(){if(g(this).find(".feature-image").length){var t=g(this).find(".feature-image").prop("src");g("#top-section").css("background-image","url("+t+")").addClass("enable-overlay")}});g(".slider").each(function(){g(this).find(".slider-item").first().addClass("slider-current-item").removeClass("hidden");if(g(this).find(".slider-item").length>1){g(this).closest(".speaker-item").find(".slider-next-item").removeClass("hidden")}});g(".slider-next-item").click(function(){var t=g(this).closest(".speaker-item");var u=t.find(".slider-current-item").next();if(u.length)