datamad2017/js/scripts.min.js

1 line
12 KiB
JavaScript
Raw Normal View History

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