diff --git a/js/scripts.js b/js/scripts.js index 30b9451..e4d490b 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -1,37 +1,13 @@ (function($) { $(document).ready(function() { - $('body').css('overflow', 'hidden'); $(window).load(function() { - var preloaderDelay = 350, - preloaderFadeOutTime = 800; - - function hidePreloader() { - var loadingAnimation = $('#loading-animation'), - preloader = $('#preloader'); - loadingAnimation.fadeOut(); - preloader.delay(preloaderDelay).fadeOut(preloaderFadeOutTime); - } - $('body').css('overflow', 'auto'); - hidePreloader(); + $('#st-container').removeClass('disable-scrolling'); + $('#loading-animation').fadeOut(); + $('#preloader').delay(350).fadeOut(800); initGooglePlus(); - generateSameHeight(); - setTimeout(function() { - $('.explore').removeClass('hidden'); - }, 1000); + equalheight('.same-height'); }); - - $('.track-header').each(function() { - var slot = $(this).closest('.schedule-table').find('.slot').first(); - var scheduleFirstSlotText; - while(scheduleFirstSlotText === undefined) { - scheduleFirstSlotText = slot.data('slotDetail'); - slot = slot.next(); - } - $(this).find('.slot-detail').html(scheduleFirstSlotText); - }); - - if ($(window).width() > 1500) { $('.effect-wrapper').addClass('col-lg-3'); } @@ -72,16 +48,95 @@ $('.slot').each(function() { var currentPosition = $(this).offset().top - scroll; var offsetActivator = topOffset + $(this).find('.slot-title').height(); - - if(currentPosition <= offsetActivator && currentPosition >= 0) { + if (currentPosition <= offsetActivator && currentPosition >= 0) { $('.track-header.sticky').find('.slot-detail').html($(this).data('slotDetail')); } }); }); - var delay = parseInt($('.increment-animation').attr('data-delay')); - $('.increment-animation').not('hidden').each(function(index) { - $(this).attr('data-delay', index * delay); + $(window).resize(function() { + if ($(window).width() > 1500) { + $('.effect-wrapper').addClass('col-lg-3'); + } else { + $('.effect-wrapper').removeClass('col-lg-3'); + } + if ($(window).width() < 768) { + $('.same-height').css('height', '100%'); + $('.timeslot-label').addClass('stick-label'); + } else { + $('.timeslot-label').removeClass('stick-label'); + if (container.hasClass('st-menu-open')) { + container.removeClass('st-menu-open'); + $('body').css('overflow', 'auto'); + } + equalheight('.same-height'); + } + if ($(window).height() < 512) { + $('.st-menu').addClass('scrollable'); + $('#bottom-navlinks').removeClass('bottom-navlinks').addClass('bottom-navlinks-small'); + } else { + $('.st-menu').removeClass('scrollable'); + $('#bottom-navlinks').removeClass('bottom-navlinks-small').addClass('bottom-navlinks'); + } + }); + + var scrollStatus = 1; + $(document).on('touchmove', function(e) { + if (scrollStatus == 0) { + e.preventDefault(); + } else { + return true; + } + }); + $('body').on('touchmove', '.scrollable', function(e) { + e.stopPropagation(); + }); + + function toogleScrolling() { + if (scrollStatus == 0) { + $('body').removeClass('disable-scrolling'); + scrollStatus = 1; + } else { + $('body').addClass('disable-scrolling'); + scrollStatus = 0; + } + } + + $(function() { + $('a[href*=#]:not([href=#])').click(function() { + if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { + var target = $(this.hash); + target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); + if (target.length) { + $('html,body').animate({ + scrollTop: target.offset().top + }, 1000); + return false; + } + } + }); + }); + $(function() { + $('a[href=#]').click(function() { + event.preventDefault(); + }); + }); + + $(function() { + var appear, delay, i, offset, _i, _len, _ref; + _ref = $(".appear-animation"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + i = _ref[_i]; + offset = i.offsetLeft + i.offsetTop; + delay = offset / 1000; + $(i).css('transition-delay', '' + (delay * 0.47) + 's'); + $(i).css('transition-duration', '' + 0.2 + 's'); + } + }); + $('.appear-animation-trigger').appear(function() { + setTimeout(function() { + $('.appear-animation-trigger').parent('div').find('.appear-animation').addClass('visible'); + }, 1000); }); $('.animated').appear(function() { @@ -107,61 +162,65 @@ accY: -150 }); - $(function() { - var appear, delay, i, offset, _i, _len, _ref; - _ref = $(".appear-animation"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - offset = i.offsetLeft + i.offsetTop; - delay = offset / 1000; - $(i).css('transition-delay', '' + (delay * 0.47) + 's'); - $(i).css('transition-duration', '' + 0.2 + 's'); - } - }); - $('.appear-animation-trigger').appear(function() { - setTimeout(function() { - $('.appear-animation-trigger').parent('div').find('.appear-animation').addClass('visible'); - }, 1000); - }); - - $(function() { - $('a[href*=#]:not([href=#])').click(function() { - if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { - var target = $(this.hash); - target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); - if (target.length) { - $('html,body').animate({ - scrollTop: target.offset().top - }, 1000); - return false; + equalheight = function(container) { + var currentTallest = 0, + currentRowStart = 0, + rowDivs = new Array(), + $el, + topPosition = 0; + $(container).each(function() { + $el = $(this); + $($el).height('auto') + topPostion = $el.position().top; + if (currentRowStart != topPostion) { + for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { + rowDivs[currentDiv].height(currentTallest); } + rowDivs.length = 0; // empty the array + currentRowStart = topPostion; + currentTallest = $el.height(); + rowDivs.push($el); + } else { + rowDivs.push($el); + currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); + } + for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { + rowDivs[currentDiv].height(currentTallest); } }); - }); - - $(function() { - $('a[href=#]').click(function() { - event.preventDefault(); - }); - }); - - function generateSameHeight() { - if ($(window).width() > 767) { - $('.same-height-wrapper').each(function() { - var max = 0; - $('.same-height').each(function() { - var height = $(this).height(); - if (height > max) { - max = height; - } - }); - $('.same-height').each(function() { - $(this).height(max); - }); - }); - } } + + //Side menu + var container = $('.st-container'); + $('#menu-trigger').click(function(event) { + event.stopPropagation(); + var effect = $(this).attr('data-effect'); + if (!container.hasClass('st-menu-open')) { + container.addClass(effect).delay(25).addClass('st-menu-open'); + toogleScrolling(); + } else { + container.removeClass('st-menu-open'); + toogleScrolling(); + } + }); + $('.st-pusher').click(function() { + if (container.hasClass('st-menu-open')) { + container.removeClass('st-menu-open'); + toogleScrolling(); + } + }); + + $('.track-header').each(function() { + var slot = $(this).closest('.schedule-table').find('.slot').first(); + var scheduleFirstSlotText; + while (scheduleFirstSlotText === undefined) { + scheduleFirstSlotText = slot.data('slotDetail'); + slot = slot.next(); + } + $(this).find('.slot-detail').html(scheduleFirstSlotText); + }); + $('#post-section .post-body p').each(function() { if ($(this).find('.feature-image').length) { var url = $(this).find('.feature-image').prop('src'); @@ -187,71 +246,10 @@ } }); - //Side menu - var container = $('.st-container'); - $('#menu-trigger').click(function(event) { - event.stopPropagation(); - var top = $(window).scrollTop(); - var left = $(window).scrollLeft() - var effect = $(this).attr('data-effect'); - - if (!container.hasClass('st-menu-open')) { - container.addClass(effect).delay(25).addClass('st-menu-open'); - $('body').css('overflow', 'hidden'); - } else { - container.removeClass('st-menu-open'); - $('body').css('overflow', 'auto'); - } - }); - $('.st-pusher').click(function() { - if (container.hasClass('st-menu-open')) { - container.removeClass('st-menu-open'); - $('body').css('overflow', 'auto'); - } - }); - - $(window).resize(function() { - if ($(window).width() > 1500) { - $('.effect-wrapper').each(function() { - $(this).addClass('col-lg-3'); - }); - } else { - $('.effect-wrapper').each(function() { - $(this).removeClass('col-lg-3'); - }); - } - if ($(window).width() > 767) { - if (container.hasClass('st-menu-open')) { - container.removeClass('st-menu-open'); - $('body').css('overflow', 'auto'); - } - generateSameHeight(); - } - var bottomNavLinks = $('#bottom-navlinks'); - if ($(window).height() < 512) { - bottomNavLinks.removeClass('bottom-navlinks').addClass('bottom-navlinks-small'); - } else { - bottomNavLinks.removeClass('bottom-navlinks-small').addClass('bottom-navlinks'); - } - if ($(window).width() < 768) { - $('.same-height').css('height', '100%'); - $('.timeslot-label').addClass('stick-label'); - } else { - $('.timeslot-label').removeClass('stick-label'); - } - }); - - $('.modal').on('show.bs.modal', function() { - $('body').css('overflow', 'hidden'); - }); - $('.modal').on('hide.bs.modal', function() { - $('body').css('overflow', 'auto'); - }); if (typeof twitterFeedUrl !== 'undefined') { - var yql = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from json where url="' + twitterFeedUrl + '"') + '&format=json&callback=?'; - $.getJSON(yql, function(data) { - $.each(data.query.results.json.json, function(i, gist) { + $.getJSON(twitterFeedUrl, function(data) { + $.each(data, function(i, gist) { var tweetElement = ''; $('#tweets').append(tweetElement); }); @@ -259,15 +257,15 @@ }); function linkify(inputText) { - var replacedText, pattern1, pattern2, pattern3, pattern4; - pattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; - replacedText = inputText.replace(pattern1, '$1'); - pattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim; - replacedText = replacedText.replace(pattern2, '$1$2'); - pattern3 = /#(\S*)/g; - replacedText = replacedText.replace(pattern3, '#$1'); - pattern4 = /\B@([\w-]+)/gm; - replacedText = replacedText.replace(pattern4, '@$1'); + var replacedText, links1, links2, hashtags, profileLinks; + links1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; + replacedText = inputText.replace(links1, '$1'); + links2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim; + replacedText = replacedText.replace(links2, '$1$2'); + hashtags = /#(\S*)/g; + replacedText = replacedText.replace(hashtags, '#$1'); + profileLinks = /\B@([\w-]+)/gm; + replacedText = replacedText.replace(profileLinks, '@$1'); return replacedText; } @@ -275,7 +273,6 @@ var $tweets = $('#tweets').find('.tweet'), i = 0; $($tweets.get(0)).removeClass('hidden'); - function changeTweets() { var next = (++i % $tweets.length); $($tweets.get(next - 1)).addClass('hidden'); diff --git a/js/scripts.min.js b/js/scripts.min.js index b653e66..d95f4df 100644 --- a/js/scripts.min.js +++ b/js/scripts.min.js @@ -1 +1 @@ -(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;x767){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("slider-current-item").addClass("hidden")}});var m=g(".st-container");g("#menu-trigger").click(function(t){t.stopPropagation();var v=g(window).scrollTop();var u=g(window).scrollLeft();var s=g(this).attr("data-effect");if(!m.hasClass("st-menu-open")){m.addClass(s).delay(25).addClass("st-menu-open");g("body").css("overflow","hidden")}else{m.removeClass("st-menu-open");g("body").css("overflow","auto")}});g(".st-pusher").click(function(){if(m.hasClass("st-menu-open")){m.removeClass("st-menu-open");g("body").css("overflow","auto")}});g(window).resize(function(){if(g(window).width()>1500){g(".effect-wrapper").each(function(){g(this).addClass("col-lg-3")})}else{g(".effect-wrapper").each(function(){g(this).removeClass("col-lg-3")})}if(g(window).width()>767){if(m.hasClass("st-menu-open")){m.removeClass("st-menu-open");g("body").css("overflow","auto")}q()}var s=g("#bottom-navlinks");if(g(window).height()<512){s.removeClass("bottom-navlinks").addClass("bottom-navlinks-small")}else{s.removeClass("bottom-navlinks-small").addClass("bottom-navlinks")}if(g(window).width()<768){g(".same-height").css("height","100%");g(".timeslot-label").addClass("stick-label")}else{g(".timeslot-label").removeClass("stick-label")}});g(".modal").on("show.bs.modal",function(){g("body").css("overflow","hidden")});g(".modal").on("hide.bs.modal",function(){g("body").css("overflow","auto")});if(typeof twitterFeedUrl!=="undefined"){var p="http://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent('select * from json where url="'+twitterFeedUrl+'"')+"&format=json&callback=?";g.getJSON(p,function(s){g.each(s.query.results.json.json,function(u,t){var v='";g("#tweets").append(v)});r()});function o(x){var s,w,v,u,t;w=/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;s=x.replace(w,'$1');v=/(^|[^\/])(www\.[\S]+(\b|$))/gim;s=s.replace(v,'$1$2');u=/#(\S*)/g;s=s.replace(u,'#$1');t=/\B@([\w-]+)/gm;s=s.replace(t,'@$1');return s}function r(){var s=g("#tweets").find(".tweet"),u=0;g(s.get(0)).removeClass("hidden");function v(){var w=(++u%s.length);g(s.get(w-1)).addClass("hidden");g(s.get(w)).removeClass("hidden")}var t=setInterval(v,5000)}}});function d(){var m=document.createElement("script");m.type="text/javascript";m.async=true;m.src="https://apis.google.com/js/platform.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(m,n)}if(typeof googleMaps!=="undefined"){var a,b,l,c,j,k;var e=[];var i=new google.maps.DirectionsService();var h="custom_style";function f(){l=new google.maps.DirectionsRenderer({suppressMarkers:true});c=new google.maps.Geocoder();j=new google.maps.Polyline({strokeColor:"#03a9f4",strokeOpacity:1,strokeWeight:2});var x=[{stylers:[{lightness:40},{visibility:"on"},{gamma:0.9},{weight:0.4}]},{elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"water",stylers:[{color:"#5dc7ff"}]},{featureType:"road",stylers:[{visibility:"off"}]}];var y=[{stylers:[{lightness:40},{visibility:"on"},{gamma:1.1},{weight:0.9}]},{elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"water",stylers:[{color:"#5dc7ff"}]},{featureType:"road",stylers:[{visibility:"on"}]},{featureType:"road",elementType:"labels",stylers:[{saturation:-30}]}];var n={zoom:17,minZoom:2,scrollwheel:false,panControl:false,draggable:true,zoomControl:false,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},scaleControl:false,mapTypeControl:false,streetViewControl:false,center:centerMap,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,h]},mapTypeId:h};if(g(window).width()<768){n.center=mobileCenterMap}if(googleMaps=="logistics"){n.zoom=5;n.zoomControl=true}a=new google.maps.Map(document.getElementById("canvas-map"),n);var o=new google.maps.Marker({position:eventPlace,animation:google.maps.Animation.DROP,icon:icon,map:a});e.push(o);var p={name:"Default Style"};var s={name:"Zoomed Style"};var r=new google.maps.StyledMapType(x,p);var q=new google.maps.StyledMapType(y,s);a.mapTypes.set("default",r);a.mapTypes.set("zoomed",q);if(googleMaps==="logistics"){a.setMapTypeId("default");var w=(document.getElementById("location-input"));b=new google.maps.places.Autocomplete(w);google.maps.event.addListener(b,"place_changed",function(){o.setVisible(false);var C=b.getPlace();if(C.geometry=="undefined"||!C.geometry){return}var B="";if(C.address_components){B=[(C.address_components[0]&&C.address_components[0].short_name||""),(C.address_components[1]&&C.address_components[1].short_name||""),(C.address_components[2]&&C.address_components[2].short_name||"")].join(" ")}c.geocode({address:B},function(E,D){if(D==google.maps.GeocoderStatus.OK){k=E[0].geometry.location;A(k,"TRANSIT")}else{alert("Geocode was not successful for the following reason: "+D)}})})}else{a.setMapTypeId("zoomed")}function A(B,D){var C={origin:B,destination:eventPlace,travelMode:google.maps.TravelMode[D]};i.route(C,function(F,E){if(E==google.maps.DirectionsStatus.OK){a.setMapTypeId("zoomed");l.setMap(a);l.setDirections(F);var I=F.routes[0].legs[0];m(I.start_location);m(I.end_location);g("#distance").text(I.distance.text);g("#estimateTime").text(I.duration.text);g("#mode-select").val(D);g("#mode").removeClass("hidden");var H=g("#mode-icon use").attr("xlink:href");H=H.substring(0,H.indexOf("#")+1)+"icon-"+D.toLowerCase();g("#mode-icon use").attr("xlink:href",H)}else{if(E!=google.maps.DirectionsStatus.OK&&D!="DRIVING"){A(B,"DRIVING")}else{var J=j.getPath();J.push(B);J.push(eventPlace);m(B);m(eventPlace);var G=new google.maps.LatLngBounds();G.extend(B);G.extend(eventPlace);a.fitBounds(G);j.setMap(a);var K=Math.round(google.maps.geometry.spherical.computeDistanceBetween(B,eventPlace)/1000);g("#distance").text(K+" km");g("#estimateTime").text("");g("#find-flight").removeClass("hidden");g("#mode").addClass("hidden")}}});z();g("#find-way").addClass("location-active");u(B);g("#find-way h3").removeClass("fadeInUp").addClass("fadeOutDown")}function m(B){var C=new google.maps.Marker({position:B,map:a,icon:icon});e.push(C)}function v(C){var B=new google.maps.Marker({position:C,map:a});e.push(B)}function z(){for(var B=0;BD)?1:-1;for(var C=0;C1500){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 r=g(this).scrollTop();var v=g("#top-header");var u=g("#logo-header .logo");var s=g(".right-nav-button");var t=v.height()+g(".track-header").height();if(r>=100){v.addClass("after-scroll");u.removeClass("logo-light").addClass("logo-dark")}else{v.removeClass("after-scroll");u.removeClass("logo-dark").addClass("logo-light")}if(r>=g(".top-section").height()){s.removeClass("right-nav-button-hidden")}else{s.addClass("right-nav-button-hidden")}g(".slot").each(function(){var x=g(this).offset().top-r;var w=t+g(this).find(".slot-title").height();if(x<=w&&x>=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")}});var p=1;g(document).on("touchmove",function(r){if(p==0){r.preventDefault()}else{return true}});g("body").on("touchmove",".scrollable",function(r){r.stopPropagation()});function o(){if(p==0){g("body").removeClass("disable-scrolling");p=1}else{g("body").addClass("disable-scrolling");p=0}}g(function(){g("a[href*=#]:not([href=#])").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var r=g(this.hash);r=r.length?r:g("[name="+this.hash.slice(1)+"]");if(r.length){g("html,body").animate({scrollTop:r.offset().top},1000);return false}}})});g(function(){g("a[href=#]").click(function(){event.preventDefault()})});g(function(){var u,s,t,x,w,r,v;v=g(".appear-animation");for(w=0,r=v.length;w1){g(this).closest(".speaker-item").find(".slider-next-item").removeClass("hidden")}});g(".slider-next-item").click(function(){var r=g(this).closest(".speaker-item");var s=r.find(".slider-current-item").next();if(s.length){s.addClass("slider-current-item").removeClass("hidden");r.find(".slider-current-item").first().removeClass("slider-current-item").addClass("hidden")}else{r.find(".slider-item").first().addClass("slider-current-item").removeClass("hidden");r.find(".slider-current-item").last().removeClass("slider-current-item").addClass("hidden")}});if(typeof twitterFeedUrl!=="undefined"){g.getJSON(twitterFeedUrl,function(r){g.each(r,function(t,s){var u='";g("#tweets").append(u)});q()});function n(w){var t,s,r,v,u;s=/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;t=w.replace(s,'$1');r=/(^|[^\/])(www\.[\S]+(\b|$))/gim;t=t.replace(r,'$1$2');v=/#(\S*)/g;t=t.replace(v,'#$1');u=/\B@([\w-]+)/gm;t=t.replace(u,'@$1');return t}function q(){var r=g("#tweets").find(".tweet"),t=0;g(r.get(0)).removeClass("hidden");function u(){var v=(++t%r.length);g(r.get(v-1)).addClass("hidden");g(r.get(v)).removeClass("hidden")}var s=setInterval(u,5000)}}});function d(){var m=document.createElement("script");m.type="text/javascript";m.async=true;m.src="https://apis.google.com/js/platform.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(m,n)}if(typeof googleMaps!=="undefined"){var a,b,l,c,j,k;var e=[];var i=new google.maps.DirectionsService();var h="custom_style";function f(){l=new google.maps.DirectionsRenderer({suppressMarkers:true});c=new google.maps.Geocoder();j=new google.maps.Polyline({strokeColor:"#03a9f4",strokeOpacity:1,strokeWeight:2});var x=[{stylers:[{lightness:40},{visibility:"on"},{gamma:0.9},{weight:0.4}]},{elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"water",stylers:[{color:"#5dc7ff"}]},{featureType:"road",stylers:[{visibility:"off"}]}];var y=[{stylers:[{lightness:40},{visibility:"on"},{gamma:1.1},{weight:0.9}]},{elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"water",stylers:[{color:"#5dc7ff"}]},{featureType:"road",stylers:[{visibility:"on"}]},{featureType:"road",elementType:"labels",stylers:[{saturation:-30}]}];var n={zoom:17,minZoom:2,scrollwheel:false,panControl:false,draggable:true,zoomControl:false,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},scaleControl:false,mapTypeControl:false,streetViewControl:false,center:centerMap,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,h]},mapTypeId:h};if(g(window).width()<768){n.center=mobileCenterMap}if(googleMaps=="logistics"){n.zoom=5;n.zoomControl=true}a=new google.maps.Map(document.getElementById("canvas-map"),n);var o=new google.maps.Marker({position:eventPlace,animation:google.maps.Animation.DROP,icon:icon,map:a});e.push(o);var p={name:"Default Style"};var s={name:"Zoomed Style"};var r=new google.maps.StyledMapType(x,p);var q=new google.maps.StyledMapType(y,s);a.mapTypes.set("default",r);a.mapTypes.set("zoomed",q);if(googleMaps==="logistics"){a.setMapTypeId("default");var w=(document.getElementById("location-input"));b=new google.maps.places.Autocomplete(w);google.maps.event.addListener(b,"place_changed",function(){o.setVisible(false);var C=b.getPlace();if(C.geometry=="undefined"||!C.geometry){return}var B="";if(C.address_components){B=[(C.address_components[0]&&C.address_components[0].short_name||""),(C.address_components[1]&&C.address_components[1].short_name||""),(C.address_components[2]&&C.address_components[2].short_name||"")].join(" ")}c.geocode({address:B},function(E,D){if(D==google.maps.GeocoderStatus.OK){k=E[0].geometry.location;A(k,"TRANSIT")}else{alert("Geocode was not successful for the following reason: "+D)}})})}else{a.setMapTypeId("zoomed")}function A(B,D){var C={origin:B,destination:eventPlace,travelMode:google.maps.TravelMode[D]};i.route(C,function(F,E){if(E==google.maps.DirectionsStatus.OK){a.setMapTypeId("zoomed");l.setMap(a);l.setDirections(F);var I=F.routes[0].legs[0];m(I.start_location);m(I.end_location);g("#distance").text(I.distance.text);g("#estimateTime").text(I.duration.text);g("#mode-select").val(D);g("#mode").removeClass("hidden");var H=g("#mode-icon use").attr("xlink:href");H=H.substring(0,H.indexOf("#")+1)+"icon-"+D.toLowerCase();g("#mode-icon use").attr("xlink:href",H)}else{if(E!=google.maps.DirectionsStatus.OK&&D!="DRIVING"){A(B,"DRIVING")}else{var J=j.getPath();J.push(B);J.push(eventPlace);m(B);m(eventPlace);var G=new google.maps.LatLngBounds();G.extend(B);G.extend(eventPlace);a.fitBounds(G);j.setMap(a);var K=Math.round(google.maps.geometry.spherical.computeDistanceBetween(B,eventPlace)/1000);g("#distance").text(K+" km");g("#estimateTime").text("");g("#find-flight").removeClass("hidden");g("#mode").addClass("hidden")}}});z();g("#find-way").addClass("location-active");u(B);g("#find-way h3").removeClass("fadeInUp").addClass("fadeOutDown")}function m(B){var C=new google.maps.Marker({position:B,map:a,icon:icon});e.push(C)}function v(C){var B=new google.maps.Marker({position:C,map:a});e.push(B)}function z(){for(var B=0;BD)?1:-1;for(var C=0;C