define(['jquery','slick'],function($){'use strict';var category={};category.varSet={_itemSelected:'.category-selected h2',_dropDownList:'.category-list',_itemDropDown:'.category-list > li',_itemDropDownFirstChild:'.category-list > li:first-child',_categoryList:'.wrapper-category-items',_categoryItems:'.wrapper-category-items .category-item',_categoryItemsFirstChild:'.wrapper-category-items .category-item:first-child',_categoryItemsDetails:'.wrapper-category-items .category-item .category-links-item-details',_categoryImageWrapper:'.wrapper-image'};category.init=function(){category.createDropDown();category.getDropDownCatID();category.changeCategoryList();category.initSlider();};category.createDropDown=function(){$(category.varSet._itemSelected).on("click",function(){if(!$(category.varSet._dropDownList).is(":visible")){$(category.varSet._itemSelected).addClass("active");}
$(category.varSet._dropDownList).slideToggle(function(){if(!$(category.varSet._dropDownList).is(":visible")){$(category.varSet._itemSelected).removeClass("active");}});});};category.getDropDownCatID=function(){var catID;$(category.varSet._itemDropDown).each(function(){catID=$(this).attr('data-cat-id');});};category.getCatItemsCatID=function(){var catID;var catIDs=[];$(category.varSet._categoryItems).each(function(){catID=$(this).attr('data-cat-id');catIDs.push(catID);});return catIDs;};category.initSlider=function(){$(category.varSet._categoryImageWrapper).not('.slick-initialized').slick({infinite:false,slidesToShow:1,slidesToScroll:1,arrows:true,autoplay:false,prevArrow:'',nextArrow:''});};category.changeCategoryList=function(){var catID;var catName;catName=$(category.varSet._itemDropDownFirstChild).text();$(category.varSet._itemSelected).text(catName);$(category.varSet._categoryItemsFirstChild).addClass('selected');$(category.varSet._itemDropDown).each(function(){$(this).click(function(){var catIDList;catID=$(this).attr('data-cat-id');$(category.varSet._categoryItems).each(function(){catIDList=$(this).attr('data-cat-id');if(catIDList==catID){$(this).addClass('selected');$(this).show();}
else{$(this).removeClass('selected');$(this).hide();}});catName=$(this).text();$(category.varSet._itemSelected).text(catName).removeClass('active');$(category.varSet._dropDownList).hide();});});};$(document).ready(function(){category.init();});});