(function($){$(function(){var ScrollingButton={init:function(options){var self=this;if(self.offcanvasButton=options.elementToggle,self.offcanvasButtonOpen=options.elementOpen,self.offcanvasButtonClose=options.elementClose,$(".offcanvas-left").length==0)return self.offcanvasButton.remove(),self.offcanvasButtonOpen.remove(),self.offcanvasButtonClose.remove(),!1;self.UpdateButtonTop(),self.scrollPos=$(document).scrollTop(),self.isButtonScrolling=!1,self.isOffcanvasOpen=!1,self.setUpEventHandlers()},setUpEventHandlers:function(){var self=this;enquire.register("(max-width: 767px)",{match:function(){self.UpdateButtonTop()}}),self.offcanvasButton.on("click",function(e){self.toggleOffCanvas()}),self.offcanvasButtonClose.on("click",function(e){self.closeOffCanvas(),self.positionToggleButton()}),self.offcanvasButtonOpen.on("click",function(e){self.openOffCanvas()}),$(window).on("scroll",function(){scrollPos=$(document).scrollTop(),scrollPos>self.buttonTopDefault?self.isButtonScrolling=!0:self.isButtonScrolling=!1,self.positionToggleButton()})},openOffcanvas:function(){var self=this;$(".offcanvas-left").addClass("open"),$(".collection-wrapper").addClass("pushed-by-offcanvas"),self.isOffcanvasOpen=!0,self.isButtonScrolling&&self.positionToggleButtonHorizontally()},closeOffCanvas:function(){var self=this;$(".offcanvas-left").removeClass("open"),$(".collection-wrapper").removeClass("pushed-by-offcanvas"),self.isOffcanvasOpen=!1,self.positionToggleButton()},toggleOffCanvas:function(){var self=this;$(".offcanvas-left").toggleClass("open"),$(".collection-wrapper").toggleClass("pushed-by-offcanvas"),self.isOffcanvasOpen=!self.isOffcanvasOpen,self.isOffcanvasOpen||self.positionToggleButton()},positionToggleButtonHorizontally:function(){var self=this;self.isButtonScrolling?self.offcanvasButton.css({position:"fixed",left:"0"}):self.offcanvasButton.css({left:""})},positionToggleButtonVertically:function(){var self=this;self.isButtonScrolling?self.offcanvasButton.css({top:"20px",position:"fixed"}):self.offcanvasButton.css({top:"",position:"relative"})},positionToggleButton:function(){var self=this;self.positionToggleButtonVertically(),self.positionToggleButtonHorizontally()},UpdateButtonTop:function(){var self=this;self.buttonTopDefault=self.offcanvasButton.offset().top}};ScrollingButton.init({elementToggle:$(".offcanvas-toggle"),elementOpen:$(".offcanvas-open"),elementClose:$(".offcanvas-close")})})})(jQuery);
//# sourceMappingURL=/cdn/shop/t/2/assets/dynamic-sidebar.js.map?v=137066162772230596121448030256