Jump to content

Downloads

View All Files

What's New

There have been no uploaded files yet.

Highest Rated

No files have been rated yet.

Most Downloaded

No files have been downloaded yet.

×
/* Navigation */ function ipsfocusNavigation() { var navwidth = 0; var morewidth = $('.ipsNavBar_primary .focus-nav-more').outerWidth(true); $('.ipsNavBar_primary > ul > li:not(.focus-nav-more)').each(function() { navwidth += $(this).outerWidth( true ) + 2; }); var availablespace = $('.ipsNavBar_primary').outerWidth(true) - morewidth; if (availablespace > 0 && navwidth > availablespace) { var lastItem = $('.ipsNavBar_primary > ul > li:not(.focus-nav-more)').last(); lastItem.attr('data-width', lastItem.outerWidth(true)); lastItem.prependTo($('.ipsNavBar_primary .focus-nav-more > ul')); ipsfocusNavigation(); } else { var firstMoreElement = $('.ipsNavBar_primary li.focus-nav-more li').first(); if (navwidth + firstMoreElement.data('width') < availablespace) { firstMoreElement.insertBefore($('.ipsNavBar_primary .focus-nav-more')); } } if ($('.focus-nav-more li').length > 0) { $('.focus-nav-more').removeClass('focus-nav-hidden'); } else { $('.focus-nav-more').addClass('focus-nav-hidden'); } } $(window).on('load',function(){ $(".ipsNavBar_primary").removeClass("focus-nav-loading"); ipsfocusNavigation(); }); $(window).on('resize',function(){ ipsfocusNavigation(); }); // Make hover navigation work with touch devices // http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly ;(function(e,t,n,r){e.fn.doubleTapToGo=function(r){if(!("ontouchstart"in t)&&!navigator.msMaxTouchPoints&&!navigator.userAgent.toLowerCase().match(/windows phone os 7/i))return false;this.each(function(){var t=false;e(this).on("click",function(n){var r=e(this);if(r[0]!=t[0]){n.preventDefault();t=r}});e(n).on("click touchstart MSPointerDown",function(n){var r=true,i=e(n.target).parents();for(var s=0;s ul > li:has(ul)').doubleTapToGo(); // Assign random gradient position var randomBackgroundPosition = Math.floor(Math.random()*10000); $("#gradient").addClass("applied").css('background-position', '-' + randomBackgroundPosition + 'px 0'); // Animate background image $("body").addClass("animatedBackground"); // Pause animation $("#gradient_pause").click(function(){ $("body").removeClass("animatedBackground"); ips.utils.cookie.set( 'dispersion_pause', '1', true ); return false; }); // Play animation $("#gradient_play").click(function(){ $("body").addClass("animatedBackground"); ips.utils.cookie.unset( 'dispersion_pause' ); return false; }); // Play animation depending on cookie var animationCookie = ips.utils.cookie.get( 'dispersion_pause' ); if ( animationCookie ){ $("body").removeClass('animatedBackground'); } else { $("body").addClass('animatedBackground'); } // Enable greyscale $("#gradient_grey").click(function(){ $("body").addClass("greyscaleBackground"); ips.utils.cookie.set( 'dispersion_grey', '1', true ); return false; }); // Enable colour $("#gradient_colour").click(function(){ $("body").removeClass("greyscaleBackground"); ips.utils.cookie.unset( 'dispersion_grey' ); return false; }); // Toggle greyscale depending on cookie var greyscaleCookie = ips.utils.cookie.get( 'dispersion_grey' ); if ( greyscaleCookie ){ $("body").addClass('greyscaleBackground'); } else { $("body").removeClass('greyscaleBackground'); } if (detectDevice() > 25){ var headerHeight = 110; var minHeaderHeight = 60; var heightElements = '#header, a.logo'; var maxHeight = 'a.logo img'; var lineHeightElements = 'a.logo.justImage .vAlign'; $(window).scroll(function(){ var amountScrolled = $(window).scrollTop(); var maxScrollAmount = headerHeight - minHeaderHeight; var newHeight = headerHeight - amountScrolled; if((amountScrolled >= 0) && (amountScrolled <= maxScrollAmount)){ $(heightElements).css('height', newHeight + 'px'); $(maxHeight).css('max-height', newHeight + 'px'); $(lineHeightElements).css('line-height', newHeight + 'px'); } else if($(window).scrollTop() > maxScrollAmount){ $(heightElements).css( 'height', minHeaderHeight + 'px'); $(lineHeightElements).css('line-height', minHeaderHeight + 'px'); $(maxHeight).css('max-height', minHeaderHeight + 'px'); } }); }; });