This repository has been archived on 2022-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
oldwebsite/assets/js/main.js

1 line
1.5 KiB
JavaScript

(function($){var $window=$(window),$body=$('body'),$header=$('#header'),$footer=$('#footer'),$main=$('#main'),settings={parallax:true,parallaxFactor:20};breakpoints({xlarge:['1281px','1800px'],large:['981px','1280px'],medium:['737px','980px'],small:['481px','736px'],xsmall:[null,'480px']});$window.on('load',function(){window.setTimeout(function(){$body.removeClass('is-preload')},100)});if(browser.mobile){$body.addClass('is-touch');window.setTimeout(function(){$window.scrollTop($window.scrollTop()+1)},0)}breakpoints.on('<=medium',function(){$footer.insertAfter($main)});breakpoints.on('>medium',function(){$footer.appendTo($header)});if(browser.name=='ie'||browser.mobile){settings.parallax=false}if(settings.parallax){breakpoints.on('<=medium',function(){$window.off('scroll.strata_parallax');$header.css('background-position','')});breakpoints.on('>medium',function(){$header.css('background-position','left 0px');$window.on('scroll.strata_parallax',function(){$header.css('background-position','left '+(-1*(parseInt($window.scrollTop())/settings.parallaxFactor))+'px')})});$window.on('load',function(){$window.triggerHandler('scroll')})}$window.on('load',function(){$('#two').poptrox({caption:function($a){return $a.next('h3').text()},overlayColor:'#2c2c2c',overlayOpacity:0.85,popupCloserText:'',popupLoaderText:'',selector:'.work-item a.image',usePopupCaption:true,usePopupDefaultStyling:false,usePopupEasyClose:false,usePopupNav:true,windowMargin:(breakpoints.active('<=small')?0:50)})})})(jQuery);