function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+31536000000); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } $(document).ready(function ($) { if (!readCookie('privacy')) { $('.privacy-bar').show(); } $('.closepp').click(function() { $('.privacy-bar').hide(); createCookie('privacy', true, 1) return false; }); $(window).resize(function() { var bodyheight = $(this).height(); $(".head_banner, .new-banner-2019").height(bodyheight); //alert('grc summit'); }).resize(); // Go to top $(window).scroll(function(){ if($(window).scrollTop() > 60) { $(".scroll-top").fadeIn(); } else { $(".scroll-top").fadeOut(); } }); $(window).scroll(function() { if (jQuery(this).scrollTop() > 200) { //$(".livestream-btm-lft").show(); jQuery('.livestream-btm-lft').stop().animate({ bottom: '0px' }); } else { jQuery('.livestream-btm-lft').stop().animate({ bottom: '-160px' }); } if (jQuery(this).scrollTop() > 1200) { jQuery('.livestream-btm-lft').stop().animate({ bottom: '-160px' }); } if (jQuery(this).scrollTop() > 2000) { jQuery('.livestream-btm-lft').stop().animate({ bottom: '0px' }); } $(".clse").click(function(){ $(".livestream-btm-lft").hide(); }); }); $(".scroll-top").hide(); $(".scroll-top").click(function(){ $('html, body').animate({scrollTop : 0},800); }); $(window).resize(function() { var bodyheight = $(this).height(); $(".fluid_bg").height(bodyheight); //alert('grc summit'); }).resize(); // Main banner //$('.main_bnr_rotation').slick({ // dots: true, // arrows: false, // autoplay: false, // autoplaySpeed: 5000, // draggable: false, // infinite: true, // speed: 2000, // slidesToShow: 1, // slidesToScroll: 1, // responsive:[ // { // breakpoint: 1024, // settings: { // slidesToShow: 1, // slidesToScroll: 1, // infinite: true, // dots: true // } // }, // { // breakpoint: 600, // settings: { // slidesToShow: 1, // slidesToScroll: 1, // infinite: true, // dots: true // } // }, // { // breakpoint: 480, // settings: { // slidesToShow: 1, // slidesToScroll: 1, // // } // } // ] // }); $('.slider').slick({ autoplay: true, speed: 2000, slidesToShow: 1, slidesToScroll: 1, arrows: false, fade: false, asNavFor: '.slider-nav-thumbnails', }); $('.slider-nav-thumbnails').slick({ slidesToShow: 5, slidesToScroll: 1, asNavFor: '.slider', dots: true, focusOnSelect: true }); //remove active class from all thumbnail slides $('.slider-nav-thumbnails .slick-slide').removeClass('slick-active'); //set active class to first thumbnail slides $('.slider-nav-thumbnails .slick-slide').eq(0).addClass('slick-active'); // On before slide change match active thumbnail to current slide $('.slider').on('beforeChange', function (event, slick, currentSlide, nextSlide) { var mySlideNumber = nextSlide; $('.slider-nav-thumbnails .slick-slide').removeClass('slick-active'); $('.slider-nav-thumbnails .slick-slide').eq(mySlideNumber).addClass('slick-active'); }); //UPDATED //$('.slider').on('afterChange', function(event, slick, currentSlide){ // $('.content').hide(); // $('.content[data-id=' + (currentSlide + 1) + ']').show(); //}); // PAST SUMMITS $('.responsive').slick({ dots: false, autoplay: false, autoplaySpeed: 6000, draggable: false, infinite: true, speed: 2000, slidesToShow: 3, slidesToScroll: 1, responsive:[ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 1, infinite: true, dots: true, autoplay: true, arrows: true, } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 1, infinite: true, dots: true, autoplay: true, arrows: true, } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, dots: true, arrows: false, } } ] }); // PAST KEYNOTES $('.keynotes').slick({ dots: true, autoplay: true, autoplaySpeed: 9000, draggable: false, infinite: true, speed: 2000, slidesToShow: 5, slidesToScroll: 5, responsive:[ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: true, dots: true, arrows: false, } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2, infinite: true, dots: true, arrows: false, } }, { breakpoint: 480, settings: { slidesToShow: 2, slidesToScroll: 2, arrows: false, } } ] }); }); // Google Analytics // (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ // (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), // m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) // })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); // // ga('create', 'UA-36990274-1', 'auto'); // ga('send', 'pageview'); // Crazy egg // setTimeout(function(){var a=document.createElement("script"); // var b=document.getElementsByTagName("script")[0]; // a.src=document.location.protocol+"//script.crazyegg.com/pages/scripts/0015/6638.js?"+Math.floor(new Date().getTime()/3600000); // a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1); // Zopim Live Chat Script //(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': //new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], //j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= //'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); //})(window,document,'script','dataLayer','GTM-MZPC4M2');