$(function(){var MarketPlaceView=function(){this.init=function(){this.listViewButton=$('#list_view_button');this.gridViewButton=$('#grid_view_button');this.items=$('.ui.items .item');this.cookieOptions={path:'/',maxAge:60*60*24*30,};this.events();};this.events=function(){var _this=this;this.listViewButton.on('click',function(){_this.items.addClass('list-view');_this.gridViewButton.removeClass('active');_this.listViewButton.addClass('active');Cookie.set('productview','list-view',_this.cookieOptions);});this.gridViewButton.on('click',function(){_this.items.removeClass('list-view');_this.listViewButton.removeClass('active');_this.gridViewButton.addClass('active');Cookie.remove('productview',{path:'/'});});};this.init();};var market=new MarketPlaceView();});