var vcGridStylePagination=null;(function($){vcGridStylePagination=function(grid){this.grid=grid;this.settings=grid.settings;this.$el=false;this.$content=false;this.filterValue=null;this.isLoading=false;this.htmlCache=false;this.$loader=$('
');this.$firstSlideItems;this.init();};vcGridStylePagination.prototype.init=function(){_.bindAll(this,'addItems','initCarousel');};vcGridStylePagination.prototype.setIsLoading=function(){this.$loader.show();this.isLoading=true;};vcGridStylePagination.prototype.unsetIsLoading=function(){this.isLoading=false;this.$loader.hide();};vcGridStylePagination.prototype.render=function(){this.$el=this.grid.$el;this.$content=this.$el;this.$content.append(this.$loader);this.setIsLoading();this.grid.ajax({},this.addItems);};vcGridStylePagination.prototype.filter=function(filter){filter=_.isUndefined(filter)||'*'===filter?'':filter;if(this.filterValue==filter){return false;} var $html;if(this.$content.data('owl.vccarousel')){this.$content.off('initialized.owl.vccarousel');this.$content.off('changed.owl.vccarousel');this.$content.data('vcPagination')&&this.$content.data('vcPagination').twbsPagination('destroy');this.$content.data('owl.vccarousel').destroy();} this.$content.empty();$html=$('.vc_grid-item',this.htmlCache);if(''!==filter){$html=$html.filter(filter);} this.filterValue=filter;this.buildSlides($html.addClass('vc_visible-item'));};vcGridStylePagination.prototype.buildSlides=function($html){var i,j,tempArray,chunk=parseInt(this.settings.items_per_page);for(i=0,j=$html.length;i