Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 55KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658
  1. (function ($) {
  2. "use strict";
  3. /*--
  4. Menu Stick
  5. -----------------------------------*/
  6. let width = $(window).width();
  7. const ADD_SUB_NAV_CONTAINER = 'ADD_SUB_NAV_CONTAINER';
  8. const REMOVE_SUB_NAV_CONTAINER = 'REMOVE_SUB_NAV_CONTAINER';
  9. var header = $('.sticky-bar');
  10. var win = $(window);
  11. let ele_page = $("body").hasClass("product_pg");
  12. let win_wid = win.width();
  13. let ram_page = window.location.pathname;
  14. let loc= ram_page.includes('ramproducts.html');
  15. let loc_2= ram_page.includes('allinones.html');
  16. let loc_3= ram_page.includes('laptops.html');
  17. function naChanges(){
  18. if(loc === true){
  19. $("svg").find("path").attr("fill","#000");
  20. }
  21. else if(loc_2 === true || loc_3 === true){
  22. if(window.location.href.includes("?Zeno") || window.location.href.includes("?AIO%20Fyro") || window.location.href.includes("?FYRO") || window.location.href.includes("?AIO%20Zeno")){
  23. if(win_wid <=1199){
  24. $(".user-icon").find('path').attr('fill',"#000");
  25. $(".cart_icon").find('path').attr('fill',"#000");
  26. }else{
  27. $("svg").find("path").attr("fill","#fff");
  28. }
  29. }else{
  30. $("svg").find("path").attr("fill","#000");
  31. }
  32. }
  33. else{
  34. $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  35. }
  36. }
  37. setTimeout(naChanges, 1000);
  38. let $body_pg = $("body").hasClass("services_page");
  39. if ($body_pg == true) {
  40. $(".main-menu").find("nav ul li a").addClass("text-dark");
  41. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  42. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  43. $(".header-bottom").addClass("sticky-bar stick");
  44. $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  45. }
  46. else{
  47. $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  48. }
  49. function subNavContainer(option){
  50. let urlName = window.location.href;
  51. if(!urlName.toLowerCase().includes('zeno') && !urlName.toLowerCase().includes('fyro')){
  52. return;
  53. }
  54. if(option === ADD_SUB_NAV_CONTAINER){
  55. $('.sub_nav_container').removeClass('d-none');
  56. }else if(option === REMOVE_SUB_NAV_CONTAINER){
  57. $('.sub_nav_container').addClass('d-none');
  58. }
  59. }
  60. win.on('scroll', function() {
  61. var scroll = win.scrollTop();
  62. // const mainContainerIsThere = document.querySelector('.mainContanierProduct').getBoundingClientRect();
  63. // if(mainContainerIsThere.top <200){
  64. // $('.sub_nav_container').removeClass('d-none');
  65. // }else{
  66. // $('.sub_nav_container').addClass('d-none');
  67. // }
  68. if (scroll < 100) {
  69. $('.sub_nav_container').addClass('d-none');
  70. header.removeClass('stick');
  71. $("body.about_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  72. $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  73. $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  74. // $(".hover_tab_1").find("svg").find("path").attr("fill","#fff");
  75. // $(".hover_tab_2").find("svg").find("path").attr("fill","#fff");
  76. // $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  77. // $("body").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  78. // $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  79. if(!$('.iframcontainer').hasClass('d-none')){
  80. subNavContainer(REMOVE_SUB_NAV_CONTAINER);
  81. }
  82. if ($body_pg == true) {
  83. $(".main-menu").find("nav ul li a").addClass("text-dark");
  84. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  85. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  86. $(".header-bottom").addClass("sticky-bar stick");
  87. }else{
  88. let $about_pg = $("body").hasClass("about_page");
  89. if($about_pg == true){
  90. $(".main-menu").find("nav ul li a").addClass("text-dark");
  91. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  92. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  93. $(".header-bottom").addClass("sticky-bar stick");
  94. $("body.about_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  95. }else{
  96. if(loc === true || loc_2 === true || loc_3 === true){
  97. if(window.location.href.includes("?Zeno") || window.location.href.includes("?FYRO") || window.location.href.includes("?AIO%20Fyro") || window.location.href.includes("?AIO%20Zeno")){
  98. if(win_wid <=1199){
  99. // $(".user-icon").find('path').attr('fill',"#000");
  100. // $(".cart_icon").find('path').attr('fill',"#000");
  101. }else{
  102. // let imgs = `/dist/assets/imgs/anwi-logo-2.png`;
  103. // $(".logo-menu-wrap").find(".logo img").attr("src",imgs);
  104. // $(".main-menu").find("nav ul li a").addClass("text-white").removeClass("text-dark");
  105. // $('.same-style').find('svg path').attr('fill','#fff');
  106. // $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  107. // $(".header-bottom.sticky-bar.stick").removeClass("sticky-bar stick");
  108. }
  109. }
  110. else{
  111. let imgs = `/dist/assets/imgs/anwi-logo-1.png`;
  112. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  113. $(".logo-menu-wrap").find(".logo img").attr("src",imgs);
  114. $('.same-style').find('svg path').attr('fill','#000');
  115. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  116. $(".header-bottom.sticky-bar.stick").removeClass("sticky-bar stick");
  117. }
  118. } else{
  119. let contact_pg = $("body").hasClass("contact_page");
  120. if(contact_pg === true){
  121. $(".main-menu").find("nav ul li a").addClass("text-dark");
  122. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  123. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  124. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  125. }else{
  126. // let img_src = `/dist/assets/imgs/anwi-logo-2.png`;
  127. // $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  128. // $(".main-menu").find("nav ul li a").addClass("text-white");
  129. // $(".header-bottom.sticky-bar.stick").removeClass("sticky-bar stick");
  130. }
  131. }
  132. }
  133. }
  134. } else {
  135. header.addClass('stick');
  136. subNavContainer(ADD_SUB_NAV_CONTAINER);
  137. $(".header-bottom").addClass("sticky-bar stick");
  138. let src = `/dist/assets/imgs/anwi-logo-1.png`;
  139. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  140. $(".main-menu").find("nav ul li a").removeClass("text-white");
  141. $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  142. $('.header-bottom-flex').find('svg path').attr('fill','#000')
  143. let $body_pg = $("body").hasClass("services_page");
  144. if ($body_pg == true) {
  145. let src = `/dist/assets/imgs/anwi-logo-1.png`;
  146. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  147. $(".main-menu").find("nav ul li a").removeClass("text-white");
  148. }
  149. let $about_pg = $("body").hasClass("about_page");
  150. if($about_pg == true){
  151. $(".main-menu").find("nav ul li a").addClass("text-dark");
  152. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  153. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  154. $(".header-bottom").addClass("sticky-bar stick");
  155. }
  156. }
  157. });
  158. $("nav ul li").each(function(){
  159. let nav_item = $(this).find("ul").hasClass("pb-3");
  160. if(nav_item === true){
  161. $(this).on("mouseenter",function(){
  162. $(".sub_nav_container").addClass("d-none");
  163. let nav_cls = $(".header-bottom").hasClass("stick");
  164. if(nav_cls === false){
  165. $(".header-bottom").addClass("bg-white");
  166. let src = `/dist/assets/imgs/anwi-logo-1.png`;
  167. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  168. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  169. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  170. }
  171. });
  172. $(this).on("mouseleave",function(){
  173. let nav_cls = $(".header-bottom").hasClass("stick");
  174. let product_detail = window.location.pathname;
  175. let detail = product_detail.includes("productdetails.html");
  176. if(detail === true){
  177. $(".sub_nav_container").removeClass("d-none");
  178. }
  179. if(nav_cls === false){
  180. let ram_page = window.location.pathname;
  181. let loc= ram_page.includes('ramproducts.html');
  182. if(loc === false){
  183. let contact_pg = $("body").hasClass("contact_page");
  184. let product_pg = $("body").hasClass("product_pg");
  185. if(contact_pg === true){
  186. $(".header-bottom").removeClass("bg-white");
  187. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  188. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  189. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  190. }else if(product_pg === true){
  191. $(".header-bottom").removeClass("bg-white");
  192. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  193. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  194. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  195. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  196. }else{
  197. $(".header-bottom").removeClass("bg-white");
  198. let src = `/dist/assets/imgs/anwi-logo-2.png`;
  199. // $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  200. $(".main-menu").find("nav ul li a").addClass("text-white").removeClass("text-dark");
  201. $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  202. }
  203. }else{
  204. $(".header-bottom").removeClass("bg-white");
  205. }
  206. }
  207. })
  208. }
  209. })
  210. /*--------------------------------
  211. Slider active 1
  212. -----------------------------------*/
  213. sliders();
  214. function sliders(){
  215. if(window.location.href.includes('login')) return;
  216. $('.slider-active-1').slick({
  217. slidesToShow: 1,
  218. slidesToScroll: 1,
  219. fade: true,
  220. loop: true,
  221. dots: false,
  222. arrows: true,
  223. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  224. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  225. responsive: [{
  226. breakpoint: 1500,
  227. settings: {
  228. slidesToShow: 1,
  229. slidesToScroll: 1,
  230. }
  231. },
  232. {
  233. breakpoint: 1199,
  234. settings: {
  235. slidesToShow: 1,
  236. slidesToScroll: 1,
  237. }
  238. },
  239. {
  240. breakpoint: 991,
  241. settings: {
  242. slidesToShow: 1,
  243. slidesToScroll: 1,
  244. }
  245. },
  246. {
  247. breakpoint: 767,
  248. settings: {
  249. autoplay: false,
  250. slidesToShow: 1,
  251. slidesToScroll: 1,
  252. }
  253. }
  254. ]
  255. });
  256. /*--------------------------------
  257. Slider active 2
  258. -----------------------------------*/
  259. $('.slider-active-2').slick({
  260. slidesToShow: 1,
  261. slidesToScroll: 1,
  262. fade: true,
  263. loop: true,
  264. dots: true,
  265. arrows: false,
  266. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  267. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  268. responsive: [{
  269. breakpoint: 1500,
  270. settings: {
  271. slidesToShow: 1,
  272. slidesToScroll: 1,
  273. }
  274. },
  275. {
  276. breakpoint: 1199,
  277. settings: {
  278. slidesToShow: 1,
  279. slidesToScroll: 1,
  280. }
  281. },
  282. {
  283. breakpoint: 991,
  284. settings: {
  285. slidesToShow: 1,
  286. slidesToScroll: 1,
  287. }
  288. },
  289. {
  290. breakpoint: 767,
  291. settings: {
  292. autoplay: false,
  293. slidesToShow: 1,
  294. slidesToScroll: 1,
  295. }
  296. }
  297. ]
  298. });
  299. /*--
  300. Slider active 3
  301. -----------------------------------*/
  302. $('.slider-active-3').slick({
  303. arrows: false,
  304. infinite: true,
  305. slidesToShow: 1,
  306. dots: true,
  307. fade: true,
  308. autoplay: false,
  309. autoplaySpeed: 5000,
  310. customPaging : function(slider, i) {
  311. var thumb = $(slider.$slides[i]).data('thumb');
  312. return '<button class="overlay"><img src="'+thumb+'"></button>';
  313. },
  314. responsive: [
  315. {
  316. breakpoint: 767,
  317. settings: {
  318. dots: true,
  319. autoplay: false,
  320. autoplaySpeed: 5000,
  321. }
  322. }
  323. ]
  324. });
  325. /*--------------------------------
  326. slider active 4
  327. -----------------------------------*/
  328. $('.slider-active-4').slick({
  329. slidesToShow: 1,
  330. slidesToScroll: 1,
  331. fade: true,
  332. loop: true,
  333. dots: true,
  334. arrows: false,
  335. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  336. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  337. responsive: [{
  338. breakpoint: 1500,
  339. settings: {
  340. slidesToShow: 1,
  341. slidesToScroll: 1,
  342. }
  343. },
  344. {
  345. breakpoint: 1199,
  346. settings: {
  347. slidesToShow: 1,
  348. slidesToScroll: 1,
  349. }
  350. },
  351. {
  352. breakpoint: 991,
  353. settings: {
  354. slidesToShow: 1,
  355. slidesToScroll: 1,
  356. }
  357. },
  358. {
  359. breakpoint: 767,
  360. settings: {
  361. autoplay: false,
  362. slidesToShow: 1,
  363. slidesToScroll: 1,
  364. }
  365. }
  366. ]
  367. });
  368. /*--------------------------------
  369. Slider active 5
  370. -----------------------------------*/
  371. $('.slider-active-5').slick({
  372. slidesToShow: 1,
  373. slidesToScroll: 1,
  374. fade: true,
  375. loop: true,
  376. dots: true,
  377. arrows: false,
  378. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  379. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  380. });
  381. /*--------------------------------
  382. Product slider active 1
  383. -----------------------------------*/
  384. $('.product-slider-active-1').slick({
  385. slidesToShow: 3,
  386. slidesToScroll: 1,
  387. loop: true,
  388. dots: false,
  389. arrows: false,
  390. responsive: [{
  391. breakpoint: 1500,
  392. settings: {
  393. slidesToShow: 3,
  394. slidesToScroll: 1,
  395. }
  396. },
  397. {
  398. breakpoint: 1199,
  399. settings: {
  400. slidesToShow: 3,
  401. slidesToScroll: 1,
  402. }
  403. },
  404. {
  405. breakpoint: 991,
  406. settings: {
  407. slidesToShow: 2,
  408. slidesToScroll: 1,
  409. }
  410. },
  411. {
  412. breakpoint: 767,
  413. settings: {
  414. autoplay: false,
  415. slidesToShow: 2,
  416. slidesToScroll: 1,
  417. }
  418. },
  419. {
  420. breakpoint: 575,
  421. settings: {
  422. autoplay: false,
  423. slidesToShow: 1,
  424. slidesToScroll: 1,
  425. }
  426. }
  427. ]
  428. });
  429. /*--------------------------------
  430. Product slider active 2
  431. -----------------------------------*/
  432. $('.product-slider-active-2').slick({
  433. slidesToShow: 6,
  434. slidesToScroll: 1,
  435. loop: true,
  436. dots: false,
  437. arrows: false,
  438. responsive: [{
  439. breakpoint: 1500,
  440. settings: {
  441. slidesToShow: 6,
  442. slidesToScroll: 1,
  443. }
  444. },
  445. {
  446. breakpoint: 1199,
  447. settings: {
  448. slidesToShow: 4,
  449. slidesToScroll: 1,
  450. }
  451. },
  452. {
  453. breakpoint: 991,
  454. settings: {
  455. slidesToShow: 3,
  456. slidesToScroll: 1,
  457. }
  458. },
  459. {
  460. breakpoint: 767,
  461. settings: {
  462. autoplay: false,
  463. slidesToShow: 2,
  464. slidesToScroll: 1,
  465. }
  466. },
  467. {
  468. breakpoint: 575,
  469. settings: {
  470. autoplay: false,
  471. slidesToShow: 1,
  472. slidesToScroll: 1,
  473. }
  474. }
  475. ]
  476. });
  477. /*--------------------------------
  478. Product slider active 3
  479. -----------------------------------*/
  480. $('.product-slider-active-3').slick({
  481. slidesToShow: 2,
  482. slidesToScroll: 1,
  483. loop: true,
  484. dots: false,
  485. arrows: false,
  486. responsive: [{
  487. breakpoint: 1500,
  488. settings: {
  489. slidesToShow: 2,
  490. slidesToScroll: 1,
  491. }
  492. },
  493. {
  494. breakpoint: 1199,
  495. settings: {
  496. slidesToShow: 1,
  497. slidesToScroll: 1,
  498. }
  499. },
  500. {
  501. breakpoint: 991,
  502. settings: {
  503. slidesToShow: 1,
  504. slidesToScroll: 1,
  505. }
  506. },
  507. {
  508. breakpoint: 767,
  509. settings: {
  510. autoplay: false,
  511. slidesToShow: 1,
  512. slidesToScroll: 1,
  513. }
  514. },
  515. {
  516. breakpoint: 575,
  517. settings: {
  518. autoplay: false,
  519. slidesToShow: 1,
  520. slidesToScroll: 1,
  521. }
  522. }
  523. ]
  524. });
  525. /*--------------------------------
  526. Product slider active 4
  527. -----------------------------------*/
  528. $('.product-slider-active-4').slick({
  529. slidesToShow: 4,
  530. slidesToScroll: 1,
  531. loop: true,
  532. dots: false,
  533. arrows: false,
  534. responsive: [{
  535. breakpoint: 1500,
  536. settings: {
  537. slidesToShow: 4,
  538. slidesToScroll: 1,
  539. }
  540. },
  541. {
  542. breakpoint: 1199,
  543. settings: {
  544. slidesToShow: 3,
  545. slidesToScroll: 1,
  546. }
  547. },
  548. {
  549. breakpoint: 991,
  550. settings: {
  551. slidesToShow: 2,
  552. slidesToScroll: 1,
  553. }
  554. },
  555. {
  556. breakpoint: 767,
  557. settings: {
  558. autoplay: false,
  559. slidesToShow: 2,
  560. slidesToScroll: 1,
  561. }
  562. },
  563. {
  564. breakpoint: 575,
  565. settings: {
  566. autoplay: false,
  567. slidesToShow: 1,
  568. slidesToScroll: 1,
  569. }
  570. }
  571. ]
  572. });
  573. /*--------------------------------
  574. Brand logo active
  575. -----------------------------------*/
  576. $('.brand-logo-active , .brand-logo-active-2').slick({
  577. slidesToShow: 6,
  578. slidesToScroll: 1,
  579. loop: true,
  580. dots: false,
  581. arrows: false,
  582. responsive: [{
  583. breakpoint: 1500,
  584. settings: {
  585. slidesToShow: 6,
  586. slidesToScroll: 1,
  587. }
  588. },
  589. {
  590. breakpoint: 1199,
  591. settings: {
  592. slidesToShow: 5,
  593. slidesToScroll: 1,
  594. }
  595. },
  596. {
  597. breakpoint: 991,
  598. settings: {
  599. slidesToShow: 4,
  600. slidesToScroll: 1,
  601. }
  602. },
  603. {
  604. breakpoint: 767,
  605. settings: {
  606. autoplay: false,
  607. slidesToShow: 3,
  608. slidesToScroll: 1,
  609. }
  610. },
  611. {
  612. breakpoint: 575,
  613. settings: {
  614. autoplay: false,
  615. slidesToShow: 2,
  616. slidesToScroll: 1,
  617. }
  618. }
  619. ]
  620. });
  621. /*--------------------------------
  622. Brand logo active 3
  623. -----------------------------------*/
  624. $('.brand-logo-active-3').slick({
  625. slidesToShow: 6,
  626. slidesToScroll: 1,
  627. loop: true,
  628. dots: true,
  629. arrows: false,
  630. responsive: [{
  631. breakpoint: 1500,
  632. settings: {
  633. slidesToShow: 6,
  634. slidesToScroll: 1,
  635. }
  636. },
  637. {
  638. breakpoint: 1199,
  639. settings: {
  640. slidesToShow: 5,
  641. slidesToScroll: 1,
  642. }
  643. },
  644. {
  645. breakpoint: 991,
  646. settings: {
  647. slidesToShow: 4,
  648. slidesToScroll: 1,
  649. }
  650. },
  651. {
  652. breakpoint: 767,
  653. settings: {
  654. autoplay: false,
  655. slidesToShow: 3,
  656. slidesToScroll: 1,
  657. }
  658. },
  659. {
  660. breakpoint: 575,
  661. settings: {
  662. autoplay: false,
  663. slidesToShow: 2,
  664. slidesToScroll: 1,
  665. }
  666. }
  667. ]
  668. });
  669. }
  670. /*---------------------
  671. Countdown 1
  672. --------------------- */
  673. $('.timer-1 [data-countdown]').each(function() {
  674. var $this = $(this),
  675. finalDate = $(this).data('countdown');
  676. $this.countdown(finalDate, function(event) {
  677. $this.html(event.strftime('<span class="cdown day"> <span>%-D </span><p>Days</p></span> <span class="cdown hour"> <span> %-H</span> <p>Hours</p></span> <span class="cdown minutes"><span>%M</span> <p>Minutes</p> </span>'));
  678. });
  679. });
  680. $('.timer-2 [data-countdown]').each(function() {
  681. var $this = $(this),
  682. finalDate = $(this).data('countdown');
  683. $this.countdown(finalDate, function(event) {
  684. $this.html(event.strftime('<span class="cdown day"> <span>%-D </span><p>Day</p></span> <span class="cdown hour"> <span> %-H</span> <p>Hour</p></span> <span class="cdown minutes"><span>%M</span> <p>Minute</p> </span> <span class="cdown second"><span>%S</span> <p>Second</p> </span>'));
  685. });
  686. });
  687. $('.timer-3 [data-countdown]').each(function() {
  688. var $this = $(this),
  689. finalDate = $(this).data('countdown');
  690. $this.countdown(finalDate, function(event) {
  691. $this.html(event.strftime('<span class="cdown hour"> <span> %-H</span> <p>Hour</p></span> <span class="cdown minutes"><span>%M</span> <p>Minute</p> </span> <span class="cdown second"><span>%S</span> <p>Second</p> </span>'));
  692. });
  693. });
  694. /*---------------------
  695. svg img color
  696. --------------------- */
  697. // Elements to inject
  698. var mySVGsToInject = document.querySelectorAll('img.inject-me');
  699. // Do the injection
  700. SVGInjector(mySVGsToInject);
  701. /*------ Wow Active ----*/
  702. new WOW().init();
  703. /*------------
  704. ScrollUp
  705. ------------------ */
  706. // $.scrollUp({
  707. // scrollText: '<i class="icofont-arrow-up"></i>',
  708. // easingType: 'linear',
  709. // scrollSpeed: 900,
  710. // animation: 'fade'
  711. // });
  712. /*----------------------------
  713. Cart Plus Minus Button
  714. ------------------------------ */
  715. var CartPlusMinus = $('.cart-plus-minus');
  716. CartPlusMinus.prepend('<div class="dec qtybutton">-</div>');
  717. CartPlusMinus.append('<div class="inc qtybutton">+</div>');
  718. $(".qtybutton").on("click", function() {
  719. var $button = $(this);
  720. var oldValue = $button.parent().find("input").val();
  721. if ($button.text() === "+") {
  722. var newVal = parseFloat(oldValue) + 1;
  723. } else {
  724. // Don't allow decrementing below zero
  725. if (oldValue > 0) {
  726. var newVal = parseFloat(oldValue) - 1;
  727. } else {
  728. newVal = 1;
  729. }
  730. }
  731. $button.parent().find("input").val(newVal);
  732. });
  733. /*------- Color active -----*/
  734. $('.pro-details-color-content').on('click', 'a', function(e){
  735. e.preventDefault();
  736. $(this).addClass('active').parent().siblings().children('a').removeClass('active');
  737. });
  738. /*--------------------------------
  739. Cart active
  740. -----------------------------------*/
  741. if ($('.pro-details-action').length) {
  742. var $body = $('body'),
  743. $cartWrap = $('.pro-details-action'),
  744. $cartContent = $cartWrap.find('.product-dec-social');
  745. $cartWrap.on('click', '.social', function(e) {
  746. e.preventDefault();
  747. var $this = $(this);
  748. if (!$this.parent().hasClass('show')) {
  749. $this.siblings('.product-dec-social').addClass('show').parent().addClass('show');
  750. } else {
  751. $this.siblings('.product-dec-social').removeClass('show').parent().removeClass('show');
  752. }
  753. });
  754. /*Close When Click Outside*/
  755. $body.on('click', function(e) {
  756. var $target = e.target;
  757. if (!$($target).is('.pro-details-action') && !$($target).parents().is('.pro-details-action') && $cartWrap.hasClass('show')) {
  758. $cartWrap.removeClass('show');
  759. $cartContent.removeClass('show');
  760. }
  761. });
  762. }
  763. /* Language-dropdown */
  764. $(".language-dropdown-active").on("click", function(e) {
  765. e.preventDefault();
  766. $(this).parent().find('.language-dropdown').slideToggle('medium');
  767. })
  768. /* NiceSelect */
  769. $('.nice-select').niceSelect();
  770. /*--------------------------------
  771. Testimonial active
  772. -----------------------------------*/
  773. $('.testimonial-active , .testimonial-active-2').slick({
  774. slidesToShow: 1,
  775. slidesToScroll: 1,
  776. loop: true,
  777. dots: false,
  778. arrows: false,
  779. responsive: [{
  780. breakpoint: 1500,
  781. settings: {
  782. slidesToShow: 1,
  783. slidesToScroll: 1,
  784. }
  785. },
  786. {
  787. breakpoint: 1199,
  788. settings: {
  789. slidesToShow: 1,
  790. slidesToScroll: 1,
  791. }
  792. },
  793. {
  794. breakpoint: 991,
  795. settings: {
  796. slidesToShow: 1,
  797. slidesToScroll: 1,
  798. }
  799. },
  800. {
  801. breakpoint: 767,
  802. settings: {
  803. autoplay: false,
  804. slidesToShow: 1,
  805. slidesToScroll: 1,
  806. }
  807. },
  808. {
  809. breakpoint: 575,
  810. settings: {
  811. autoplay: false,
  812. slidesToShow: 1,
  813. slidesToScroll: 1,
  814. }
  815. }
  816. ]
  817. });
  818. /*====== SidebarCart ======*/
  819. function miniCart() {
  820. var navbarTrigger = $('.cart-active'),
  821. endTrigger = $('.cart-close'),
  822. container = $('.sidebar-cart-active'),
  823. wrapper2 = $('.main-wrapper');
  824. wrapper2.prepend('<div class="body-overlay"></div>');
  825. navbarTrigger.on('click', function(e) {
  826. e.preventDefault();
  827. container.addClass('inside');
  828. wrapper2.addClass('overlay-active');
  829. });
  830. endTrigger.on('click', function() {
  831. container.removeClass('inside');
  832. wrapper2.removeClass('overlay-active');
  833. });
  834. $('.body-overlay').on('click', function() {
  835. container.removeClass('inside');
  836. wrapper2.removeClass('overlay-active');
  837. });
  838. };
  839. miniCart();
  840. /*-------------------------------
  841. Header Search Toggle
  842. -----------------------------------*/
  843. var searchToggle = $('.search-toggle');
  844. searchToggle.on('click', function(e){
  845. e.preventDefault();
  846. if($(this).hasClass('open')){
  847. $(this).removeClass('open');
  848. $(this).siblings('.search-wrap-3').removeClass('open');
  849. }else{
  850. $(this).addClass('open');
  851. $(this).siblings('.search-wrap-3').addClass('open');
  852. }
  853. })
  854. /*====== Sidebar Active ======*/
  855. function sidebarActive() {
  856. var navbarTrigger = $('.sidebar-active'),
  857. endTrigger = $('.sidebar-close'),
  858. container = $('.clickalbe-sidebar-wrapper-active'),
  859. wrapper3 = $('.main-wrapper-2');
  860. wrapper3.prepend('<div class="body-overlay-2"></div>');
  861. navbarTrigger.on('click', function(e) {
  862. e.preventDefault();
  863. container.addClass('sidebar-visible');
  864. wrapper3.addClass('overlay-active-2');
  865. });
  866. endTrigger.on('click', function() {
  867. container.removeClass('sidebar-visible');
  868. wrapper3.removeClass('overlay-active-2');
  869. });
  870. $('.body-overlay-2').on('click', function() {
  871. container.removeClass('sidebar-visible');
  872. wrapper3.removeClass('overlay-active-2');
  873. });
  874. };
  875. sidebarActive();
  876. /*====== clickable Main Menu active ======*/
  877. var $clickableMainMenu = $('.clickable-mainmenu-wrap'),
  878. $clickableSubMenu = $clickableMainMenu.find('.sub-menu-2');
  879. /*Add Toggle Button in Off Canvas Sub Menu*/
  880. $clickableSubMenu.siblings('a').append('<span class="menu-expand"><i class="fa-solid fa-plus"></i></span>');
  881. /*Close Off Canvas Sub Menu*/
  882. $clickableSubMenu.slideUp();
  883. /*Category Sub Menu Toggle*/
  884. $clickableMainMenu.on('click', 'li a, li .menu-expand', function(e) {
  885. var $this = $(this);
  886. if ($this.parent('li').hasClass('has-sub-menu') || ($this.attr('href') === '#' || $this.hasClass('menu-expand'))) {
  887. e.preventDefault();
  888. if ($this.siblings('ul:visible').length) {
  889. $this.parent('li').removeClass('active').children('ul').slideUp().siblings('a').find('.menu-expand svg').removeClass('fa-minus').addClass('fa-plus');
  890. $this.parent('li').siblings('li').removeClass('active').find('ul:visible').slideUp().siblings('a').find('.menu-expand isvg').removeClass('fa-minus').addClass(' fa-plus ');
  891. } else {
  892. $this.parent('li').addClass('active').children('ul').slideDown().siblings('a').find('.menu-expand svg').removeClass(' fa-plus ').addClass('fa-minus');
  893. $this.parent('li').siblings('li').removeClass('active').find('ul:visible').slideUp().siblings('a').find('.menu-expand svg').removeClass('fa-minus').addClass(' fa-plus ');
  894. }
  895. }
  896. });
  897. /*====== Sidebar menu Active ======*/
  898. function mobileMenuActive() {
  899. var navbarTrigger = $('.mobile-menu-button-active'),
  900. endTrigger = $('.sidebar-close'),
  901. container = $('.mobile-menu-active'),
  902. wrapper4 = $('.main-wrapper-3');
  903. wrapper4.prepend('<div class="body-overlay-3"></div>');
  904. navbarTrigger.on('click', function(e) {
  905. e.preventDefault();
  906. container.addClass('sidebar-visible');
  907. wrapper4.addClass('overlay-active-3');
  908. });
  909. endTrigger.on('click', function() {
  910. container.removeClass('sidebar-visible');
  911. wrapper4.removeClass('overlay-active-3');
  912. });
  913. $('.body-overlay-3').on('click', function() {
  914. container.removeClass('sidebar-visible');
  915. wrapper4.removeClass('overlay-active-3');
  916. });
  917. };
  918. mobileMenuActive();
  919. /*--- Language currency active ----*/
  920. $('.mobile-language-active').on('click', function(e) {
  921. e.preventDefault();
  922. $('.lang-dropdown-active').slideToggle(900);
  923. });
  924. /*------------------------------------
  925. Testimonial img slider active
  926. -----------------------------------*/
  927. $('.testimonial-img-slider-active').slick({
  928. slidesToShow: 1,
  929. slidesToScroll: 1,
  930. arrows: false,
  931. draggable: false,
  932. fade: false,
  933. asNavFor: '.testimonial-active-3',
  934. });
  935. /*--------------------------------
  936. Testimonial active 3
  937. -----------------------------------*/
  938. $('.testimonial-active-3').slick({
  939. slidesToShow: 1,
  940. slidesToScroll: 1,
  941. asNavFor: '.testimonial-img-slider-active , .testimonial-img-slider-active-3',
  942. dots: true,
  943. focusOnSelect: true,
  944. fade: true,
  945. arrows: false
  946. });
  947. /*----------------------------------------------------------
  948. Testimonial img slider active 3 ( home mega fashion )
  949. --------------------------------------------------------------*/
  950. $('.testimonial-img-slider-active-3').on('init afterChange',function(){
  951. const titleImg = document.querySelector('.testimonial-next-img img');
  952. const activeSlide = document.querySelector('.testimonial-img-slider.slick-current');
  953. titleImg.src = activeSlide.nextSibling.querySelector('img').src;
  954. });
  955. $('.testimonial-img-slider-active-3').slick({
  956. slidesToShow: 1,
  957. slidesToScroll: 1,
  958. arrows: false,
  959. draggable: false,
  960. fade: false,
  961. asNavFor: '.testimonial-active-3'
  962. });
  963. // Isotope active
  964. // $('.grid').imagesLoaded(function() {
  965. // // init Isotope
  966. // var $grid = $('.grid').isotope({
  967. // itemSelector: '.grid-item',
  968. // percentPosition: true,
  969. // layoutMode: 'masonry',
  970. // masonry: {
  971. // // use outer width of grid-sizer for columnWidth
  972. // columnWidth: '.grid-item',
  973. // }
  974. // });
  975. // });
  976. /*--------------------------
  977. Isotope active
  978. ---------------------------- */
  979. // $('.grid-2').imagesLoaded(function() {
  980. // // init Isotope
  981. // $('.grid-2').isotope({
  982. // itemSelector: '.grid-item-2',
  983. // percentPosition: true,
  984. // layoutMode: 'masonry',
  985. // masonry: {
  986. // // use outer width of grid-sizer for columnWidth
  987. // columnWidth: '.grid-sizer',
  988. // }
  989. // });
  990. // });
  991. /*--------------------------
  992. Isotope active
  993. ---------------------------- */
  994. // $('.grid-3').imagesLoaded(function() {
  995. // // init Isotope
  996. // $('.grid-3').isotope({
  997. // itemSelector: '.grid-item-3',
  998. // percentPosition: true,
  999. // layoutMode: 'masonry',
  1000. // masonry: {
  1001. // // use outer width of grid-sizer for columnWidth
  1002. // columnWidth: 1,
  1003. // }
  1004. // });
  1005. // });
  1006. /*------------------------------------
  1007. testimonial img slider active 2
  1008. --------------------------------------*/
  1009. $('.testimonial-img-slider-active-2').slick({
  1010. slidesToShow: 5,
  1011. slidesToScroll: 1,
  1012. arrows: false,
  1013. dots: false,
  1014. focusOnSelect: true,
  1015. draggable: false,
  1016. fade: false,
  1017. asNavFor: '.testimonial-active-4',
  1018. responsive: [
  1019. {
  1020. breakpoint: 1199,
  1021. settings: {
  1022. slidesToShow: 4,
  1023. }
  1024. },
  1025. {
  1026. breakpoint: 991,
  1027. settings: {
  1028. slidesToShow: 5,
  1029. }
  1030. },
  1031. {
  1032. breakpoint: 767,
  1033. settings: {
  1034. slidesToShow: 3,
  1035. }
  1036. },
  1037. {
  1038. breakpoint: 575,
  1039. settings: {
  1040. slidesToShow: 2,
  1041. }
  1042. }
  1043. ]
  1044. });
  1045. /*--------------------------------
  1046. Testimonial active 4
  1047. -----------------------------------*/
  1048. $('.testimonial-active-4').slick({
  1049. slidesToShow: 1,
  1050. slidesToScroll: 1,
  1051. asNavFor: '.testimonial-img-slider-active-2',
  1052. dots: false,
  1053. focusOnSelect: true,
  1054. fade: true,
  1055. arrows: false
  1056. });
  1057. /*--------------------------------
  1058. Testimonial active 5
  1059. -----------------------------------*/
  1060. $('.testimonial-active-5').slick({
  1061. slidesToShow: 1,
  1062. slidesToScroll: 1,
  1063. dots: false,
  1064. fade: false,
  1065. arrows: false,
  1066. responsive: [{
  1067. breakpoint: 1500,
  1068. settings: {
  1069. slidesToShow: 1,
  1070. slidesToScroll: 1,
  1071. }
  1072. },
  1073. {
  1074. breakpoint: 1199,
  1075. settings: {
  1076. slidesToShow: 1,
  1077. slidesToScroll: 1,
  1078. }
  1079. },
  1080. {
  1081. breakpoint: 991,
  1082. settings: {
  1083. slidesToShow: 1,
  1084. slidesToScroll: 1,
  1085. }
  1086. },
  1087. {
  1088. breakpoint: 767,
  1089. settings: {
  1090. autoplay: true,
  1091. slidesToShow: 1,
  1092. slidesToScroll: 1,
  1093. }
  1094. }
  1095. ]
  1096. });
  1097. /*--------------------------------
  1098. Categori slider active
  1099. -----------------------------------*/
  1100. $('.categori-slider-active').slick({
  1101. slidesToShow: 6,
  1102. slidesToScroll: 1,
  1103. dots: false,
  1104. fade: false,
  1105. arrows: false,
  1106. responsive: [{
  1107. breakpoint: 1500,
  1108. settings: {
  1109. slidesToShow: 6,
  1110. slidesToScroll: 1,
  1111. }
  1112. },
  1113. {
  1114. breakpoint: 1199,
  1115. settings: {
  1116. slidesToShow: 6,
  1117. slidesToScroll: 1,
  1118. }
  1119. },
  1120. {
  1121. breakpoint: 991,
  1122. settings: {
  1123. slidesToShow: 4,
  1124. slidesToScroll: 1,
  1125. }
  1126. },
  1127. {
  1128. breakpoint: 767,
  1129. settings: {
  1130. autoplay: true,
  1131. slidesToShow: 3,
  1132. slidesToScroll: 1,
  1133. }
  1134. },
  1135. {
  1136. breakpoint: 575,
  1137. settings: {
  1138. autoplay: true,
  1139. slidesToShow: 2,
  1140. slidesToScroll: 1,
  1141. }
  1142. }
  1143. ]
  1144. });
  1145. /*--------------------------------
  1146. Testimonial active 6
  1147. -----------------------------------*/
  1148. $('.testimonial-active-6').slick({
  1149. slidesToShow: 2,
  1150. slidesToScroll: 1,
  1151. dots: true,
  1152. fade: false,
  1153. arrows: false,
  1154. responsive: [{
  1155. breakpoint: 1500,
  1156. settings: {
  1157. slidesToShow: 2,
  1158. slidesToScroll: 1,
  1159. }
  1160. },
  1161. {
  1162. breakpoint: 1199,
  1163. settings: {
  1164. slidesToShow: 2,
  1165. slidesToScroll: 1,
  1166. }
  1167. },
  1168. {
  1169. breakpoint: 991,
  1170. settings: {
  1171. slidesToShow: 1,
  1172. slidesToScroll: 1,
  1173. }
  1174. },
  1175. {
  1176. breakpoint: 767,
  1177. settings: {
  1178. autoplay: true,
  1179. slidesToShow: 1,
  1180. slidesToScroll: 1,
  1181. }
  1182. }
  1183. ]
  1184. });
  1185. /*--------------------------------
  1186. Product img slider active
  1187. -----------------------------------*/
  1188. $('.product-img-slider-active').slick({
  1189. slidesToShow: 1,
  1190. slidesToScroll: 1,
  1191. dots: true,
  1192. fade: false,
  1193. arrows: false,
  1194. });
  1195. /*--------------------------------
  1196. Testimonial active 7
  1197. -----------------------------------*/
  1198. $('.testimonial-active-7').slick({
  1199. slidesToShow: 1,
  1200. slidesToScroll: 1,
  1201. dots: false,
  1202. fade: false,
  1203. arrows: false,
  1204. });
  1205. /*--------------------------------
  1206. Product details 3 img slider
  1207. -----------------------------------*/
  1208. $('.product-details-3-img-slider').slick({
  1209. slidesToShow: 1,
  1210. slidesToScroll: 1,
  1211. dots: true,
  1212. loop: true,
  1213. fade: false,
  1214. arrows: false,
  1215. });
  1216. /*--------------------------------
  1217. Product details 3 img slider 2
  1218. -----------------------------------*/
  1219. $('.product-details-3-img-slider-2').slick({
  1220. slidesToShow: 1,
  1221. slidesToScroll: 1,
  1222. dots: true,
  1223. loop: true,
  1224. fade: false,
  1225. arrows: false,
  1226. });
  1227. /*====== SidebarSearch ======*/
  1228. function sidebarSearch() {
  1229. var searchTrigger = $('.search-active'),
  1230. endTriggersearch = $('.megashop-search-close'),
  1231. container = $('.main-search-active');
  1232. searchTrigger.on('click', function(e) {
  1233. e.preventDefault();
  1234. container.addClass('search-visible');
  1235. });
  1236. endTriggersearch.on('click', function() {
  1237. container.removeClass('search-visible');
  1238. });
  1239. };
  1240. sidebarSearch();
  1241. /*---------------------
  1242. Price range
  1243. --------------------- */
  1244. // var sliderrange = $('#slider-range');
  1245. // var amountprice = $('#amount');
  1246. // $(function() {
  1247. // sliderrange.slider({
  1248. // range: true,
  1249. // min: 16,
  1250. // max: 400,
  1251. // values: [0, 300],
  1252. // slide: function(event, ui) {
  1253. // amountprice.val("$" + ui.values[0] + " - $" + ui.values[1]);
  1254. // }
  1255. // });
  1256. // amountprice.val("$" + sliderrange.slider("values", 0) +
  1257. // " - $" + sliderrange.slider("values", 1));
  1258. // });
  1259. /*---------------------
  1260. Video popup
  1261. --------------------- */
  1262. // $('.video-popup').magnificPopup({
  1263. // type: 'iframe',
  1264. // mainClass: 'mfp-fade',
  1265. // removalDelay: 160,
  1266. // preloader: false,
  1267. // zoom: {
  1268. // enabled: true,
  1269. // }
  1270. // });
  1271. /*-------------------------------------
  1272. checkout one click toggle function
  1273. ---------------------------------------*/
  1274. var checked = $( '.sin-payment input:checked' )
  1275. if(checked){
  1276. $(checked).siblings( '.payment-box' ).slideDown(900);
  1277. };
  1278. $( '.sin-payment input' ).on('change', function() {
  1279. $( '.payment-box' ).slideUp(900);
  1280. $(this).siblings( '.payment-box' ).slideToggle(900);
  1281. });
  1282. /*-----------------------
  1283. Shop filter active
  1284. ------------------------- */
  1285. $('.shop-filter-active').on('click', function(e) {
  1286. e.preventDefault();
  1287. $('.product-filter-wrapper').slideToggle();
  1288. })
  1289. var shopFiltericon = $('.shop-filter-active');
  1290. shopFiltericon.on('click', function() {
  1291. $('.shop-filter-active').toggleClass('active');
  1292. })
  1293. /*--
  1294. Product details slider 2
  1295. -----------------------------------*/
  1296. $('.pro-dec-big-img-slider-2').slick({
  1297. slidesToShow: 1,
  1298. slidesToScroll: 1,
  1299. arrows: false,
  1300. draggable: false,
  1301. fade: false,
  1302. asNavFor: '.product-dec-slider-2',
  1303. });
  1304. /*--
  1305. Product details 2 slick carousel as Nav
  1306. --------------------------------------------*/
  1307. $('.product-dec-slider-2').slick({
  1308. slidesToShow: 7,
  1309. slidesToScroll: 1,
  1310. vertical: true,
  1311. asNavFor: '.pro-dec-big-img-slider-2',
  1312. dots: false,
  1313. focusOnSelect:true,
  1314. fade: false,
  1315. arrows: false,
  1316. responsive: [
  1317. {
  1318. breakpoint: 1199,
  1319. settings: {
  1320. slidesToShow: 5,
  1321. slidesToScroll: 1,
  1322. }
  1323. },
  1324. {
  1325. breakpoint: 991,
  1326. settings: {
  1327. slidesToShow: 7,
  1328. slidesToScroll: 1,
  1329. }
  1330. },
  1331. {
  1332. breakpoint: 767,
  1333. settings: {
  1334. slidesToShow: 5,
  1335. slidesToScroll: 1,
  1336. }
  1337. },
  1338. {
  1339. breakpoint: 575,
  1340. settings: {
  1341. autoplay: true,
  1342. slidesToShow: 3,
  1343. }
  1344. }
  1345. ]
  1346. });
  1347. // Instantiate EasyZoom instances
  1348. // var $easyzoom = $('.easyzoom').easyZoom();
  1349. /*--------------------------------
  1350. Product details slider 5 active
  1351. -----------------------------------*/
  1352. $('.product-details-slider-5-active').slick({
  1353. slidesToShow: 1,
  1354. slidesToScroll: 1,
  1355. dots: false,
  1356. loop: true,
  1357. fade: false,
  1358. arrows: false,
  1359. });
  1360. /*--------------------------------
  1361. Product details tab small
  1362. -----------------------------------*/
  1363. $('.product-details-tab-small').slick({
  1364. slidesToShow: 5,
  1365. slidesToScroll: 1,
  1366. dots: false,
  1367. loop: true,
  1368. fade: false,
  1369. arrows: false,
  1370. responsive: [
  1371. {
  1372. breakpoint: 767,
  1373. settings: {
  1374. slidesToShow: 3,
  1375. slidesToScroll: 1,
  1376. }
  1377. }
  1378. ]
  1379. });
  1380. /*--------------------------
  1381. Tab active
  1382. ---------------------------- */
  1383. var ProductDetailsSmall = $('.product-details-tab-small a');
  1384. ProductDetailsSmall.on('click', function(e) {
  1385. e.preventDefault();
  1386. var $href = $(this).attr('href');
  1387. ProductDetailsSmall.removeClass('active');
  1388. $(this).addClass('active');
  1389. $('.product-details-tab-large .tab-pane').removeClass('active');
  1390. $('.product-details-tab-large ' + $href).addClass('active');
  1391. })
  1392. // $('.multiple-items').slick({
  1393. // infinite: true,
  1394. // slidesToShow: 3,
  1395. // slidesToScroll: 3
  1396. // });
  1397. // $('.slider-hero').slick({
  1398. // dots: false,
  1399. // lazyLoad: 'ondemand',
  1400. // // autoplay: true,
  1401. // // autoplaySpeed: 1000,
  1402. // slidesToShow: 4,
  1403. // slidesToScroll: 1,
  1404. // responsive: [
  1405. // {
  1406. // breakpoint: 1024,
  1407. // settings: {
  1408. // slidesToShow: 3,
  1409. // slidesToScroll: 3,
  1410. // infinite: true,
  1411. // }
  1412. // },
  1413. // {
  1414. // breakpoint: 600,
  1415. // settings: {
  1416. // slidesToShow: 2,
  1417. // slidesToScroll: 2
  1418. // }
  1419. // },
  1420. // {
  1421. // breakpoint: 480,
  1422. // settings: {
  1423. // slidesToShow: 1,
  1424. // slidesToScroll: 1
  1425. // }
  1426. // },
  1427. // {
  1428. // breakpoint: 1199,
  1429. // settings: {
  1430. // slidesToShow: 5,
  1431. // slidesToScroll: 1,
  1432. // }
  1433. // },
  1434. // {
  1435. // breakpoint: 991,
  1436. // settings: {
  1437. // slidesToShow: 3,
  1438. // slidesToScroll: 1,
  1439. // }
  1440. // },
  1441. // {
  1442. // breakpoint: 767,
  1443. // settings: {
  1444. // slidesToShow: 3,
  1445. // slidesToScroll: 1,
  1446. // }
  1447. // },
  1448. // {
  1449. // breakpoint: 575,
  1450. // settings: {
  1451. // autoplay: true,
  1452. // slidesToShow: 3,
  1453. // }
  1454. // }
  1455. // // You can unslick at a given breakpoint now by adding:
  1456. // // settings: "unslick"
  1457. // // instead of a settings object
  1458. // ]
  1459. // });
  1460. //pres overview slider
  1461. $(".press_slider-hero").slick({
  1462. dots: false,
  1463. lazyLoad: 'ondemand',
  1464. // autoplay: true,
  1465. // autoplaySpeed: 1000,
  1466. slidesToShow: 1,
  1467. slidesToScroll: 1,
  1468. responsive: [
  1469. {
  1470. breakpoint: 1024,
  1471. settings: {
  1472. slidesToShow: 1,
  1473. slidesToScroll: 1,
  1474. infinite: true,
  1475. }
  1476. },
  1477. {
  1478. breakpoint: 600,
  1479. settings: {
  1480. slidesToShow: 1,
  1481. slidesToScroll: 1
  1482. }
  1483. },
  1484. {
  1485. breakpoint: 480,
  1486. settings: {
  1487. slidesToShow: 1,
  1488. slidesToScroll: 1
  1489. }
  1490. },
  1491. {
  1492. breakpoint: 1199,
  1493. settings: {
  1494. slidesToShow: 1,
  1495. slidesToScroll: 1,
  1496. }
  1497. },
  1498. {
  1499. breakpoint: 991,
  1500. settings: {
  1501. slidesToShow: 1,
  1502. slidesToScroll: 1,
  1503. }
  1504. },
  1505. {
  1506. breakpoint: 767,
  1507. settings: {
  1508. slidesToShow: 1,
  1509. slidesToScroll: 1,
  1510. }
  1511. },
  1512. {
  1513. breakpoint: 575,
  1514. settings: {
  1515. autoplay: true,
  1516. slidesToShow: 1,
  1517. }
  1518. }
  1519. ]
  1520. });
  1521. setTimeout(()=>{
  1522. if(width<=600){
  1523. $('.same-style').find('svg path').attr('fill','#000')
  1524. }
  1525. },300)
  1526. })(jQuery);