PageSourceSearch

https://gilar.ir/wp-content/themes/ouioui/js/main.js

js gilar.ir collected 2026-09-27 21:15:19 UTC 23,554 bytes, 759 lines download raw bytes

1(function($) {
2	"use strict";
3	
4	/* 
5	** Add Click On Ipad 
6	*/
7	$(window).resize(function(){
8		var $width = $(this).width();
9		if( $width < 1199 ){
10			$( '.primary-menu .nav .dropdown-toggle'  ).each(function(){
11				$(this).attr('data-toggle', 'dropdown');
12			});
13		}
14	});
15	
16	/* Check variable if has swatches variation */
17	if( $('body').hasClass( 'sw-wooswatches' ) ){
18		$( '.sw-wooswatches .product-type-variable' ).each(function(){
19			var h_swatches = $(this).find( '.sw-variation-wrapper' ).height() + 30;
20			$(this).find( '.item-bottom' ).css( 'bottom', h_swatches );
21		});
22	}
23	
24	/*
25	** Blog Masonry
26	*/
27	$(window).load(function() {
28		if( $.isFunction( $.isotope ) ){
29			$('body').find('.blog-content-grid').isotope({ 
30				layoutMode : 'masonry'
31			});
32		}
33	});
34	
35	/*
36	** Search on click
37	*/	
38	$('.search-cate .search-tog').on('click', function(){
39		$('.search-cate .ouioui_top').slideToggle();
40	});
41	
42	$('.main-menu .header-close').on('click', function(){
43		$('.main-menu').removeClass("open");
44	});
45	$('.header-open').on('click', function(){
46		$('.main-menu').toggleClass("open");
47	});
48	/*
49	**  show menu mobile
50	*/
51	$('.header-menu-categories .open-menu').on('click', function(){
52		$('.main-menu').toggleClass("open");
53	});
54	
55	$('.footer-mstyle1 .footer-menu .footer-search a').on('click', function(){
56		$('.top-form.top-search').toggleClass("open");
57	});
58	
59	$('.footer-mstyle1 .footer-menu .footer-more a').on('click', function(){
60		$('.menu-item-hidden').toggleClass("open");
61	});
62	
63	/*
64	** js mobile
65	*/
66	$('.single-product.mobile-layout .social-share .title-share').on('click', function(){
67		$('.single-product.mobile-layout .social-share').toggleClass("open");
68	});
69	$('.single-post.mobile-layout .social-share .title-share').on('click', function(){
70		$('.single-post.mobile-layout .social-share').toggleClass("open");
71	});
72
73	$('.single-post.mobile-layout .social-share.open .title-share').on('click', function(){
74		$('.single-post.mobile-layout .social-share').removeClass("open");
75	});
76	
77	$('.products-nav .filter-product').on('click', function(){
78		$('.products-wrapper .filter-mobile').toggleClass("open");
79		$('.products-wrapper').toggleClass('show-modal');
80	});
81	
82	$('.products-nav .filter-product').on('click', function(){
83		if( $( ".products-wrapper .products-nav .filter-product" ).not( ".filter-mobile" ) ){
84			$('.products-wrapper').removeClass('show-modal');
85		}	
86	});
87	
88	$('.mobile-layout .vertical_megamenu .resmenu-container .navbar-toggle').on('click', function(){
89		$('.mobile-layout .body-wrapper .container').toggleClass('open');
90	});
91	
92	$('.mobile-layout .header-top-mobile .header-menu-categories .show_menu').on('click', function(){
93		$('.mobile-layout .body-wrapper .container').toggleClass('open');
94	});
95	
96	$( ".header-mobile-style1 .mobile-search .icon-seach" ).click(function() {
97		$( ".header-mobile-style1 .mobile-search .top-form.top-search" ).slideToggle( "slow", function() {
98		});
99	});
100	
101	$( ".header-mobile-style2 .mobile-search .icon-seach" ).click(function() {
102		$( ".header-mobile-style2 .mobile-search .top-form.top-search" ).slideToggle( "slow", function() {
103		});
104	});
105
106	$('.mobile-layout .back-history').on('click', function(){
107		window.history.back();
108	});
109	
110	$('.footer-mstyle2 .footer-container .footer-open').on('click', function(){
111		$('.footer-mstyle2').toggleClass('open');
112	});
113	
114	$('.footer-mstyle2 .mobile_menu2')
115	.find('li:gt(7)') /*you want :gt(4) since index starts at 0 and H3 is not in LI */
116	.hide()
117	.end()
118	.each(function(){
119			if($(this).children('li').length > 8){ //iterates over each UL and if they have 5+ LIs then adds Show More...
120				$(this).append(
121					$('<li><a><span class="menu-title">See more</span><span class="menu-img"></span></a></li>')
122					.addClass('showMore')
123					.on('click',function(){
124						if($(this).siblings(':hidden').length > 0){
125							$(this).html('<a><span class="menu-title">See less</span><span class="menu-img"></span></a>').siblings(':hidden').show(400);
126						}else{
127							$(this).html('<a><span class="menu-title">See more</span><span class="menu-img"></span></a>').show().siblings('li:gt(7)').hide(400);
128						}
129					})
130					);
131			}
132		});
133	
134	$('.header-style1 .header-mid .sticky-search .fa-search').on('click', function(){
135		$('.header-style1 .header-mid .sticky-search').toggleClass("open");
136	});
137	$( ".header-bar" ).on('click', function(){
138		$( ".header-bar" ).hide();
139	});
140	$('.header-style6 .header-top .top-header').on('click', function(){
141		$('.header-style6 .header-top .top-header').slideToggle();
142	});
143	/*add title to button*/
144	$("a.compare").attr('title', custom_text.compare_text);
145	$(".yith-wcwl-add-button a").attr('title', custom_text.wishlist_text);
146	$("a.fancybox").attr('title', custom_text.quickview_text);
147	$("a.add_to_cart_button").attr('title', custom_text.cart_text);
148	
149	$(document).ready(function(){
150		$('[data-toggle="tooltip"]').tooltip(); 
151		
152		$('#myTabs a').hover(function (e) {
153			 e.preventDefault();
154			$(this).tab('show');
155			 $("li.onemall-mega-menu").removeClass("active");
156			 //removing active class from other selected/default tab
157			$("#myTabs .active").removeClass("active");
158
159			//adding active class to current clicked tab
160			$(this).parent().addClass("active");
161		});
162	});
163	/*
164	** Product listing order hover
165	*/
166	$('ul.orderby.order-dropdown li ul').hide(); 
167	$("ul.order-dropdown > li").each( function(){
168		$(this).hover( function() {
169			$('.products-wrapper').addClass('show-modal');
170			$(this).find( '> ul' ).stop().fadeIn("fast");
171		}, function() {
172			$('.products-wrapper').removeClass('show-modal');
173			$(this).find( '> ul' ).stop().fadeOut("fast");
174		});
175	});
176	
177	/*
178	** Product listing select box
179	*/
180	$('.catalog-ordering .orderby .current-li a').html($('.catalog-ordering .orderby ul li.current a').html());
181	$('.catalog-ordering .sort-count .current-li a').html($('.catalog-ordering .sort-count ul li.current a').html());
182	
183	/*
184	** Quickview and single product slider
185	*/
186	$(document).ready(function(){
187		/* 
188		** Slider single product image
189		*/
190		$( '.product-images' ).each(function(){
191			var $rtl 					= $('body').hasClass( 'rtl' );
192			var $vertical			= $(this).data('vertical');
193			var $img_slider 	= $(this).find('.product-responsive');
194			var video_link 		= $(this).data('video');
195			var $thumb_slider = $(this).find('.product-responsive-thumbnail' );
196			
197			$img_slider.slick({
198				slidesToShow: 1,
199				slidesToScroll: 1,
200				fade: true,
201				arrows: false,
202				rtl: $rtl,
203				asNavFor: $thumb_slider,
204				infinite: false
205			});
206			$thumb_slider.slick({
207				slidesToShow: 5,
208				slidesToScroll: 1,
209				asNavFor: $img_slider,
210				arrows: true,
211				rtl: $rtl,
212				infinite: false,
213				vertical: $vertical,
214				verticalSwiping: $vertical,
215				focusOnSelect: true,
216				responsive: [
217				{
218					breakpoint: 480,
219					settings: {
220						slidesToShow: 4    
221					} 
222				},
223				{
224					breakpoint: 360,
225					settings: {
226						slidesToShow: 2    
227					}
228				}
229				]
230			});
231
232			var el = $(this);
233			setTimeout(function(){
234				el.removeClass("loading");
235				var height = el.find('.product-responsive').outerHeight();
236				var target = el.find( ' .item-video' );
237				target.css({'height': height,'padding-top': (height - target.outerHeight())/2 });
238
239				var thumb_height = el.find('.product-responsive-thumbnail' ).outerHeight();
240				var thumb_target = el.find( '.item-video-thumb' );
241				thumb_target.css({ height: thumb_height,'padding-top':( thumb_height - thumb_target.outerHeight() )/2 });
242			}, 1000);
243			if( video_link != '' ) {
244				$img_slider.append( '<button data-type="popup" class="featured-video-button fa fa-video-camera" data-video="'+ video_link +'"></button>' );
245			}
246		});
247	});
248
249	/*
250	** Hover on mobile and tablet
251	*/
252	var mobileHover = function () {
253		$('*').on('touchstart', function () {
254			$(this).trigger('hover');
255		}).on('touchend', function () {
256			$(this).trigger('hover');
257		});
258	};
259	mobileHover();
260	
261	/*
262	** Menu hidden
263	*/
264	$('.product-categories').each(function(){
265		var number	 = $(this).data( 'number' ) - 1;
266		var lesstext = $(this).data( 'lesstext' );
267		var moretext = $(this).data( 'moretext' );
268		if( number > 0 ) {
269			$(this).find( 'li:gt('+ number +')' ).hide().end();		
270			if( $(this).children('li').length > number ){ 
271				$(this).append(
272					$('<li><a>'+ moretext +'   +</a></li>')
273					.addClass('showMore')
274					.on('click',function(){
275						if($(this).siblings(':hidden').length > 0){
276							$(this).html( '<a>'+ lesstext +'   -</a>' ).siblings(':hidden').show(400);
277						}else{
278							$(this).html( '<a>'+ moretext +'   +</a>' ).show().siblings( ':gt('+ number +')' ).hide(400);
279						}
280					})
281					);
282			}
283		}
284	});
285	
286
287	var w_width = $(window).width(); 
288	if( w_width <= 480){
289		jQuery('.mobile-layout .header-mobile-style5 .ouioui_resmenu')
290		.find(' > li:gt(6) ') 
291		.hide()
292		.end()
293		.each(function(){
294			if($(this).children('li').length > 6){ 
295				$(this).append(
296					$('<li><a class="open-more-cat">More Categories</a></li>')
297					.addClass('showMore')
298					.on('click', function(){
299						if($(this).siblings(':hidden').length > 0){
300							$(this).html('<a class="close-more-cat">Close Categories</a>').siblings(':hidden').show(400);
301						}else{
302							$(this).html('<a class="open-more-cat">More Categories</a>').show().siblings('li:gt(6)').hide(400);
303						}
304					})
305					);
306			}
307		});
308	}
309	/* 
310	** Fix accordion heading state 
311	*/
312	$('.accordion-heading').each(function(){
313		var $this = $(this), $body = $this.siblings('.accordion-body');
314		if (!$body.hasClass('in')){
315			$this.find('.accordion-toggle').addClass('collapsed');
316		}
317	});	
318
319	
320	/*
321	** Cpanel
322	*/
323	$('#cpanel').collapse();
324
325	$('#cpanel-reset').on('click', function(e) {
326
327		if (document.cookie && document.cookie != '') {
328			var split = document.cookie.split(';');
329			for (var i = 0; i < split.length; i++) {
330				var name_value = split[i].split("=");
331				name_value[0] = name_value[0].replace(/^ /, '');
332
333				if (name_value[0].indexOf(cpanel_name)===0) {
334					$.cookie(name_value[0], 1, { path: '/', expires: -1 });
335				}
336			}
337		}
338
339		location.reload();
340	});
341
342	$('#cpanel-form').on('submit', function(e){
343		var $this = $(this), data = $this.data(), values = $this.serializeArray();
344
345		var checkbox = $this.find('input:checkbox');
346		$.each(checkbox, function() {
347
348			if( !$(this).is(':checked') ) {
349				name = $(this).attr('name');
350				name = name.replace(/([^\[]*)\[(.*)\]/g, '$1_$2');
351				var date = new Date();
352				date.setTime(date.getTime() + (30 * 1000));
353				$.cookie( name , 0, { path: '/', expires: date });
354			}
355
356		})
357
358		$.each(values, function(){
359			var $nvp = this;
360			var name = $nvp.name;
361			var value = $nvp.value;
362
363			if ( !(name.indexOf(cpanel_name + '[')===0) ) return ;
364
365			name = name.replace(/([^\[]*)\[(.*)\]/g, '$1_$2');
366
367			$.cookie( name , value, { path: '/', expires: 7 });
368
369		});
370
371		location.reload();
372
373		return false;
374
375	});
376
377	$('a[href="#cpanel-form"]').on( 'click', function(e) {
378		var parent = $('#cpanel-form'), right = parent.css('right'), width = parent.width();
379
380		if ( parseFloat(right) < -10 ) {
381			parent.animate({
382				right: '0px',
383			}, "slow");
384		} else {
385			parent.animate({
386				right: '-' + width ,
387			}, "slow");
388		}
389
390		if ( $(this).hasClass('active') ) {
391			$(this).removeClass('active');
392		} else $(this).addClass('active');
393
394		e.preventDefault();
395	});
396	
397	/*
398	** Language
399	*/
400	var $current ='';
401	$('#lang_sel ul > li > ul li a').on('click',function(){
402		$current = $(this).html();
403		$('#lang_sel ul > li > a.lang_sel_sel').html($current);
404		$a = $.cookie('lang_select_ouioui', $current, { expires: 1, path: '/'}); 
405	});
406	
407	if( $.cookie('lang_select_ouioui') && $.cookie('lang_select_ouioui').length > 0 ) {
408		$('#lang_sel ul > li > a.lang_sel_sel').html($.cookie('lang_select_ouioui'));
409	}
410
411	$('#lang_sel ul > li.icl-ar').click(function(){
412		$('#lang_sel ul > li.icl-en').removeClass( 'active' );
413		$(this).addClass( 'active' );
414		$.cookie( 'ouioui_lang_en' , 1, { path: '/', expires: 1 });
415	});
416	
417	$('#lang_sel ul > li.icl-en').click(function(){
418		$('#lang_sel ul > li.icl-ar').removeClass( 'active' );
419		$(this).addClass( 'active' );
420		$.cookie( 'ouioui_lang_en' , 0, { path: '/', expires: -1 });
421	});
422	
423	var Ouioui_Lang = $.cookie( 'ouioui_lang_en' );
424	if( Ouioui_Lang == null ){
425		$('#lang_sel ul > li.icl-en').addClass( 'active' );
426		$('#lang_sel ul > li.icl-ar').removeClass( 'active' );
427	}else{
428		$('#lang_sel ul > li.icl-en').removeClass( 'active' );
429		$('#lang_sel ul > li.icl-ar').addClass( 'active' );
430	}
431	
432	/*
433	** Clear header style 
434	*/
435	$( '.ouioui-logo' ).on('click', function(){
436		$.cookie("ouioui_header_style", null, { path: '/' });
437		$.cookie("ouioui_footer_style", null, { path: '/' });
438	});
439	
440	/*
441	** Footer accordion
442	*/
443	$('.mobile-layout .cusom-menu-mobile .widget_nav_menu h2.widgettitle').append('<span class="icon-footer"></span>');
444
445	$(".mobile-layout .cusom-menu-mobile .widget_nav_menu h2.widgettitle").each(function(){
446		$(this).on('click', function(){
447			$(this).parent().find("ul.menu").slideToggle();
448		});
449	});
450	if ($(window).width() < 768) {	
451
452		$('.footer .widget_nav_menu h2.widgettitle').append('<span class="icon-footer"></span>');
453		$('.footer .wpb_content_element .info-footer h3').append('<span class="icon-footer"></span>');
454
455		$(".footer .widget_nav_menu h2.widgettitle").each(function(){
456			$(this).on('click', function(){
457				$(this).parent().find("ul.menu").slideToggle();
458			});
459		});
460		
461		$(".footer .wpb_content_element .info-footer h3").each(function(){
462			$(this).on('click', function(){
463				$(this).parent().find("ul").slideToggle();
464			});
465		});	
466		
467	}
468	
469	if ($(window).width() < 768) {	
470		
471		$('.footer .footer-style7 .wpb_content_element .newletter h3').append('<span class="icon-footer"></span>');
472		
473		$(".footer .footer-style7 .wpb_content_element h3").each(function(){
474			$(this).on('click', function(){
475				$(this).parent().find(".wrapper-footer").slideToggle();
476			});
477		});	
478		
479		
480		$('.footer .footer-home10 .wpb_content_element h3').append('<span class="icon-footer"></span>');
481
482		$(".footer .footer-home10 .wpb_content_element h3").each(function(){
483			$(this).on('click', function(){
484				$(this).parent().find(".wrapper-footer").slideToggle();
485			});
486		});		
487		
488	}
489	
490
491	/*
492	** Back to top
493	**/
494	$("#ouioui-totop").hide();
495	var wh = $(window).height();
496	var whtml = $(document).height();
497	$(window).scroll(function () {
498		if ($(this).scrollTop() > whtml/10) {
499			$('#ouioui-totop').fadeIn();
500		} else {
501			$('#ouioui-totop').fadeOut();
502		}
503	});
504	
505	$('#ouioui-totop').click(function () {
506		$('body,html').animate({
507			scrollTop: 0
508		}, 800);
509		return false;
510	});
511	/* end back to top */
512
513 /*
514 ** Fix js 
515 */
516 $('.wpb_map_wraper').on('click', function () {
517 	$('.wpb_map_wraper iframe').css("pointer-events", "auto");
518 });
519
520 $( ".wpb_map_wraper" ).on('mouseleave', function() {
521 	$('.wpb_map_wraper iframe').css("pointer-events", "none"); 
522 });
523
524	/*
525	** Change Layout 
526	*/
527	$( window ).load(function() {	
528		if( $( 'body' ).hasClass( 'tax-product_cat' ) || $( 'body' ).hasClass( 'post-type-archive-product' ) || $( 'body' ).hasClass( 'tax-dc_vendor_shop' ) ) {
529			$('.grid-view').on('click',function(){
530				$('.list-view').removeClass('active');
531				$('.grid-view').addClass('active');
532				jQuery("ul.products-loop").fadeOut(300, function() {
533					$(this).removeClass("list").fadeIn(300).addClass( 'grid' );			
534				});
535			});
536			
537			$('.list-view').on('click',function(){
538				$( '.grid-view' ).removeClass('active');
539				$( '.list-view' ).addClass('active');
540				$("ul.products-loop").fadeOut(300, function() {
541					jQuery(this).addClass("list").fadeIn(300).removeClass( 'grid' );
542				});
543			});
544			/* End Change Layout */
545		} 
546	});
547	$(window).scroll(function() {    
548		var whtop = $(window).scrollTop(); 
549		if (whtop > 0) {
550			$(".header-style4").addClass("header-ontop");
551		} else {
552			$(".header-style4").removeClass("header-ontop");
553		} 
554	});
555	
556	/*remove loading*/
557	$(".sw-woo-tab").fadeIn(300, function() {
558		var el = $(this);
559		setTimeout(function(){
560			el.removeClass("loading");
561		}, 1000);
562	});
563	$(".responsive-slider").fadeIn(300, function() {
564		var el = $(this);
565		setTimeout(function(){
566			el.removeClass("loading");
567		}, 1000);
568	});
569})(jQuery);
570
571/*
572** Check comment form
573*/
574function submitform(){
575	if(document.commentform.comment.value=='' || document.commentform.author.value=='' || document.commentform.email.value==''){
576		alert('Please fill the required field.');
577		return false;
578	} else return true;
579}
580(function($){		
581	
582	/*Verticle Menu*/
583	if( !( $('#header').hasClass( 'header-style7' ) ) ) {
584		$('.vertical-megamenu').each(function(){
585			var number	 = $(this).parent().data( 'number' ) - 1;
586			var lesstext = $(this).parent().data( 'lesstext' );
587			var moretext = $(this).parent().data( 'moretext' );
588			$(this).find(	' > li:gt('+ number +')' ).hide().end();		
589			if($(this).children('li').length > number ){ 
590				$(this).append(
591					$('<li><a class="open-more-cat">'+ moretext +'</a></li>')
592					.addClass('showMore')
593					.on('click', function(){
594						if($(this).siblings(':hidden').length > 0){
595							$(this).html('<a class="close-more-cat">'+ lesstext +'</a>').siblings(':hidden').show(400);
596						}else{
597							$(this).html('<a class="open-more-cat">'+ moretext +'</a>').show().siblings( ':gt('+ number +')' ).hide(400);
598						}
599					})
600					);
601			}
602		});
603	}
604
605
606	$(".widget_nav_menu li.menu-compare a").hover(function() {
607		$(this).css('cursor','pointer').attr('title', custom_text.compare_text);
608	}, function() {
609		$(this).css('cursor','auto');
610	});
611	$(".widget_nav_menu li.menu-wishlist a").hover(function() {
612		$(this).css('cursor','pointer').attr('title', custom_text.wishlist_text);
613	}, function() {
614		$(this).css('cursor','auto');
615	});
616	
617	$(window).scroll(function() {   
618		if( $( 'body' ).hasClass( 'mobile-layout' ) ) {
619			var target = $( '.mobile-layout #header-page' );
620			var sticky_nav_mobile_offset = $(".mobile-layout #header-page").offset();
621			if( sticky_nav_mobile_offset != null ){
622				var sticky_nav_mobile_offset_top = sticky_nav_mobile_offset.top;
623				var scroll_top = $(window).scrollTop();
624				if ( scroll_top > sticky_nav_mobile_offset_top ) {
625					$(".mobile-layout #header-page").addClass('sticky-mobile');
626				}else{
627					$(".mobile-layout #header-page").removeClass('sticky-mobile');
628				}
629			}
630		}
631	});
632
633	/**
634	* Quickview
635	**/
636	if( $('body').html().match( /sw-quickview-bottom/ ) ){
637		var qv_target =  $('.sw-quickview-bottom');
638		$(document).on( 'click', 'button[data-type="popup"]', function(){
639			var video_url = $(this).data( 'video' );
640			qv_target.addClass( 'show loading' );					
641			setTimeout(function(){
642				qv_target.find( '.quickview-inner' ).append( '<div class="video-wrapper"><iframe width="560" height="390" src="'+ video_url +'" frameborder="0" allowfullscreen></iframe></div>' );	
643				qv_target.find( '.quickview-content' ).css( 'margin-top', ( $(window).height() - qv_target.find( '.quickview-content' ).outerHeight() ) /2 );
644				qv_target.removeClass( 'loading' );
645			}, 1000);
646		});
647		$(document).on( 'click', 'a[data-type="quickview"]', function(){
648			var product_id = $(this).data( 'product_id' ), ajaxurl = $(this).data( 'ajax_url' ).replace( '%%endpoint%%', 'ou
648ioui_quickviewproduct' );
649			qv_target.addClass( 'show loading' );
650			var data 		= {
651				action: 'ouioui_quickviewproduct',
652				product_id: product_id,
653				
654			};
655			jQuery.post(ajaxurl, data, function(response) {
656				qv_target.find( '.quickview-inner' ).append( response );				
657				qv_target.removeClass( 'loading' );
658				$( '.quickview-container .product-images' ).each(function(){
659					var $id 					= this.id;
660					var $rtl 					= $('body').hasClass( 'rtl' );
661					var $img_slider 	= $(this).find('.product-responsive');
662					var $thumb_slider = $(this).find('.product-responsive-thumbnail' )
663					$img_slider.slick({
664						slidesToShow: 1,
665						slidesToScroll: 1,
666						fade: true,
667						arrows: false,
668						rtl: $rtl,
669						asNavFor: $thumb_slider
670					});
671					$thumb_slider.slick({
672						slidesToShow: 4,
673						slidesToScroll: 1,
674						asNavFor: $img_slider,
675						arrows: true,
676						focusOnSelect: true,
677						rtl: $rtl,
678						responsive: [				
679						{
680							breakpoint: 360,
681							settings: {
682								slidesToShow: 2    
683							}
684						}
685						]
686					});
687
688					var el = $(this);
689					setTimeout(function(){
690						el.removeClass("loading");
691						var height = el.find('.product-responsive').outerHeight();
692						var target = el.find( ' .item-video' );
693						target.css({'height': height,'padding-top': (height - target.outerHeight())/2 });
694
695						var thumb_height = el.find('.product-responsive-thumbnail' ).outerHeight();
696						var thumb_target = el.find( '.item-video-thumb' );
697						thumb_target.css({ height: thumb_height,'padding-top':( thumb_height - thumb_target.outerHeight() )/2 });
698						qv_target.find( '.quickview-content' ).css( 'margin-top', ( $(window).height() - qv_target.find( '.quickview-content' ).outerHeight() ) /2 );
699					}, 1000);
700				});				
701			});
702		});
703		
704		$( '.quickview-close' ).on('click', function(){
705			qv_target.removeClass( 'show' );
706			qv_target.find( '.quickview-inner' ).html('');			
707		});
708		$(document).click(function(e) {			
709			var container = qv_target.find( '.quickview-inner' );
710			if ( !container.is(e.target) && container.has(e.target).length === 0 && qv_target.find( '.quickview-inner' ).html().length > 0 ){
711				qv_target.removeClass( 'show' );
712				qv_target.find( '.quickview-inner' ).html('');
713			}
714		});
715	}
716
717	/*
718	** Ajax login
719	*/
720	$('form#login_ajax').on('submit', function(e){
721		var target = $(this);		
722		var usename = target.find( '#username').val();
723		var pass 	= target.find( '#password').val();
724		if( usename.length == 0 || pass.length == 0 ){
725			target.find( '#login_message' ).addClass( 'error' ).html( custom_text.message );
726			return false;
727		}
728		target.addClass( 'loading' );
729		$.ajax({
730			type: 'POST',
731			dataType: 'json',
732			url: custom_text.ajax_url,
733			headers: { 'api-key':target.find( '#woocommerce-login-nonce').val() },
734			data: { 
735				'action': 'ouioui_custom_login_user',
736				'username': target.find( '#username').val(), 
737				'password': target.find( '#password').val(), 
738				'security': target.find( '#woocommerce-login-nonce').val() 
739			},
740			success: function(data){
741				target.removeClass( 'loading' );
742				target.find( '#login_message' ).html( data.message );
743				if (data.loggedin == false){
744					target.find( '#username').css( 'border-color', 'red' );
745					target.find( '#password').css( 'border-color', 'red' );
746					target.find( '#login_message' ).addClass( 'error' );
747				}
748				if (data.loggedin == true){
749					target.find( '#username').removeAttr( 'style' );
750					target.find( '#password').removeAttr( 'style' );
751					document.location.href = data.redirect;
752					target.find( '#login_message' ).removeClass( 'error' );
753				}
754			}
755		});
756		e.preventDefault();
757	});
758
759})(jQuery);	

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.