// jQuery(function() { jQuery(".menu-wrap").addClass("navbar"); jQuery(".menu").addClass("nav"); jQuery(".menu ul").addClass("dropdown-menu"); // on the first level li, make it a typical bootstrap top menu drop down jQuery(".menu > li").each(function() { if (jQuery(this).children("ul").length > 0) { jQuery(this).addClass("dropdown"); jQuery(this).children("a").addClass("dropdown-toggle"); jQuery(this).children("a").attr("data-toggle", "dropdown"); jQuery(this).children("a").html(jQuery(this).children("a").html() + ''); } }); // create sub-level drop downs jQuery(".menu > li > ul li").each(function() { if (jQuery(this).children("ul").length > 0) { jQuery(this).addClass("dropdown-submenu"); jQuery(this).children("a").addClass("dropdown-toggle"); jQuery(this).children("ul").addClass("dropdown-menu"); } }); jQuery(document).ready(function() { //H andles menu drop down jQuery('.dropdown-menu').find('form').click(function(e) { e.stopPropagation(); }); jQuery('.dropdown-menu').on('touchstart.dropdown.data-api').click(function(e) { e.stopPropagation(); }); }); // ADD SLIDEDOWN ANIMATION TO DROPDOWN // jQuery('.dropdown').on('show.bs.dropdown', function(e) { jQuery(this).find('.dropdown-menu').first().stop(true, true).slideDown(); }); // ADD SLIDEUP ANIMATION TO DROPDOWN // jQuery('.dropdown').on('hide.bs.dropdown', function(e) { jQuery(this).find('.dropdown-menu').first().stop(true, true).slideUp(); }); jQuery(function() { var menuside_ul = jQuery('.menuside > li > ul'), menuside_a = jQuery('.menuside > li > a'); menuside_ul.hide(); menuside_a.click(function(e) { if (jQuery(this).attr("href") == "#") { e.preventDefault(); if (!jQuery(this).hasClass('active')) { menuside_a.removeClass('active'); menuside_ul.filter(':visible').slideUp('normal'); jQuery(this).addClass('active').next().stop(true, true).slideDown('normal'); } else { jQuery(this).removeClass('active'); jQuery(this).next().stop(true, true).slideUp('normal'); } } }); }); jQuery(document).ready(function($){ var isLateralNavAnimating = false; //open/close lateral navigation $('.menupush-nav-trigger').on('click', function(event){ event.preventDefault(); //stop if nav animation is running if( !isLateralNavAnimating ) { if($(this).parents('.csstransitions').length > 0 ) isLateralNavAnimating = true; $('body').toggleClass('navigation-is-open'); $('.menupush-navigation-wrapper').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(){ //animation is over isLateralNavAnimating = false; }); } }); }); !function (jQuery) { jQuery(function(){ // carousel demo jQuery('#ibc').carousel({ interval: 80000 }) }) }(window.jQuery) // circle sizer circleSizer = function () { circleSize(".ibc-image-wrapper", ".ibc-circle1", .18); circleSize(".ibc-image-wrapper", ".ibc-circle2", .10); circleSize(".ibc-image-wrapper", ".ibc-circle3", .05); }; function circleSize(wrapper, target, percentage) { var fontSize = jQuery(wrapper).width() * percentage; // 10% of container width jQuery(target).css('font-size', fontSize ); } jQuery(window).resize(circleSizer); jQuery(document).ready(circleSizer); (function( $ ) { //Function to animate slider captions function doAnimations( elems ) { //Cache the animationend event in a variable var animEndEv = 'webkitAnimationEnd animationend'; elems.each(function () { var $this = $(this), $animationType = $this.data('animation'); $this.addClass($animationType).one(animEndEv, function () { $this.removeClass($animationType); }); }); } //Variables on page load var $myCarousel = $('.bs-animate'), $firstAnimatingElems = $myCarousel.find('.item:first').find("[data-animation ^= 'animated']"); //Initialize carousel $myCarousel.carousel(); //Animate captions in first slide on page load doAnimations($firstAnimatingElems); //Pause carousel $myCarousel.carousel('pause'); //Other slides to be animated on carousel slide event $myCarousel.on('slide.bs.carousel', function (e) { var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']"); doAnimations($animatingElems); }); })(jQuery); jQuery(document).ready(function() { jQuery.fn.countTo && (jQuery(".count").countTo(), jQuery(".appear-count").appear(), jQuery(".appear-count").on("appear", function() { jQuery(this).hasClass("activated") || (jQuery(".count").countTo(), jQuery(this).addClass("activated")) })) }); // Chain of Responsibility pattern. Creates base class that can be overridden. if (typeof Object.create !== "function") { Object.create = function(obj) { function F() {} F.prototype = obj; return new F(); }; } (function($, window, document) { var loadAPI = function loadAPI(callback) { // Load Youtube API var tag = document.createElement('script'), head = document.getElementsByTagName('head')[0]; tag.src = 'https://web.archive.org/web/20180817232613/http://www.youtube.com/iframe_api'; head.appendChild(tag); // Clean up Tags. head = null; tag = null; iframeIsReady(callback); }, iframeIsReady = function iframeIsReady(callback) { // Listen for Gobal YT player callback if (typeof YT === 'undefined' && typeof window.loadingPlayer === 'undefined') { // Prevents Ready Event from being called twice window.loadingPlayer = true; // Creates deferred so, other players know when to wait. window.dfd = $.Deferred(); window.onYouTubeIframeAPIReady = function() { window.onYouTubeIframeAPIReady = null; window.dfd.resolve( "done" ); callback(); }; } else if (typeof YT === 'object') { callback(); } else { window.dfd.done(function( name ) { callback(); }); } }; // YTPlayer Object YTPlayer = { player: null, // Defaults defaults: { ratio: 16 / 9, videoId: 'zaIy-W01fuo', mute: true, repeat: true, width: $(window).width(), playButtonClass: 'YTPlayer-play', pauseButtonClass: 'YTPlayer-pause', muteButtonClass: 'YTPlayer-mute', volumeUpClass: 'YTPlayer-volume-up', volumeDownClass: 'YTPlayer-volume-down', start: 3, pauseOnScroll: false, fitToBackground: true, playerVars: { modestbranding: 1, autoplay: 1, controls: 0, showinfo: 0, wmode: 'transparent', branding: 0, rel: 0, autohide: 0 }, events: null }, init: function init(node, userOptions) { var self = this; self.userOptions = userOptions; self.$body = $('body'), self.$node = $(node), self.$window = $(window); // Setup event defaults with the reference to this self.defaults.events = { 'onReady': function(e) { self.onPlayerReady(e); // setup up pause on scroll if (self.options.pauseOnScroll) { self.pauseOnScroll(); } // Callback for when finished if (typeof self.options.callback == 'function') { self.options.callback.call(this); } }, 'onStateChange': function(e) { if (e.data === 1) { self.$node.addClass('loaded'); } else if (e.data === 0 && self.options.repeat) { // video ended and repeat option is set true self.player.seekTo(self.options.start); } } } self.options = $.extend(true, {}, self.defaults, self.userOptions); self.options.height = Math.ceil(self.options.width / self.options.ratio); self.ID = (new Date()).getTime(); self.holderID = 'YTPlayer-ID-' + self.ID; if (self.options.fitToBackground) { self.createBackgroundVideo(); } else { self.createContainerVideo(); } // Listen for Resize Event self.$window.on('resize.YTplayer' + self.ID, function() { self.resize(self); }); loadAPI(self.onYouTubeIframeAPIReady.bind(self)); self.resize(self); return self; }, pauseOnScroll: function pauseOnScroll() { var self = this; self.$window.on('scroll.YTplayer' + self.ID, function() { var state = self.player.getPlayerState(); if (state === 1) { self.player.pauseVideo(); } }); self.$window.scrollStopped(function(){ var state = self.player.getPlayerState(); if (state === 2) { self.player.playVideo(); } }); }, createContainerVideo: function createContainerVideo() { var self = this; var $YTPlayerString = $('