PageSourceSearch

https://sklepwaneko.pl/themes/Coffeeter/assets/js/custom.js

js sklepwaneko.pl collected 2026-10-02 23:59:52 UTC 18,528 bytes, 609 lines download raw bytes

1
2function additionalCarousel(sliderId){
3	/*======  curosol For Additional ==== */
4	 var czadditional = $(sliderId);
5	 var var_items;
6	 if(sliderId == ".modal.quickview .additional-carousel"){
7		 var_items = 4;
8	 } 
9	 else 
10	 {
11		 var_items = 3;
12	 }
13	 czadditional.owlCarousel({
14		 items : var_items, //10 items above 1000px browser width
15		 itemsDesktop : [1199,3], 
16		 itemsDesktopSmall : [991,2], 
17		 itemsTablet: [767,3],
18		itemsTabletSmall: [320,2],
19		itemsMobile : [300,1]
20	 });
21	 // Custom Navigation Events
22	 $(".additional_next").click(function(){
23	   czadditional.trigger('owl.next');
24	 })
25	 $(".additional_prev").click(function(){
26	   czadditional.trigger('owl.prev');
27	 });
28}
29
30 // Cart Slide Toggle
31 $(document).on("click", "#header .blockcart .blockcart-header .shopping-cart", function () {
32	$("body").addClass("cartslide_active");
33	$(".overlay").addClass("overlay_active");
34});
35$(document).on("click", ".close-icon, .overlay", function () {
36	$("body").removeClass("cartslide_active");
37	$(".overlay").removeClass("overlay_active");
38});
39$(document).on("click", ".cart_block .remove-from-cart .material-icons",
40	function () {
41	  $(".overlay").addClass("overlay_active");
42	}
43);
44
45
46
47$(document).ready(function(){
48	
49	bindGrid();
50	additionalCarousel('#main .additional-carousel');
51	$('nav.breadcrumb').prependTo('#content-wrapper');
52	$('aside#notifications').prependTo('#main');
53	
54	$('.cart_block.dropdown-menu').on('click',function (e) {
55		e.stopPropagation();
56	});
57	
58	
59	// Add/Remove acttive class on menu active in responsive  
60	$('#menu-icon').on('click', function() {
61		$(this).toggleClass('active');
62	});
63
64	
65	$('input[name="email"], #search_widget input[type="text"]').focus(function(){
66		$(this).data('placeholder',$(this).attr('placeholder')).attr('placeholder','');
67	}).blur(function(){
68		$(this).attr('placeholder',$(this).data('placeholder'));
69	});
70	
71	
72	$('#header .search_button').click(function(event){			
73		$(this).toggleClass('active');		
74		event.stopPropagation();		
75		$('#header .search_toggle').toggle("medium");		
76		$( "#header .search-widget form input[type=text]" ).focus();
77	
78	});
79	
80	$("#header .search_toggle").on("click", function (event) {
81		event.stopPropagation();	
82	});
83
84	$('.total-rating').on('click', function() {
85		$('html, body').animate({scrollTop: $('#productCommentsBlock').offset().top}, 'slow');
86	});
87	
88	
89	
90	/* ---------------- start horizontal more menu setting ---------------------- */
91	var max_elem = 5;
92	
93	if($(window).width() <=1259){ max_elem = 4;}
94	if($(window).width() <=1199){ max_elem = 4;}
95
96	var items = $('.horizontal-menu ul#top-menu > li');	
97	var surplus = items.slice(max_elem, items.length);
98	
99	var menu_more_title = $("#moremenu_text").text();
100	
101	surplus.wrapAll('<li class="category more_menu" id="more_menu"><div id="top_moremenu" class="popover sub-menu js-sub-menu collapse"><ul class="top-menu more_sub_menu">');
102
103	$('.horizontal-menu ul#top-menu .more_menu').prepend('<a href="#" class="dropdown-item" data-depth="0"><span class="pull-xs-right hidden-md-up"><span data-target="#top_moremenu" data-toggle="collapse" class="navbar-toggler collapse-icons"><i class="material-icons add">&#xE313;</i><i class="material-icons remove">&#xE316;</i></span></span></span>More</a>');
104
105	$('.horizontal-menu ul#top-menu .more_menu').mouseover(function(){
106		$(this).children('div').css('display', 'block');
107	})
108	.mouseout(function(){
109		$(this).children('div').css('display', 'none');
110	});	
111		
112   /* ---------------- end more menu setting ----------------------	*/
113
114	/* ---------------- start Vertical menu setting ---------------------- */
115	var vmax_elem = 9;	
116	var vmenu_items = $('#czverticalmenublock ul#top-menu > li');	
117	
118	if ($(window).width()<=1259){
119		var vmax_elem = 8;
120	}
121	if ($(window).width()<=1199){
122		var vmax_elem = 7;
123	}
124	
125	if (vmenu_items.length > vmax_elem) {
126		$('#czverticalmenublock ul#top-menu').append('<li class="more_menu"><a href="#" class="vertical-menu-item" data-depth="0">Więcej kategorii<span class="more_category"><i class="fa-icon add"></i></span></a></li>')
127	}
128	$('#czverticalmenublock ul#top-menu .more_menu').click(function(event) {
129		event.preventDefault();	
130		if ($(this).hasClass('active')) {
131			vmenu_items.each(function(j) {
132				if (j >= vmax_elem) {
133					$(this).slideUp(200)
134				}
135			});
136			$(this).removeClass('active');
137			$('#czverticalmenublock ul#top-menu .more_menu').html('<a href="#" class="vertical-menu-item" data-depth="0">Więcej kategorii<span class="more_category"><i class="fa-icon add"></i></span></a>')
138		} else {
139			vmenu_items.each(function(j) {
140				if (j >= vmax_elem) {
141					$(this).slideDown(200)
142				}
143			});
144			$(this).addClass('active');
145			$('#czverticalmenublock ul#top-menu .more_menu').html('<a href="#" class="vertical-menu-item" data-depth="0">Mniej kategorii<span class="more_category"><i class="fa-icon remove">&nbsp;</i></span></a>')
146		}
147	});
148	vmenu_items.each(function(j) {
149		if (j >= vmax_elem) {
150			$(this).css('display', 'none')
151		}
152	});
153
154/* ---------------- end Vertical menu setting ----------------------	*/
155
156
157
158	 var catid_array = [];
159		$('#czcategorytabs .product_slider_grid').each(function(){
160		var catid = $(this).data('catid');
161		var owlcarouselid = $('#czcategory' + catid + '-carousel');
162		
163		owlcarouselid.owlCarousel({
164		items : 4, //10 items above 1000px browser width
165		itemsDesktop : [1199,3], 
166		itemsDesktopSmall : [991,3], 
167		itemsTablet: [575,2],
168		itemsMobile : [319,1] 
169		});	
170		$('#tab_' + catid + ' .czcategory_next').click(function(){
171		owlcarouselid.trigger('owl.next');
172		})
173		$('#tab_' + catid + ' .czcategory_prev').click(function(){
174		owlcarouselid.trigger('owl.prev');
175		});	
176	});
177	
178});
179
180
181
182
183/// Flex slider load
184$(window).load(function() {
185	if($('.flexslider').length > 0){ 
186		$('.flexslider').flexslider({		
187			slideshowSpeed: $('.flexslider').data('interval'),
188			pauseOnHover: $('.flexslider').data('pause'),
189			animation: "fade"
190		});
191	}
192});	
193
194
195// Loading image before flex slider load
196	$(window).load(function() { 
197		$(".loadingdiv").removeClass("spinner"); 
198	});
199	
200
201// Scroll page bottom to top
202	$(window).scroll(function() {
203		if ($(this).scrollTop() > 500) {
204			$('.top_button').fadeIn(500);
205		} else {
206			$('.top_button').fadeOut(500);
207		}
208	});							
209	$('.top_button').click(function(event) {
210		event.preventDefault();		
211		$('html, body').animate({scrollTop: 0}, 800);
212	});
213
214/*======  Carousel Slider For Blog Product ==== */
215	
216	var czblog = $("#blog-carousel");
217	czblog.owlCarousel({
218		items : 3, //10 items above 1000px browser width
219		itemsDesktop : [1459,3], 
220		itemsDesktopSmall : [1199,3],
221		itemsTablet: [991,2],
222	   	itemsTabletSmall: [575,1],
223		itemsMobile : [320,1],
224	});
225	// Custom Navigation Events
226	$(".blog_next").click(function(){
227		czblog.trigger('owl.next');
228	})
229	$(".blog_prev").click(function(){
230		czblog.trigger('owl.prev');
231	});
232
233/*======  Carousel Slider For Feature Product ==== */
234	
235	var czfeature = $("#feature-carousel");
236	czfeature.owlCarousel({
237		items : 4, //10 items above 1000px browser width
238		itemsDesktop : [1199,3], 
239		itemsDesktopSmall : [991,3], 
240		itemsTablet: [575,2], 
241		itemsMobile : [319,1] 
242	});
243	// Custom Navigation Events
244	$(".feature_next").click(function(){
245		czfeature.trigger('owl.next');
246	})
247	$(".feature_prev").click(function(){
248		czfeature.trigger('owl.prev');
249	});
250
251
252
253/*======  Carousel Slider For New Product ==== */
254	
255	var cznewproduct = $("#newproduct-carousel");
256	cznewproduct.owlCarousel({
257		items : 4, //10 items above 1000px browser width
258		itemsDesktop : [1199,3], 
259		itemsDesktopSmall : [991,3], 
260		itemsTablet: [575,2], 
261		itemsMobile : [319,1]
262	});
263	// Custom Navigation Events
264	$(".newproduct_next").click(function(){
265		cznewproduct.trigger('owl.next');
266	})
267	$(".newproduct_prev").click(function(){
268		cznewproduct.trigger('owl.prev');
269	});
270
271
272/*======  Carousel Slider For Accessories Product ==== */
273
274	var czaccessories = $("#accessories-carousel");
275	czaccessories.owlCarousel({
276		items : 4, //10 items above 1000px browser width
277		itemsDesktop : [1199,4], 
278		itemsDesktopSmall : [1199,3], 
279		itemsTablet: [575,2], 
280		itemsMobile : [319,1] 
281	});
282	// Custom Navigation Events
283	$(".accessories_next").click(function(){
284		czaccessories.trigger('owl.next');
285	})
286	$(".accessories_prev").click(function(){
287		czaccessories.trigger('owl.prev');
288	});
289
290/*======  Carousel Slider For Category Product ==== */
291
292	var czproductscategory = $("#productscategory-carousel");
293	czproductscategory.owlCarousel({
294		items : 4, //10 items above 1000px browser width
295		itemsDesktop : [1199,3], 
296		itemsDesktopSmall : [991,3], 
297		itemsTablet: [767,3],
298		itemsTabletSmall: [575,2],
299		itemsMobile : [319,1]  
300	});
301	// Custom Navigation Events
302	$(".productscategory_next").click(function(){
303		czproductscategory.trigger('owl.next');
304	})
305	$(".productscategory_prev").click(function(){
306		czproductscategory.trigger('owl.prev');
307	});
308
309
310/*======  Carousel Slider For Viewed Product ==== */
311
312	var czviewed = $("#viewed-carousel");
313	czviewed.owlCarousel({
314	    items : 4, //10 items above 1000px browser width
315		itemsDesktop : [1199,3], 
316		itemsDesktopSmall : [991,3], 
317		itemsTablet: [575,2], 
318		itemsMobile : [319,1] 
319	});
320	// Custom Navigation Events
321	$(".viewed_next").click(function(){
322		czviewed.trigger('owl.next');
323	})
324	$(".viewed_prev").click(function(){
325		czviewed.trigger('owl.prev');
326	});
327
328/*======  Carousel Slider For Crosssell Product ==== */
329
330	var czcrosssell = $("#crosssell-carousel");
331	czcrosssell.owlCarousel({
332		items : 4, //10 items above 1000px browser width
333		itemsDesktop : [1199,3], 
334		itemsDesktopSmall : [991,3], 
335		itemsTablet: [575,2], 
336		itemsMobile : [319,1] 
337	});
338	// Custom Navigation Events
339	$(".crosssell_next").click(function(){
340		czcrosssell.trigger('owl.next');
341	})
342	$(".crosssell_prev").click(function(){
343		czcrosssell.trigger('owl.prev');
344	});
345
346
347
348
349/*======  Carousel Slider For Special Product ==== */
350var czspecial = $("#special-carousel");
351czspecial.owlCarousel({
352	items : 2, //10 items above 1000px browser width
353	itemsDesktop : [1199,2], 
354	itemsDesktopSmall : [991,2], 
355	itemsTablet: [650,1], 
356	itemsMobile : [319,1] 
357});
358// Custom Navigation Events
359$(".special_next").click(function(){
360	czspecial.trigger('owl.next');
361})
362$(".special_prev").click(function(){
363	czspecial.trigger('owl.prev');
364});
365
366
367
368/*======  curosol For Manufacture ==== */
369var czbrand = $("#brand-carousel");
370czbrand.owlCarousel({
371	items :5, //10 items above 1000px browser width
372	itemsDesktop : [1259,5], 
373	itemsDesktopSmall : [1199,4],
374	itemsTablet: [575,3],
375	itemsTabletSmall: [480,2],
376	itemsMobile : [300,1],
377	autoPlay: true
378});
379// Custom Navigation Events
380$(".brand_next").click(function(){
381czbrand.trigger('owl.next');
382})
383$(".brand_prev").click(function(){
384czbrand.trigger('owl.prev');
385});
386
387
388/*======  curosol For Our Category Image list Block Slider  ==== */
389
390var czcategoryimagelist = $("#czcategoryimagelist-carousel");
391czcategoryimagelist.owlCarousel({
392	items: 4, //10 items above 1000px browser width
393	itemsDesktop: [1459, 4],
394	itemsDesktopSmall: [1199, 4],
395	itemsTablet: [991, 3],
396	itemsTabletSmall: [575, 2],
397	itemsMobile: [319, 1],
398	autoPlay: false
399});
400
401/* Custom Navigation Events*/
402$(".cat_next").click(function () {
403	czcategoryimagelist.trigger('owl.next');
404});
405
406$(".cat_prev").click(function () {
407	czcategoryimagelist.trigger('owl.prev');
408});
409
410
411
412/*======  Carousel Slider For For Tesimonial ==== */
413
414var cztestimonial = $("#testimonial-carousel");
415cztestimonial.owlCarousel({
416   items : 1, //10 items above 1000px browser width
417   itemsDesktop : [1199,1], 
418   itemsDesktopSmall : [991,1],
419   itemsTablet : [767,1],
420   itemsMobile : [320,1] 
421});
422
423/* Custom Navigation Events*/
424$(".cztestimonial_next").click(function(){
425cztestimonial.trigger('owl.next');
426});
427
428$(".cztestimonial_prev").click(function(){
429cztestimonial.trigger('owl.prev');
430});
431
432
433
434
435function bindGrid()
436{
437	var view = $.totalStorage("display");
438
439	if (view && view != 'grid') {
440		display(view);
441	} else {
442		$('.display').find('li#grid').addClass('selected');
443	}
444
445	$(document).on('click', '#grid', function(e){
446		e.preventDefault();
447		display('grid');
448	});
449
450	$(document).on('click', '#list', function(e){
451		e.preventDefault();
452		display('list');
453	});
454}
455
456function display(view)
457{
458	if (view == 'list')
459	{
460		$('#products ul.product_list').removeClass('grid').addClass('list row');
461		$('#products .product_list > li').removeClass('col-xs-12 col-sm-6 col-md-6 col-lg-4').addClass('col-xs-12');
462		
463		
464		$('#products .product_list > li').each(function(index, element) {
465			var html = '';
466			html = '<div class="product-miniature js-product-miniature" data-id-product="'+ $(element).find('.product-miniature').data('id-product') +'" data-id-product-attribute="'+ $(element).find('.product-miniature').data('id-product-attribute') +'" itemscope itemtype="http://schema.org/Product">';
467				html += '<div class="thumbnail-container col-xs-4 col-xs-5 col-md-4">' + $(element).find('.thumbnail-container').html() + '</div>';
468				
469				html += '<div class="product-description center-block col-xs-4 col-xs-7 col-md-8">';
470				
471					html += '<h3 class="h3 product-title" itemprop="name">'+ $(element).find('h3').html() + '</h3>';
472					
473					var comment = $(element).find('.comments_note').html();       // check : Comment module is enabled
474					if (comment != null) {
475						html += '<div class="comments_note">'+ $(element).find('.comments_note').html() + '</div>';
476					}
477					
478					var price = $(element).find('.product-price-and-shipping').html();       // check : catalog mode is enabled
479					if (price != null) {
480						html += '<div class="product-price-and-shipping">'+ price + '</div>';
481					}
482					
483					html += '<div class="product-detail">'+ $(element).find('.product-detail').html() + '</div>';
484					
485					var colorList = $(element).find('.highlighted-informations').html();
486					if (colorList != null) {
487						html += '<div class="highlighted-informations">'+ colorList +'</div>';
488					}
489					
490				  html += '<div class="product-actions">'+ $(element).find('.product-actions').html() +'</div>';
491					
492				html += '</div>';
493			html += '</div>';
494		$(element).html(html);
495		});
496		$('.display').find('li#list').addClass('selected');
497		$('.display').find('li#grid').removeAttr('class');
498		$.totalStorage('display', 'list');
499
500		if (typeof(StWishlistButtonAction) != 'undefined') {
501			StWishlistButtonAction()
502		}
503		if (typeof(StCompareButtonAction) != 'undefined') {
504			StCompareButtonAction()
505		}	
506	}
507	else
508	{
509		$('#products ul.product_list').removeClass('list').addClass('grid row');
510		$('#products .product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-6 col-lg-4');
511		$('#products .product_list > li').each(function(index, element) {
512		var html = '';
513		html += '<div class="product-miniature js-product-miniature" data-id-product="'+ $(element).find('.product-miniature').data('id-product') +'" data-id-product-attribute="'+ $(element).find('.product-miniature').data('id-product-attribute') +'" itemscope itemtype="http://schema.org/Product">';
514			html += '<div class="thumbnail-container">' + $(element).find('.thumbnail-container').html() +'</div>';
515			
516			html += '<div class="product-description">';
517
518
519				html += '<h3 class="h3 product-title" itemprop="name">'+ $(element).find('h3').html() +'</h3>';
520
521				var comment = $(element).find('.comments_note').html();       // check : Comment module is enabled
522				if (comment != null) {
523					html += '<div class="comments_note">'+ $(element).find('.comments_note').html() + '</div>';
524				}
525			
526				var price = $(element).find('.product-price-and-shipping').html();       // check : catalog mode is enabled
527				if (price != null) {
528					html += '<div class="product-price-and-shipping">'+ price + '</div>';
529				}
530				
531				html += '<div class="product-detail">'+ $(element).find('.product-detail').html() + '</div>';
532				
533				html += '<div class="product-actions">'+ $(element).find('.product-actions').html() +'</div>';
534								
535				// var colorList = $(element).find('.highlighted-informations').html();
536				// if (colorList != null) {
537				// 	html += '<div class="highlighted-informations">'+ colorList +'</div>';
538				// }
539				
540				
541			html += '</div>';
542		html += '</div>';
543		$(element).html(html);
544		});
545		$('.display').find('li#grid').addClass('selected');
546		$('.display').find('li#list').removeAttr('class');
547		$.totalStorage('display', 'grid');
548
549		if (typeof(StWishlistButtonAction) != 'undefined') {
550			StWishlistButtonAction()
551		}
552		if (typeof(StCompareButtonAction) != 'undefined') {
553			StCompareButtonAction()
554		}		
555	}
556}
557
558
559function responsivecolumn(){
560	
561	if ($(document).width() <= 991)
562	{
563		$('.container #columns_inner #left-column').appendTo('.container #columns_inner');
564		// ---------------- Fixed header responsive ----------------------
565		// $(window).bind('scroll', function () {
566		// 	if ($(window).scrollTop() > 170) {
567		// 		$('.header-top').addClass('fixed');
568		// 	} else {
569		// 		$('.header-top').removeClass('fixed');
570		// 	}
571		// });
572	}
573	else if($(document).width() >= 992)
574	{
575		$('.container #columns_inner #left-column').prependTo('.container #columns_inner');
576		// $(window).bind('scroll', function () {
577		// 	if ($(window).scrollTop() > 250) {
578		// 		$('.header-top').addClass('fixed');
579		// 	} else {
580		// 		$('.header-top').removeClass('fixed');
581		// 	}
582		// });
583	}
584	
585    if ($(document).width() <= 991)
586	{
587	  $('#contact-link').appendTo('.mobile-menu-inner');
588	  $('#czheadercmsblock').appendTo('.mobile-menu-inner');
589    }
590    else if($(document).width() >= 992){
591	   $('#contact-link').appendTo('#header .header-nav .left-nav');
592	   $('#czheadercmsblock').appendTo('#header .header-top-inner > .container');
593	}
594	
595
596
597	if ($(document).width() <= 650) {
598		$('#czwelcomecmsblock').appendTo('.mobile-menu-inner');
599	}
600	else if ($(document).width() >= 651) {
601		$('#czwelcomecmsblock').appendTo('#header .nav_top');
602	}
603
604}
605$(document).ready(function(){responsivecolumn();});
606$(window).resize(function(){responsivecolumn();});
607
608
609 

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.