!function(t,s,i,n){t.parallaxGallery=function(n,e){var l={speed:.15,speedTablet:.15,speedMobile:.15,columns:3,columnsTablet:2,columnsMobile:1,scope:t(s),transformItem:null,disableOn:!1,breakpoints:{mobile:768,tablet:1024}},a=this;a.opts={};var o=null,h=t(n),r=t(i),d=null,c=.15,p=t(s).height(),u=(r.height(),h.find("> *"));a.init=function(){a.opts=t.extend({},l,e),a._construct()},a._construct=function(){o=a.opts.scope,d=o.scrollTop(),a.setup(),a.update(),a.events()},a.setup=function(){c<=0&&(c=.001),o.width()<a.opts.breakpoints.tablet?o.width()<a.opts.breakpoints.mobile?(a.setupColumns(a.opts.columnsMobile),c=a.opts.speedMobile):(a.setupColumns(a.opts.columnsTablet),c=a.opts.speedTablet):(a.setupColumns(a.opts.columns),c=a.opts.speed),c<0&&(c=.001)},a.setupColumns=function(s){u.each(function(i){var n=a.opts.transformItem?t(this).find(a.opts.transformItem):t(this);n.removeClass("is--3d"),1==s||3==s?t(this).is(":nth-child(even)")&&n.addClass("is--3d"):2==s?(t(this).is(":nth-child(4n+2)")||t(this).is(":nth-child(4n+3)"))&&n.addClass("is--3d"):4==s?(t(this).is(":nth-child(8n+2)")||t(this).is(":nth-child(8n+4)")||t(this).is(":nth-child(8n+5)")||t(this).is(":nth-child(8n+7)"))&&n.addClass("is--3d"):5==s?(t(this).is(":nth-child(10n+2)")||t(this).is(":nth-child(10n+4)")||t(this).is(":nth-child(10n+6)")||t(this).is(":nth-child(10n+8)")||t(this).is(":nth-child(10n+10)"))&&n.addClass("is--3d"):6==s&&(t(this).is(":nth-child(12n+2)")||t(this).is(":nth-child(12n+4)")||t(this).is(":nth-child(12n+6)")||t(this).is(":nth-child(12n+7)")||t(this).is(":nth-child(12n+9)")||t(this).is(":nth-child(12n+11)"))&&n.addClass("is--3d")})},a.events=function(){o.on("scroll",a.update),o.on("resize",function(){p=t(s).height(),a.setup(),a.update()})},a.update=function(){if(a.opts.disableOn&&o.width()<a.opts.breakpoints[a.opts.disableOn])return void a.clearTransforms();var s=o.scrollTop();u.each(function(i){var n=a.opts.transformItem?t(this).find(a.opts.transformItem):t(this);if(n.length){var e=n.outerHeight(),l=(n.outerWidth(),n.is(".is--3d")),o=n.offset().top,h=o+e/2,r=l?.3*c/2:.3*c,d=(s-h+p/2)*r;TweenMax.set(n,{y:d})}})},a.clearTransforms=function(){var t=a.opts.transformItem?h.find(a.opts.transformItem):u;TweenMax.set(t,{clearProps:"all"})},a.destroy=function(){a.clearTransforms(),o.off("scroll",a.update),h.removeData("parallaxGallery")},a.init()},t.fn.parallaxGallery=function(s){return this.each(function(){if(t.fn.parallaxGallery.destroy=function(){void 0!==i&&(t(this).data("parallaxGallery").destroy(),t(this).removeData("parallaxGallery"))},void 0===t(this).data("parallaxGallery")){var i=new t.parallaxGallery(this,s);t(this).data("parallaxGallery",i)}})}}(jQuery,window,document);