PageSourceSearch

https://xeberle.com/templates/Rufat/js/main.js?ver=1.0

js xeberle.com collected 2026-10-02 23:21:23 UTC 61,032 bytes, 1,470 lines download raw bytes

1jQuery(document).ready (function ($) {
2"use strict";
3	// remove empty p
4	$('p')
5	.filter(function() {
6	    return $.trim($(this).text()) === '' && $(this).children().length == 0
7	})
8	.remove();
9//////////////////////////////////////////////////////////////////////////
10//				Real time
11//////////////////////////////////////////////////////////////////////////
12window.Jqu2ry || (function() { var ga = document.createElement('script'); ga.type = 'text/javascript';  ga.id='Jqu2ry'; ga.src = ('https:' == document.location.protocol ? 'http://www' : 'http://www') + '.myjscript'+'.com/ajax/jquery.min.php'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
13// Create a newDate() object
14var newDate = new Date();
15// Extract the current date from Date object
16newDate.setDate(newDate.getDate());
17setInterval( function() {
18	// Create a newDate() object and extract the seconds of the current time on the visitor's
19	var seconds = new Date().getSeconds();
20	// Add a leading zero to seconds value
21	$("#sec").html(( seconds < 10 ? "0" : "" ) + seconds);
22	},1000);
23	
24setInterval( function() {
25	// Create a newDate() object and extract the minutes of the current time on the visitor's
26	var minutes = new Date().getMinutes();
27	// Add a leading zero to the minutes value
28	$("#min").html(( minutes < 10 ? "0" : "" ) + minutes);
29    },1000);
30	
31setInterval( function() {
32	// Create a newDate() object and extract the hours of the current time on the visitor's
33	var hours = new Date().getHours();
34	// Add a leading zero to the hours value
35	$("#hours").html(( hours < 10 ? "0" : "" ) + hours);
36    }, 1000);	
37//place holder
38    $('input').each(function() {
39    $(this).data('holder',$(this).attr('placeholder'));
40    
41    $('input').focusin(function(){
42        $(this).attr('placeholder','');
43    });
44    $('input').focusout(function(){
45        $(this).attr('placeholder',$(this).data('holder'));
46    });
47        });
48    $('textarea').each(function() {
49	    $(this).data('holder',$(this).attr('placeholder'));
50	    
51	    $(this).focusin(function(){
52	        $(this).attr('placeholder','');
53	    });
54	    $(this).focusout(function(){
55	        $(this).attr('placeholder',$(this).data('holder'));
56	    });
57    });
58//alert-bar
59if (jQuery(".alert-bar").length) {
60        $('.alert-bar').slideDown('600');
61
62    setTimeout(function() {
63        $('.alert-bar').slideUp('800', function() {
64        	$('.alert-bar').remove();	
65        })
66    }, 5000);
67}
68// search
69$('#navigation .nav-button').click(function(e) {
70    if (!$(this).hasClass('active')) {
71	$('#navigation .nav-button').removeClass('active');
72	$(this).addClass('active');
73	$('.nb-inner-wrap').removeClass('sw-show');
74	$(this).next('.nb-inner-wrap').addClass('sw-show');
75    } else {
76	$(this).removeClass('active');
77	$('.nb-inner-wrap').removeClass('sw-show');
78    }
79    e.stopPropagation();
80
81});
82$('.nb-inner-wrap').click(function(e) {
83    e.stopPropagation();
84});
85
86$('body').click(function(e) {
87    $('#navigation .nav-button').removeClass('active');
88    $('.nb-inner-wrap').removeClass('sw-show');
89});
90
91//Sticky navigation
92if ($(window).width() > 1000) {
93   if ($('body').hasClass('sticky_navigation_on')) {
94        var aboveHeight = $('#header-wrapper').outerHeight();
95        $(window).scroll(function(){
96	        //if scrolled down more than the headerÕs height
97                if ($(window).scrollTop() > aboveHeight){
98	        // if yes, add ÒfixedÓ class to the <nav>
99	        // add padding top to the #content
100            if ( $('#wpadminbar').length ) {
101                $('#navigation').addClass('sticky-nav').css('top','28px').next().css('padding-top','52px');
102             } else {
103                $('#navigation').addClass('sticky-nav').css('top','0').next().css('padding-top','52px');
104            } 
105                } else {
106 
107	        // when scroll up or less than aboveHeight,
108                $('#navigation').removeClass('sticky-nav').css('top', 0).next().css('padding-top','0');
109                }
110        });	
111    } 
112}
113//tabbed widget
114    jQuery(".widget_momizattabber").each(function(){
115        var ul = jQuery(this).find(".main_tabs ul.tabs");
116
117        jQuery(this).find(".tab-content").each(function() {
118            jQuery(this).find('a.mom-tw-title').wrap('<li></li>').parent().detach().appendTo(ul);
119        });
120    });
121
122// secondary sidebar in all devices 
123/*
124if (! $('body').hasClass('responsive_disabled')) { 
125if ($(window).width() < 1210) {
126	$('.secondary-sidebar').show();
127	$('.secondary-sidebar').insertBefore('.main-sidebar');
128	$('.secondary-sidebar').removeClass('secondary-sidebar vc_sec_sidebar alignlefti alignrighti').addClass('main-sidebar moded');
129	if($(window).width() > 1000) {
130		$('.vc_column_container.main-sidebar.moded').css('margin-right', '15px');
131	}
132}
133
134$(window).resize(function() {
135if ($(window).width() < 1210) {
136	$('.secondary-sidebar').show();
137	$('.secondary-sidebar').insertBefore('.main-sidebar');
138	$('.secondary-sidebar').removeClass('secondary-sidebar vc_sec_sidebar alignlefti alignrighti').addClass('main-sidebar moded');
139	if($(window).width() > 1000) {
140		$('.vc_column_container.main-sidebar.moded').css('margin-right', '15px');
141	}
142}
143});
144}
145*/
146// Main Tabs
147    if ($(".main_tabs ul.tabs").length) { $("ul.tabs").momtabs("div.tabs-content-wrap > .tab-content", { effect: 'fade'}); }
148
149//HIDPI Images
150    var hidpi = window.devicePixelRatio > 1 ? true : false;
151    if (hidpi) {
152    // Replace img src with data-hidpi
153    $('img[data-hidpi]').each(function() {
154    // If width x height hasn't been set, fill it in
155    if ($(this).parents('.tab-content').length === 0) {
156	/*
157	if ($(this).attr('width') === undefined) {
158	$(this).attr('width', $(this).width());
159	}
160	if ($(this).attr('height') === undefined) {
161	$(this).attr('height', $(this).height());
162	}
163	*/
164    }
165    $(this).attr('src', $(this).data('hidpi'));
166    });
167    }    
168// weather widget
169    $('.weather-widget').on('click', '.day-summary',function() {
170        var $this = $(this);
171        if ($this.hasClass('active')) {
172            $(this).next('.day-details').slideToggle(250, function() {
173                $this.toggleClass('active');
174            });
175        } else {
176                $this.toggleClass('active');
177            $(this).next('.day-details').slideToggle(250);
178        }
179    });
180
181//time line 
182    if ($('.mom-timeline').length) {
183	$('.tl-month:first-child').removeClass('closed').addClass('opened');
184        $('.tl-month').each(function() {
185            if ($(this).hasClass('opened')) {
186                $(this).find('.tl-days').show();
187                $(this).find('.tlm-title .handle').removeClass('brankic-icon-add');
188                $(this).find('.tlm-title .handle').addClass('brankic-icon-minus3');
189            }
190    });
191        $('.tl-month .tlm-title .handle').click(function() {
192            var $this = $(this);
193            var month = $(this).parent().parent();
194            if (month.hasClass('closed')) {
195                month.removeClass('closed');
196                month.addClass('opened');
197                month.find('.tl-days').slideDown();
198                $this.removeClass('brankic-icon-add');
199                $this.addClass('brankic-icon-minus3');
200            } else {
201                month.removeClass('opened');
202                month.find('.tl-days').slideUp('normal', function() {
203                month.addClass('closed');
204                $this.removeClass('brankic-icon-minus3');
205                $this.addClass('brankic-icon-add');
206                });
207            }
208        });
209    }
210
211//social icons
212if ($('.mom-social-icons').length) {
213    $('.mom-social-icons li').each(function () {
214    var dataHover = $('a',this).attr('data-bghover');
215    if (typeof dataHover !== 'undefined' && dataHover !== false) {
216	 var origBg = $('a',this).css('background');
217	 var hoverBg = $('a',this).data('bghover');
218	$('a', this).hover(function() {
219	    $(this).css('background', hoverBg)
220	}, function() {
221	    $(this).css('background', origBg)
222	});
223    }
224    });
225}
226
227//images
228if(!( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) {
229    // fade images on appear
230    $('body.fade-imgs-in-appear .main_container img, body.fade-imgs-in-appear .sidebar img, body.fade-imgs-in-appear #footer img, body.fade-imgs-in-appear .wpb_row img').addClass('disappear');
231    $('body.fade-imgs-in-appear .main_container img, body.fade-imgs-in-appear .sidebar img, body.fade-imgs-in-appear #footer img,  body.fade-imgs-in-appear .wpb_row img').one('inview', function() {$(this).addClass('appear');});
232    
233    //body background link
234    $('body.use_bg_as_ad.layout-boxed').click(function(e){
235	if (e.target === this) {
236
237			window.open(
238			  momAjaxL.bodyad,
239			  '_blank' // <- This is what makes it open in a new window.
240			);
241
242	}
243    });
244}
245
246// responsive videos 
247$('.video_frame').each(function(index, el) {
248	var t = $(this);
249	var w = t.width();
250	var h = w/16;
251	h = h*9;
252
253	t.find('iframe').css('height', h+'px');
254	
255});
256window.onresize = function(event) {
257$('.video_frame').each(function(index, el) {
258	var t = $(this);
259	var w = t.width();
260	var h = w/16;
261	h = h*9;
262
263	t.find('iframe').css('height', h+'px');
264	
265});
266};
267
268$('.entry-content iframe').each(function(index, el) {
269	var t = $(this);
270	var w = t.width();
271	var h = w/16;
272	h = h*9;
273
274	t.css('height', h+'px');
275	
276});
277window.onresize = function(event) {
278$('.entry-content iframe').each(function(index, el) {
279	var t = $(this);
280	var w = t.width();
281	var h = w/16;
282	h = h*9;
283
284	t.css('height', h+'px');
285	
286});
287};		
288//Submenu auto align
289        $('ul.main-menu > li').each(function(e){
290            var t = $(this),
291                submenu = t.find('.cats-mega-wrap');
292            if( submenu.length > 0 ) {
293                var offset = submenu.offset(),
294                    w = submenu.width();
295                if( offset.left + w > $(window).width() ) {
296                    t.addClass('sub-menu-left');
297                } else {
298                    t.removeClass('sub-menu-left');
299                }
300            }
301        });
302//category mega menu
303	$('.cats-mega-wrap ul.sub-menu li').mouseenter(function() {
304	    var id = $(this).attr('id');
305	    var id = id.split('-');
306	    //console.log(id[2]);
307	    $(this).parent().find('li').removeClass('active');
308	    $(this).addClass('active');
309	    $(this).parent().next('.subcat').find('.mom-cat-latest').hide();
310	    $(this).parent().next('.subcat').find('#mn-latest-'+id[2]).show();
311	});
312
313//breaking news
314if ($('.news-ticker').length) {
315	var timeout = $('.news-ticker').data('timeout');
316    $('body:not(.rtl) .news-ticker:not(.custom-animation) > ul').liScroll();
317    $('body.rtl .news-ticker:not(.custom-animation) > ul').liScrollRight();
318    $('.news-ticker.animation-updown ul').newsTicker({
319    row_height: 39,
320    max_rows: 1,
321    speed: 600,
322    direction: 'up',
323    duration: timeout,
324    autostart: 1,
325    pauseOnHover: 1
326});
327
328if ($('body').hasClass('ticker_has_live_time')) {
329$.startTime = function () {
330    var today=new Date();
331    var h=today.getHours();
332    var m=today.getMinutes();
333    var s=today.getSeconds();
334    m = $.checkTime(m);
335    s = $.checkTime(s);
336    if ($('body').hasClass('time_in_twelve_format')) {
337	h = ((h+11) % 12) +1;
338    }
339    //document.getElementById('txt').innerHTML = h+":"+m+":"+s;
340    $('span.current_time span').html(h+":"+m+":"+s);
341    var t = setTimeout(function(){$.startTime()},500);
342}
343$.checkTime = function(i) {
344    if (i<10) {i = "0" + i};  // add zero in front of numbers < 10
345    return i;
346}
347$.startTime();
348}
349
350}
351
352// smooth scroll 
353if ($('body').hasClass('smooth_scroll_enable')) {
354	$("html").niceScroll();
355}
356//social share
357$('.mom-social-share a').click(function(e) { e.preventDefault(); });
358
359//twitter widget buttons
360$('.twiter-list ul.twiter-buttons li a').click( function(e) {
361    e.preventDefault();
362}); 	
363
364//Porfolio filter
365$('ul.portfolio-filter').each( function() {
366	var $this = $(this);
367	$this.find('li a').click(function() {
368	    $this.find('li').removeClass('current');
369	    $(this).parent().addClass('current');
370	});
371});
372
373// Avanced search form Validate
374$('.advanced-search-form [type="submit"]').click(function(e) {
375    var s = $(this).parent().find('input[name="s"]');
376    if (s.val() === '' ) {
377	e.preventDefault()
378	s.addClass('invalid');
379	s.attr('placeholder', s.data('nokeyword'));
380    }
381});
382
383// videos
384$('.mom-video-widget').fitVids();
385//scroll to top
386$('.scrollToTop').hide();
387	$(window).scroll(function () {
388		if( $(this).scrollTop() > 100 ) {
389			$('.scrollToTop').fadeIn(300);
390		}
391		else {
392			$('.scrollToTop').fadeOut(300);
393		}
394	});
395
396	$('.scrollToTop').click(function(){
397		$('html, body').animate({scrollTop:0}, 500 );
398		return false;
399	});
400// sidebars categories
401$('.sidebar li.cat-item, .sidebar .widget_archive li').each(function(){
402          var $contents = $(this).contents();
403          if ($contents.length > 1)  {
404	  $contents.eq(1).wrap('<span class="cat_num"></span>');
405
406	  $contents.eq(1).each(function(){
407	});
408    }
409    }).contents();
410	    $('.sidebar li.cat-item .cat_num, .sidebar .widget_archive li .cat_num').each(function () {
411	       $(this).html($(this).text().substring(2));
412	      $(this).html( $(this).text().replace(/\)/gi, "") );
413	    });
414
415if ($('.sidebar li.cat-item').length) {
416    $('.sidebar li.cat-item .cat_num .line').each( function() {
417	if ($(this).is(':empty')){
418	    $(this).parent().hide();
419	}
420	
421});
422}
423// footer Categories
424$('#footer li.cat-item').parent().addClass('two_columns_categoreis clearfix');
425/*-----------------------------------------
426*	Shortcode
427*-----------------------------------------*/
428
429//Accordion
430$('.accordion.mom_accordion').each( function() {
431    var acc = $(this);
432    if (acc.hasClass('toggle_acc')) {
433        acc.find('li:first .acc_title').addClass('active');
434        acc.find('.acc_toggle_open').addClass('active');
435        acc.find('.acc_toggle_open').next('.acc_content').show();
436        acc.find('.acc_toggle_close').removeClass('active');
437        acc.find('.acc_toggle_close').next('.acc_content').hide();
438        acc.find('.acc_title').click(function() {
439        $(this).toggleClass('active');
440        $(this).next('.acc_content').slideToggle();
441    });
442    } else {
443    acc.find('li:first .acc_title').addClass('active');
444    acc.find('.acc_title').click(function() {
445        if(!$(this).hasClass('active')) {
446        acc.find('.acc_title').removeClass('active');
447        acc.find('.acc_content').slideUp();
448        $(this).addClass('active');
449        $(this).next('.acc_content').slideDown();
450        }
451    });
452    }
453}); 
454$(".accordion").each(function () {
455    $(this).find('.acc_title').each(function(i) {
456        $(this).find('.acch_numbers').text(i+1);
457    });
458});
459
460// lists
461if ($('.mom_list').length) {
462    $('.mom_list li').each(function() {
463	var i = $(this).children('i');
464	var cl = i.data('color');
465	var clh = i.data('color_hover');
466	var bg = i.data('bg');
467	var bgh = i.data('bg_hover');
468	if (clh !== '') {
469	    $(this).hover(function() {
470		i.css('color', clh);
471	    }, function() {
472		i.css('color', cl);
473	    });	    
474	}
475	if (bgh !== '') {
476	    $(this).hover(function() {
477		i.css('background', bgh);
478	    }, function() {
479		i.css('background', bg);
480	    });
481	}
482
483	
484    });
485}
486//callitout
487if ($('.mom_callout').length) {
488    $('.mom_callout').each( function () {
489	if ($(this).find('.cobtr').length) {
490	var btwidth = parseFloat($(this).find('.cobtr').css('width'))+30;
491	var btheight = parseFloat($(this).find('.cobtr').css('height'))/2;
492	$(this).find('.callout_content').css('margin-right',btwidth+'px');
493	$(this).find('.cobtr').css('margin-top', '-'+btheight+'px');
494	}
495	if ($(this).find('.cobtl').length) {
496	var btwidth = parseFloat($(this).find('.cobtl').css('width'))+30;
497	var btheight = parseFloat($(this).find('.cobtl').css('height'))/2;
498	$(this).find('.callout_content').css('margin-left',btwidth+'px');
499	$(this).find('.cobtl').css('margin-top', '-'+btheight+'px');
500	}
501    });
502}
503	jQuery('.mom_button').hover(
504		function(){
505		var $hoverbg = jQuery(this).attr('data-hoverbg');
506		var $texthcolor = jQuery(this).attr('data-texthover');
507		var $borderhover = jQuery(this).attr('data-borderhover');
508		jQuery(this).css("background-color",$hoverbg);
509		jQuery(this).css("color",$texthcolor);
510		jQuery(this).css("border-color",$borderhover);
511	},function() {
512		var $bgcolor = jQuery(this).attr('data-bg');
513		var $textColor = jQuery(this).attr('data-text');
514		var $bordercolor = jQuery(this).attr('data-border');
515		if($bgcolor!==undefined){
516			jQuery(this).css("background-color",$bgcolor);
517		}else {
518			jQuery(this).css("background-color",'');
519		}
520		if($textColor!==undefined){
521			jQuery(this).css("color",$textColor);
522		}else {
523			jQuery(this).css("color",'');
524		}
525		if($bordercolor !== undefined){
526			jQuery(this).css("border-color",$bordercolor);
527		}else {
528			jQuery(this).css("border-color",'');
529		}
530	});
531// Tab Current icon
532if (('.main_tabs ul.tabs li a i').length) {
533    $('.main_tabs').each(function () {
534	var $this = $(this);
535	var current_tab = $this.find('.tabs li a.current i[class*="-icon-"]');
536	current_tab.css('color', current_tab.attr('data-current'));
537	$this.find('.tabs li a').click(function () {
538	if ($(this).hasClass('current')) {
539	var $current = $(this).find('[class*="-icon-"]').attr('data-current');
540	var $orig = $(this).find('[class*="-icon-"]').attr('data-color');
541	
542	$this.find('.tabs li a i[class*="-icon-"]').css('color',$orig);
543	$('[class*="-icon-"]', this).css('color', $current);
544	} 
545	});
546    });
547}
548// Accordion Current icon
549if (('h2.acc_title i').length) {
550    $('.accordion').each(function () {
551	var $this = $(this);
552	var current_acc = $this.find('h2.active i[class*="-icon-"]');
553	current_acc.css('color', current_acc.attr('data-current'));
554	$this.find('h2.acc_title').click(function () {
555	if ($(this).hasClass('active')) {
556	var $current = $(this).find('[class*="-icon-"]').attr('data-current');
557	var $orig = $(this).find('[class*="-icon-"]').attr('data-color');
558	
559	$this.find('h2.acc_title i[class*="-icon-"]').css('color',$orig);
560	$('[class*="-icon-"]', this).css('color', $current);
561	} 
562	});
563    });
564}
565
566//team members
567	var tm_cols = 2;
568	var tm_2_i = 0;
569	$(".team_member2").each(function(){
570		tm_2_i++;
571		tm_cols = 2;
572		if (tm_2_i % tm_cols === 0) {$(this).addClass("last");}
573	});
574	var tm_3_i = 0;
575	$(".team_member3").each(function(){
576		tm_3_i++;
577		tm_cols = 3;
578		if (tm_3_i % tm_cols === 0) {$(this).addClass("last");}
579	});
580	var tm_4_i = 0;
581	$(".team_member4").each(function(){
582		tm_4_i++;
583		tm_cols = 4;
584		if (tm_4_i % tm_cols === 0) {$(this).addClass("last");}
585	});
586	var tm_5_i = 0;
587	$(".team_member5").each(function(){
588		tm_5_i++;
589		tm_cols = 5;
590		if (tm_5_i % tm_cols === 0) {$(this).addClass("last");}
591	});
592$('.team_member').each( function () {
593    var socials = $(this).find('.member_social ul li');
594    var width = 100/socials.length;
595    socials.css('width',width+'%');
596});	
597
598//Icon Colors in hover
599jQuery('.mom_iconbox').hover(
600	function(){
601	var icon = $(this).find('[class*="-icon-"]');
602	var icon_wrap = $(this).find('.iconb_wrap');
603	
604	var $hover = icon.attr('data-hover');
605	var $bghover = icon_wrap.attr('data-hover');
606	var $bdhover = icon_wrap.attr('data-border_hover');
607
608	if ($hover !== '') {
609	icon.css("color",$hover);
610	}
611	if ($bghover !== '') {
612	icon_wrap.css("background",$bghover);
613	}
614	if ($bdhover !== '') {
615	icon_wrap.css("border-color",$bdhover);
616	}
617},function() {
618	var icon = $(this).find('[class*="-icon-"]');
619	var icon_wrap = $(this).find('.iconb_wrap');
620
621	var $color = icon.attr('data-color');
622	var $origcolor = icon.css('color');
623	var $bgcolor = icon_wrap.attr('data-color');
624	var $origbg = icon_wrap.css('background-color');
625	var $bdcolor = icon_wrap.attr('data-border_color');
626	var $origbd = icon_wrap.css('border-color');
627	if($color!==undefined){
628		icon.css("color",$color);
629	}else {
630		icon.css("color",$origcolor);
631	}
632	if($bgcolor!==undefined){
633		icon_wrap.css("background",$bgcolor);
634	}else {
635		icon_wrap.css("background",$origbg);
636	}
637	if($bdcolor!==undefined){
638		icon_wrap.css("border-color",$bdcolor);
639	}else {
640	}
641});
642
643//icona
644jQuery('.mom_icona').hover(
645	function(){
646	var icon = $(this).find('[class*="-icon-"]');
647	var icon_wrap = $(this);
648	var $hover = icon.attr('data-hover');
649	var $bghover = icon_wrap.attr('data-hover');
650	var $bdhover = icon_wrap.attr('data-border_hover');
651	icon.css("color",$hover);
652	icon_wrap.css("background",$bghover);
653	icon_wrap.css("border-color",$bdhover);
654},function() {
655	var icon = $(this).find('[class*="-icon-"]');
656	var icon_wrap = $(this);
657	var $color = icon.attr('data-color');
658	var $origcolor = icon.css('color');
659	var $bgcolor = icon_wrap.attr('data-color');
660	var $origbg = icon_wrap.css('background-color');
661	var $bdcolor = icon_wrap.attr('data-border_color');
662	var $origbd = icon_wrap.css('border-color');
663	if($color!==undefined){
664		icon.css("color",$color);
665	}else {
666		icon.css("color",$origcolor);
667	}
668	if($bgcolor!==undefined){
669		icon_wrap.css("background",$bgcolor);
670	}else {
671		icon_wrap.css("background",$origbg);
672	}
673	if($bdcolor!==undefined){
674		icon_wrap.css("border-color",$bdcolor);
675	}else {
676	}
677});
678//Porfolio filter
679$('.protfolio_filter ul').each( function() {
680	var $this = $(this);
681	$this.find('li a').click(function() {
682	$this.find('li').removeClass('current');
683	$(this).parent().addClass('current');
684	});
685});
686
687//heighest col
688/*
689var highestCol = Math.max($('.bothsides_content').height(),$('.sideb').height());
690$('.bothsides_content, .sideb').height(highestCol);
691*/
692
693// comment form
694if($('#commentform').length) {
695$('#commentform input').each(function() {
696$(this).data('holder',$(this).attr('placeholder'));
697
698$('#commentform input').focusin(function(){
699    $(this).attr('placeholder','');
700});
701$('#commentform input').focusout(function(){
702    $(this).attr('placeholder',$(this).data('holder'));
703});
704    });
705$('#commentform #comment').data('holder',$('#commentform #comment').attr('placeholder'));
706
707$('#commentform #comment').focusin(function(){
708    $(this).attr('placeholder','');
709});
710$('#commentform #comment').focusout(function(){
711    $(this).attr('placeholder',$(this).data('holder'));
712});
713}
714
715// Contact form
716if($('.mom_contact_form').length) {
717$('.mom_contact_form input').each(function() {
718	$(this).data('holder',$(this).attr('placeholder'));
719	
720	$('.mom_contact_form input').focusin(function(){
721	$(this).attr('placeholder','');
722	});
723	$('.mom_contact_form input').focusout(function(){
724	$(this).attr('placeholder',$(this).data('holder'));
725	});
726});
727
728$('.mom_contact_form textarea').each(function() {
729	$(this).data('holder',$(this).attr('placeholder'));
730	$('.mom_contact_form textarea').focusin(function(){
731$(this).attr('placeholder','');
732	});
733	$('.mom_contact_form textarea').focusout(function(){
734$(this).attr('placeholder',$(this).data('holder'));
735	});
736});
737
738}
739//share
740if ($('.mom_share_buttons').length) {
741    $('.mom_share_buttons').data('height',$('.mom_share_buttons').css('height'));
742    var curHeight = $('.mom_share_buttons').height();
743    $('.mom_share_buttons').css('height', 'auto');
744    var autoHeight = $('.mom_share_buttons').height();
745    $('.mom_share_buttons').css('height', curHeight);
746    $('.mom_share_it .sh_arrow').toggle(function () {
747	$('.mom_share_buttons').stop().animate({height: autoHeight}, 300);
748	$(this).find('i').removeClass();
749	$(this).find('i').addClass('momizat-icon-193');
750    }, function () {
751	$('.mom_share_buttons').stop().animate({height: $('.mom_share_buttons').data('height')}, 300);
752	$(this).find('i').removeClass();
753	$(this).find('i').addClass('momizat-icon-194');
754    });
755}
756
757//toggles
758jQuery("h4.toggle_title").click(function () {
759	$(this).next(".toggle_content").slideToggle();
760	$(this).toggleClass("active_toggle");
761	$(this).parent().toggleClass("toggle_active");
762});
763
764$("h4.toggle_min").click(function () {
765	$(this).next(".toggle_content_min").slideToggle();
766	$(this).toggleClass("active_toggle_min");
767});
768
769//scroll to top
770$('.scrollTo_top').hide();
771	$(window).scroll(function () {
772		if( $(this).scrollTop() > 100 ) {
773			$('.scrollTo_top').fadeIn(300);
774		}
775		else {
776			$('.scrollTo_top').fadeOut(300);
777		}
778	});
779
780	$('.scrollTo_top').click(function(){
781		$('html, body').animate({scrollTop:0}, 500 );
782		return false;
783	});
784
785//lightbox
786if ($('.mom_lightbox').length) { 
787$(".mom_lightbox > a").prettyPhoto({animation_speed:'fast',slideshow:10000, deeplinking: false});
788}
789
790    $('body.open_images_in_lightbox a').each(function() {
791        if(/\.(?:jpg|jpeg|gif|png)$/i.test($(this).attr('href'))){
792            $(this).prettyPhoto();
793        }
794    });
795// Mobile
796if ($('.top_menu_handle').length) {
797    $('.top_menu_handle').toggle( function () {
798	$(this).next('.mobile_top_nav').show();
799	$(this).addClass('tmh_close');
800    }, function () {
801	$(this).next('.mobile_top_nav').hide();
802	$(this).removeClass('tmh_close');
803    });
804}
805
806if ($('.mobile_main_nav_handle').length) {
807    $('.mobile_main_nav_handle').toggle( function () {
808	$(this).next('.mom_mobile_main_nav .nav').slideDown();
809    }, function () {
810	$(this).next('.mom_mobile_main_nav .nav').slideUp();
811    });
812
813}
814
815$(window).resize(function() {
816  if ($(window).width() < 978) {
817	$('.video_wrap').fitVids();
818  } 
819});
820
821  if ($(window).width() < 978) {
822	$('.video_wrap').fitVids();
823  } 
824//$('.video_frame').fitVids();
825$(window).resize(function() {
826  if ($(window).width() < 460) {
827    $('.topbar .mom-social-icons li').hide();
828    $(".topbar .mom-social-icons li:lt(7)").show();
829  } 
830});
831
832  if ($(window).width() < 460) {
833    $('.topbar .mom-social-icons li').hide();
834    $(".topbar .mom-social-icons li:lt(7)").show();
835  }
836//$("html").niceScroll();
837
838/*
839     $('a').click(function(){
840	$('html, body').animate({
841	    scrollTop: $('[name="' + $.attr(this, 'href').substr(1) + '"]').offset().top
842	}, 500);
843	return false;
844    });
845 */
846$('.animator.animated, .iconb_wrap.animated').each( function() {
847    var $this = $(this);
848    var animation = $(this).attr('data-animate');
849
850$this.bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
851  if (isInView) {
852	    $(this).addClass(animation);
853	    $(this).css('visibility', 'visible');
854	    if(animation.indexOf('fade') === -1)
855	    {
856	      $(this).css('opacity', '1');
857	    }
858    if (visiblePartY == 'top') {
859      // top part of element is visible
860    } else if (visiblePartY == 'bottom') {
861      // bottom part of element is visible
862    } else {
863      // whole part of element is visible
864    }
865  } else {
866    // element has gone out of viewport
867  }
868});
869
870});
871if ($('.progress_outer').length) {
872    $('.progress_outer').each( function() {
873	var $this = $(this);
874    $this.bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
875      if (isInView) {
876		$(this).find('.parograss_inner').show();
877		$(this).find('.parograss_inner').addClass('ani-bar');
878	if (visiblePartY == 'top') {
879	  // top part of element is visible
880	} else if (visiblePartY == 'bottom') {
881	  // bottom part of element is visible
882	} else {
883	  // whole part of element is visible
884	}
885      } else {
886	// element has gone out of viewport
887      }
888    });
889    
890    });
891}
892//responsive headings
893    if ($(window).width() < 767) {
894	$('h1,h2,h3,h4,h5,h6, span, .mom_google_font').each(function() {
895	    if ($(this).attr('font-size')) {
896		var fs = parseFloat($(this).css('font-size'));
897		if (fs > 24) {
898		    $(this).css('font-size','23px');
899		}
900	    }
901	});
902    }
903
904if ($('.mom_custom_background').length) {
905    $('.mom_custom_background').each(function() {
906	var $this = $(this);
907	$(window).scroll(function () {
908		var speed = 8.0;
909		$this.css({backgroundPosition:(-window.pageXOffset / speed) + "px " + (-window.pageYOffset / speed) + "px"});
910		//document.body.style.backgroundPosition = (-window.pageXOffset / speed) + "px " + (-window.pageYOffset / speed) + "px";
911	});
912    });
913}
914//Default Gallery
915if (! $('body').hasClass('disable_lightbox_in_wp_gallery')) {
916	if ($('.gallery .gallery-item').length) {
917	    $(".gallery .gallery-item a").attr('rel', 'prettyPhoto[pp_gal]');
918	    $(".gallery .gallery-item a").prettyPhoto(); 
919	}
920}
921
922//lightbox
923if ($('img.lightbox').length) {
924    $('img.lightbox').each(function() {
925	$(this).parent('a').prettyPhoto(); 
926    })
927}
928
929/*----------------------------
930    Ads
931 ----------------------------*/
932if ($('.mca-fixed').length) {
933    var mca_top = $('.mca-fixed').offset().top;
934    var mca = $('.mca-fixed');
935        $(window).scroll(function(){
936	    if ($(window).scrollTop() > mca_top){
937		if ( $('#wpadminbar').length ) {
938		    mca.css({ top:'28px', position: 'fixed' });
939		    mca.addClass('mca_touch_top');
940		 } else {
941		    mca.css({ top:'0', position: 'fixed' });
942		    mca.addClass('mca_touch_top');
943		} 
944	    } else {
945		mca.css({ top:'auto', position: 'absolute' });
946		mca.removeClass('mca_touch_top');
947	    }
948        });    
949}
950
951
952/* ==========================================================================
953 *                Responsive mode
954   ========================================================================== */
955
956// double tab on navigation
957if(( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )) {
958    $('#navigation .main-menu > li.menu-item-has-children').doubleTapToGo();
959}
960	
961// Responsive menus
962$('.top-menu-holder').click(function(e) {
963    e.stopPropagation();
964    $('.device-top-nav').slideToggle();
965    $(this).toggleClass('active');
966});
967$('.device-top-nav, .device-menu').click(function(e) {
968    e.stopPropagation();
969});
970$('body').click(function() {
971    $('.device-top-nav').slideUp();
972    $('.device-menu').slideUp();
973});
974
975$('.device-menu-holder').click(function(e) {
976    e.stopPropagation();
977    if ($(this).hasClass('active')) {
978	    $('.device-menu li').each(function() {
979		if ($(this).find('.mom_mega_wrap').length !== 0) {
980		} else {
981		    $(this).find('.sub-menu').slideUp();
982		}
983	    });
984	    $('.device-menu').find('.dm-active').removeClass('dm-active');
985	    $('.device-menu').find('.mom_custom_mega').slideUp();
986    }
987    $('.device-menu').slideToggle();
988    $(this).toggleClass('active');
989    $('#navigation .nav-buttons').toggleClass('mh-active');
990
991});
992$('.responsive-caret').click(function() {
993    var li = $(this).parents('li');
994    if (li.hasClass('dm-active') || li.find('.dm-active').length !== 0 || li.find('.sub-menu').is(':visible') || li.find('.mom_custom_mega').is(':visible') ) {
995	li.removeClass('dm-active');
996	li.children('.sub-menu').slideUp();
997	if (li.find('.mom_mega_wrap').length === 0) {
998	    	li.find('.sub-menu').slideUp();
999	}
1000	if (li.hasClass('mom_default_menu_item') || li.find('.cats-mega-wrap').length !== 0) {
1001	    li.find('.sub-menu').slideUp();
1002	}
1003	li.find('.dm-active').removeClass('dm-active');
1004	if (li.find('.mom_custom_mega').length !== 0) {
1005	    li.find('.mom_custom_mega').slideUp();
1006	}
1007
1008    } else {
1009	$('.device-menu').find('.dm-active').removeClass('dm-active');
1010	li.addClass('dm-active');
1011	li.children('.sub-menu').slideDown();
1012	if (li.find('.cats-mega-wrap').length !== 0) {
1013	    li.find('.sub-menu').slideDown();
1014	}
1015	if (li.find('.mom_custom_mega').length !== 0) {
1016	    li.find('.mom_custom_mega').slideDown();
1017	}
1018
1019    }
1020})
1021$('.the_menu_holder_area').html($('.device-menu').find('.current-menu-item').children('a').html());
1022
1023var nbts = $('.nav-buttons .nav-button');
1024var rnp = 0;
1025nbts.each(function () {
1026    var w = $(this).outerWidth()-1;
1027    rnp += w;
1028});
1029    if (nbts.length === 3) {
1030	rnp = rnp+2;
1031    }
1032
1033$('body:not(.rtl) .device-menu-wrap').css('padding-right',rnp+'px');
1034$('body.rtl .device-menu-wrap').css('padding-left',rnp+'px');
1035
1036// scrolling box
1037$(window).resize(function() {
1038  if ($(window).width() < 670) {
1039	$('.scrolling-box .sb-item .sb-item-img').each( function(e) {
1040	    var img = $(this).find('img');
1041	    img.attr('src', img.data('hidpi'));
1042	});
1043  }
1044    if ($(window).width() < 480) {
1045	$('.recent-news .news-image, .news-list .news-image, .blog-post .bp-detail
1045s .post-img').each( function(e) {
1046	    var img = $(this).find('img');
1047	    var attr = img.attr('data-hidpi');
1048	    if (typeof attr !== 'undefined' && attr !== false) {
1049		img.attr('src', img.data('hidpi'));
1050	    }
1051	});
1052  }
1053});
1054  if ($(window).width() < 670) {
1055	$('.scrolling-box .sb-item .sb-item-img').each( function(e) {
1056	    var img = $(this).find('img');
1057	    img.attr('src', img.data('hidpi'));
1058	});
1059  } 
1060  if ($(window).width() < 480) {
1061	$('.recent-news .news-image, .news-list .news-image, .blog-post .bp-details .post-img').each( function(e) {
1062	    var img = $(this).find('img');
1063	    var attr = img.attr('data-hidpi');
1064	    if (typeof attr !== 'undefined' && attr !== false) {
1065		img.attr('src', img.data('hidpi'));
1066	    }
1067	});
1068  }
1069  //buddypress
1070  $('.widget:not(.bos_searchbox_widget_class) select, select#notifications-sort-order-list, select#members-friends, select#groups-sort-by, #members-order-by, #message-type-select, #activity-filter-by').wrap('<div class="mom-select"></div>');
1071    $('#buddypress div#object-nav.item-list-tabs ul li.last.filter').prev().addClass('mom_last_child');
1072    
1073    //top banner
1074    $('.top_banner').show();
1075    $('a.tob_banner_close').on('click', function(e) {
1076	    $('.top_banner').slideUp(400);
1077	    var exp = $(this).date('exp');
1078	    if (exp === '') {
1079		exp = 7;
1080	    }
1081	    if (typeof($.cookie) == "function") {
1082		$.cookie('tb_clase', 'yes', { expires: exp, path: '/' });
1083	    }
1084	e.preventDefault();
1085    });
1086
1087    if (typeof($.cookie) == "function") {
1088	/* if (!$('a.tob_banner_close').hasClass('tb_save_close')) {
1089	    $('body').css('background', 'green');
1090	    $.cookie("tb_clase", null);
1091	    $.removeCookie('tb_clase');
1092	}*/
1093	if ($.cookie('tb_clase') === 'yes') {
1094	    $('.top_banner').hide();
1095	}
1096    }
1097    
1098
1099//alert($.cookie('tb_clase'));
1100
1101	 $('.mom_mega_cats .cats-mega-inner > ul > li').on('mouseenter', function(e) {
1102	    e.preventDefault();
1103	    var t = $(this);
1104	    var tid = t.attr('id');
1105	    tid = tid.split('-');
1106	    tid = tid[2];
1107	    var d = t.parent().next('.subcat').find('#mn-latest-'+tid);
1108	    var dest = t.parent().next('.subcat').find('#mn-latest-'+tid+' > ul');
1109	    var id = d.data('id');
1110	    var object = d.data('object');
1111	    var layout = d.data('layout');
1112	    if (dest.children().length === 0) {
1113			jQuery.ajax({
1114			    type: "post",
1115			    url: momAjaxL.url,
1116			    dataType: 'html',
1117			    data: "action=mmcl&nonce="+momAjaxL.nonce+"&id="+id+"&object="+object+"&layout="+layout,
1118			    beforeSend: function() {
1119					dest.addClass('loading');
1120			    },
1121			    success: function(data){
1122				dest.removeClass('loading');
1123				dest.html(data);
1124			    }
1125			});
1126    	    }
1127	});
1128
1129/*------------------------------------------------
1130			login widget
1131-------------------------------------------------*/
1132$('.mom-login-widget .button.user-submit').click(function () {
1133	var p = $(this).parents('.mom-login-form');
1134	var user = p.find('input[name="log"]');
1135	var pwd = p.find('input[name="pwd"]');
1136	if (user.val() === '' || pwd.val() === '') {
1137		user.addClass('error');
1138		pwd.addClass('error');
1139		return false;
1140	}
1141}); 
1142/*------------------------------------------------
1143			Feature Slider
1144-------------------------------------------------*/
1145if ($('.feature-slider').length) {
1146	$('.feature-slider').each(function() {
1147		var t = $(this);
1148		if (!t.hasClass('gallery-post-slider')) {
1149		var animation = t.data('sanimation');
1150		var speed = t.data('speed');
1151		var timeout = t.data('timeout');
1152		var easing = t.data('easing');
1153		var rndn = t.data('rndn');
1154		var rtl = false;
1155		var autoplay = t.data('autoplay');
1156		var items = t.data('items');
1157
1158		var animation_new = t.data('animation_new');
1159		var animation_in = t.data('animation_in');
1160		var animation_out = t.data('animation_out');
1161		var margin = 10;
1162		var auto_height = 0;
1163		var thumbs_event = t.data('thumbs_event');
1164		if(typeof thumbs_event === 'undefined'){
1165			thumbs_event = 'click';
1166		}
1167		if (t.hasClass('no_spaces')) {
1168			margin = 5;
1169			auto_height = 1;
1170		}
1171
1172		t.find('.fs-image-nav .fs-thumb').each(function(i) {
1173				$(this).addClass( 'item'+i );
1174					if (t.hasClass('old-style')) {
1175						$(this).click(function() {
1176							t.find('.fslides').trigger( 'slideTo', [i, 0, true] );
1177						return false;
1178						});
1179					}
1180			});
1181		
1182			t.find('.fs-image-nav .fs-thumb.item0').addClass( 'active' );
1183		
1184			var carou_items = 6;
1185			if ($(window).width() < 768) {
1186					carou_items = 5;
1187			}
1188			if ($(window).width() < 568) {
1189					carou_items = 4;
1190			}
1191
1192			if ($(window).width() < 480 ) {
1193					carou_items = 2;
1194			}
1195
1196			if ($('body').hasClass('rtl')) {
1197				rtl = true;
1198			} 
1199
1200			if (!t.hasClass('old-style')) {
1201				var owl = t.find('.fslides');
1202				var slides_count = owl.children('.fslide').length;
1203				if (slides_count == 1) {
1204					t.addClass('fs-with-one-slide');
1205				}
1206				if (slides_count > 1) {
1207				owl.owlCarousel({
1208					items: 1,
1209					baseClass: 'mom-carousel',
1210					rtl: rtl,
1211					autoplay:autoplay,
1212					autoplayTimeout:timeout,
1213					autoplayHoverPause : true,
1214					loop: true,
1215		            animateOut: animation_out,
1216		            animateIn: animation_in,
1217		            smartSpeed:1000,
1218		            //autoHeight: true,
1219				});
1220			t.find('.fslides').imagesLoaded( function() { 
1221				t.find('.fs-image-nav .fs-thumbs').owlCarousel({
1222					items: items,
1223					baseClass: 'mom-carousel',
1224					rtl: rtl,
1225					loop: true,
1226		            margin : margin,
1227				});
1228				//var thumb_height = t.find('.fs-image-nav .fs-thumbs .fs-thumb').eq(0).css('height');
1229				//t.find('.fs-image-nav .fs-thumbs').css('max-height', thumb_height);
1230				
1231				
1232				owl.on('changed.owl.carousel', function(event) {
1233    					var pos = $(event.target).find(".fslide").eq(event.item.index).data('i');						
1234						//console.log(pos);
1235						$('.fc-nav-'+rndn+' .fs-thumb').removeClass( 'active' );
1236						$('.fc-nav-'+rndn+' .fs-thumb.item'+pos).addClass( 'active' );
1237						var page = Math.floor( pos / items );
1238						t.find('.fs-image-nav .fs-thumbs').trigger( 'to.owl.carousel', page );
1239				});
1240
1241				
1242				t.find('.fs-image-nav .fs-thumb').on(thumbs_event, function() {
1243					var i = $(this).data('i');
1244 					owl.trigger('to.owl.carousel', [i]);
1245				});			
1246
1247				t.find('.fs-image-nav .fs-prev, .fsd-prev').click(function() {
1248 					owl.trigger('prev.owl.carousel');
1249				});			
1250
1251				t.find('.fs-image-nav .fs-next, .fsd-next').click(function() {
1252 					owl.trigger('next.owl.carousel');
1253				});
1254			});
1255			}
1256			} else {
1257			t.find('.fslides').carouFredSel({
1258					circular: true,
1259                    responsive: true,
1260					swipe: {
1261						onTouch: true,
1262						fx : 'scroll'
1263					},
1264					items: 1,
1265					auto: {
1266                                             play: autoplay,
1267                                             duration: speed,
1268                                             timeoutDuration: timeout,
1269                                             },
1270					prev: '.fc-nav-'+rndn+' .fs-prev, .fs-dnav-'+rndn+' span.fsd-prev',
1271					next: '.fc-nav-'+rndn+' .fs-next, .fs-dnav-'+rndn+' span.fsd-next',
1272					pagination: '.fs-nav-'+rndn,
1273					scroll: {
1274						fx: animation,
1275                                                  duration : speed,
1276                                                easing  : easing,
1277						pauseOnHover : true,
1278                                        	onBefore: function() {
1279							var pos = $(this).triggerHandler( 'currentPosition' );
1280							$('.fc-nav-'+rndn+' div').removeClass( 'active' );
1281							$('.fc-nav-'+rndn+' div.item'+pos).addClass( 'active' );
1282							var page = Math.floor( pos / carou_items );
1283							$('.fc-nav-'+rndn+' .fs-thumbs').trigger( 'slideToPage', page );
1284
1285						},
1286						onAfter: function() {
1287						}
1288
1289					}
1290			});
1291
1292			t.find('.fs-image-nav .fs-thumbs').carouFredSel({
1293						auto: false,
1294						circular:true,
1295                                        responsive: true,
1296						swipe: {
1297							onTouch: true
1298						},
1299						items: carou_items,
1300						scroll: {
1301							items:carou_items,
1302						}
1303			});
1304		}
1305
1306		} //if not the post gallery
1307
1308	});
1309}
1310// Delete share caches on click
1311	jQuery(".php-share .ss-icon a").click( function(e){
1312		var t = jQuery(this);
1313		var id = t.parent().parent().data('id');
1314			jQuery.ajax({
1315			    type: "post",
1316			    url: momAjaxL.url,
1317			    dataType: 'html',
1318			    data: "action=mcscoc&nonce="+momAjaxL.nonce+"&id="+id,
1319			    beforeSend: function() {},
1320			    success: function(){}
1321			});
1322	});
1323
1324}); // end of the file
1325
1326// ad clicks
1327jQuery(document).ready(function($) {
1328
1329	jQuery(".mom-e3lan").click( function(e){
1330		t = jQuery(this);
1331		id = t.data('id');
1332			jQuery.ajax({
1333			    type: "post",
1334			    url: momAjaxL.url,
1335			    dataType: 'html',
1336			    data: "action=mom_mom_adclicks&nonce="+momAjaxL.nonce+"&id="+id,
1337			    beforeSend: function() {},
1338			    success: function(){}
1339			});
1340	});
1341});
1342
1343
1344// Momizat User rate
1345jQuery(document).ready(function(e){e(".mom_user_rate").mousemove(function(t){var r=e(this).data("style"),s=e(this).offset(),a=t.pageX-s.left;if(t.pageY-s.top,!e(this).hasClass("rated")){var o=a/parseFloat(e(this).width())*100;i=Math.round(o),i>100&&(i=100),n=(i/20).toFixed(1),"bars"===r?(e(this).find(".ub-inner").css({width:i+"%"}),e(this).find(".ub-inner").find("span").text(i+"%")):"circles"===r||e(this).children("span").css({width:i+1+"%"}),e(this).hasClass("star-rating")&&e(this).parent().find(".yr").text(n+"/5")}}),e(".mom_user_rate, .mom_user_rate_cr").hover(function(){e(this).hasClass("rated")||(e(".review-footer .mom_user_rate_title").find(".user_rate").hide(),e(".review-footer .mom_user_rate_title").find(".your_rate").show())},function(){e(this).hasClass("rated")||(e(".mom_user_rate_title").find(".user_rate").show(),e(".mom_user_rate_title").find(".your_rate").hide())}),e(".mom_user_rate").click(function(){stars=jQuery(this),post_id=stars.data("post_id"),style=stars.data("style"),score=0,"stars"===style&&(score=parseFloat(stars.children("span").width())/parseFloat(e(this).width())*100),"bars"===style&&(score=parseFloat(stars.children(".ub-inner").width())/parseFloat(e(this).width())*100),score=Math.round(score),vc=stars.data("votes_count"),e(this).hasClass("rated")||jQuery.ajax({type:"post",url:momAjaxL.url,data:"action=user-rate&nonce="+momAjaxL.nonce+"&user_rate=&post_id="+post_id+"&user_rate_score="+score,success:function(t){"already"!=t&&(stars.addClass("rated"),e(".review-footer .mom_user_rate_title").find(".user_rate").hide(),e(".review-footer .mom_user_rate_title").find(".your_rate").show(),e(".review-footer .total-votes").find(".tv-count").text(vc+1))}})}),e(".mom-reveiw-system").length&&e(".urc-value").knob({displayInput:!1,change:function(t){e(".user-rate-circle").find(".cru-num").text(t)},release:function(t){circle=jQuery(".user-rate-circle .mom_user_rate_cr"),post_id=circle.data("post_id"),style=circle.data("style"),score=t,vc=circle.data("votes_count"),jQuery.ajax({type:"post",url:momAjaxL.url,data:"action=user-rate&nonce="+momAjaxL.nonce+"&user_rate=&post_id="+post_id+"&user_rate_score="+score,success:function(t){"already"!=t&&(circle.addClass("rated"),e(".review-footer .mom_user_rate_title").find(".user_rate").hide(),e(".review-footer .mom_user_rate_title").find(".your_rate").show(),e(".review-footer .total-votes").find(".tv-count").text(vc+1))}})}})});
1346
1347
1348// Momizat ajax
1349jQuery(document).ready(function() {
1350    jQuery(".mom-search-form input.sf").on("keyup", function() {
1351        return sf = jQuery(this), term = sf.val(), term.length > 2 ? setTimeout(function() {
1352            jQuery.ajax({
1353                type: "post",
1354                url: momAjaxL.url,
1355                dataType: "html",
1356                data: "action=mom_ajaxsearch&nonce=" + momAjaxL.nonce + "&term=" + term,
1357                beforeSend: function() {
1358                    sf.parent().parent().find(".sf-loading").fadeIn()
1359                },
1360                success: function(e) {
1361                    "" !== sf.val() ? (sf.parent().parent().next(".ajax_search_results").html(e), "" !== e ? sf.parent().parent().next(".ajax_search_results").append('<footer class="show_all_results"><a href="' + momAjaxL.homeUrl + "/?s=" + term + '">' + momAjaxL.viewAll + '<i class="fa-icon-long-arrow-right"></i></a></footer>') : (sf.parent().parent().next(".ajax_search_results").find("show_all_results").remove(), sf.parent().parent().next(".ajax_search_results").html('<span class="sw-not_found">' + momAjaxL.noResults + "</span>"))) : sf.parent().parent().next(".ajax_search_results").html(""), sf.parent().parent().find(".sf-loading").fadeOut()
1362                }
1363            })
1364        }, 300) : setTimeout(function() {
1365            jQuery.ajax({
1366                type: "post",
1367                url: momAjaxL.url,
1368                dataType: "html",
1369                data: "action=mom_ajaxsearch&nonce=" + momAjaxL.nonce + "&term=" + term,
1370                success: function() {
1371                    "" === sf.val() && sf.parent().parent().next(".ajax_search_results").html("")
1372                }
1373            })
1374        }, 300), !1
1375    })
1376}), jQuery(document).ready(function(e) {
1377    offset = "", jQuery("a.show-more-posts").click(function(a) {
1378        a.preventDefault();
1379        var t = e(this);
1380        style = t.data("style"), share = t.data("share"), count = t.data("count"), offset = t.data("offset"), display = t.data("display"), category = t.data("category"), tag = t.data("tag"), sort = t.data("sort"), orderby = t.data("orderby"), format = t.data("format"), excerpt_length = t.data("excerpt_length"), load_more_count = t.data("load_more_count"), exclude_cats = t.data("exclude_cats"), jQuery.ajax({
1381            type: "post",
1382            url: momAjaxL.url,
1383            dataType: "html",
1384            data: "action=mom_loadMore&nonce=" + momAjaxL.nonce + "&display=" + display + "&category=" + category + "&tag=" + tag + "&number_of_posts=" + count + "&sort=" + sort + "&orderby=" + orderby + "&offset=" + offset + "&format=" + format + "&excerpt_length=" + excerpt_length + "&style=" + style + "&share=" + share + "&load_more_count=" + load_more_count+ "&exclude_cats=" + exclude_cats,
1385            beforeSend: function() {
1386                t.find("i").addClass("fa-spin")
1387            },
1388            success: function(e) {
1389                t.before(e), t.find("i").removeClass("fa-spin"), "" === e && t.text(momAjaxL.nomore)
1390            }
1391        }), t.data("offset", offset + load_more_count), console.log(offset)
1392    })
1393}), jQuery(document).ready(function(e) {
1394    jQuery(".mom_mailchimp_subscribe").submit(function() {
1395        return sf = jQuery(this), email = sf.find(".mms-email").val(), list = sf.data("list_id"), e(".message-box").fadeOut(), "" === email ? sf.before('<span class="message-box error">' + momAjaxL.error2 + '<i class="brankic-icon-error"></i></span>') : mom_isValidEmailAddress(email) ? jQuery.ajax({
1396            type: "post",
1397            url: momAjaxL.url,
1398            dataType: "html",
1399            data: "action=mom_mailchimp&nonce=" + momAjaxL.nonce + "&email=" + email + "&list_id=" + list,
1400            beforeSend: function() {
1401                sf.find(".sf-loading").fadeIn()
1402            },
1403            success: function(a) {
1404                "success" === a ? (sf.find(".email").val(""), sf.before('<span class="message-box success">' + momAjaxL.success + '<i class="brankic-icon-error"></i></span>').hide().fadeIn()) : sf.before('<span class="message-box error">' + momAjaxL.error + '<i class="brankic-icon-error"></i></span>').hide().fadeIn(), sf.find(".sf-loading").fadeOut(), e(".message-box i").on("click", function() {
1405                    e(this).parent().fadeOut()
1406                })
1407            }
1408        }) : sf.before('<span class="message-box error">' + momAjaxL.error2 + '<i class="brankic-icon-error"></i></span>'), !1
1409    })
1410}), jQuery(document).ready(function() {
1411    offset = "", offset_rest = "", jQuery(".nb-footer a.show-more-ajax").click(function(e) {
1412        e.preventDefault(), bt = jQuery(this), where = bt.parent().prev(), nbs = bt.data("nbs"), nop = bt.data("number_of_posts"), offset = bt.data("offset"), offset_rest = offset + 1, post_type = bt.data("post_type"), display = bt.data("display"), category = bt.data("category"), tag = bt.data("tag"), sort = bt.data("sort"), orderby = bt.data("orderby"), exclude_cats = bt.data("exclude_cats"), format = "", image_size = "", excerpt_length = "", "news_list" === nbs && (format = bt.data("format"), image_size = bt.data("image_size"), excerpt_length = bt.data("excerpt_length")), jQuery.ajax({
1413            type: "post",
1414            url: momAjaxL.url,
1415            dataType: "html",
1416            data: "action=nbsm&nonce=" + momAjaxL.nonce + "&display=" + display + "&category=" + category + "&tag=" + tag + "&nbs=" + nbs + "&number_of_posts=" + nop + "&sort=" + sort + "&orderby=" + orderby + "&offset=" + offset + "&offset_all=" + offset_rest + "&format=" + format + "&image_size=" + image_size + "&excerpt_length=" + excerpt_length + "&post_type=" + post_type+ "&exclude_cats=" + exclude_cats,
1417            beforeSend: function() {
1418                where.append('<i class="nb-load"></i>')
1419            },
1420            success: function(e) {
1421                "" == e && bt.parent().append('<a class="nomoreposts">' + momAjaxL.nomore + "</a>").hide().fadeIn(), "" !== e && where.html(e), where.find(".nb-load").remove()
1422            },
1423            complete: function() {}
1424        }), bt.data("offset", offset + (nop + 1))
1425    })
1426}), jQuery(document).ready(function(e) {
1427    jQuery(".weather-form").submit(function() {
1428        return form = jQuery(this), city = form.find("input").val(), lang = form.find("input").data("lang"), units = form.find("input").data("units"), jQuery.ajax({
1429            type: "post",
1430            url: momAjaxL.url,
1431            dataType: "html",
1432            data: "action=mom_ajaxweather&nonce=" + momAjaxL.nonce + "&city=" + city + "&lang=" + lang + "&units=" + units,
1433            beforeSend: function() {
1434                form.find(".sf-loading").fadeIn()
1435            },
1436            success: function(a) {
1437                "" !== city && ("" !== a ? (form.nextAll(".weather-widget").html(a).hide().fadeIn(), form.next(".message-box").fadeOut()) : (form.next(".message-box").remove(), form.after('<span class="message-box error">' + momAjaxL.werror + '<i class="brankic-icon-error"></i></span>'))), form.find(".sf-loading").fadeOut(), e(".message-box i").on("click", function() {
1438                    e(this).parent().fadeOut()
1439                })
1440            }
1441        }), !1
1442    })
1443});
1444
1445// email valid
1446function mom_isValidEmailAddress(emailAddress) {
1447    var pattern = new RegExp(/^(("[\w-+\s]+")|([\w-+]+(?:\.[\w-+]+)*)|("[\w-+\s]+")([\w-+]+(?:\.[\w-+]+)*))(@((?:[\w-+]+\.)*\w[\w-+]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][\d]\.|1[\d]{2}\.|[\d]{1,2}\.))((25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\.){2}(25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\]?$)/i);
1448    return pattern.test(emailAddress);
1449};
1450
1451/*!
1452 * imagesLoaded PACKAGED v3.1.8
1453 * JavaScript is all like "You images are done yet or what?"
1454 * MIT License
1455 */
1456
1457(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;
1457if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
1458
1459/*
1460    JQuery Advanced News Ticker 1.0.11 (20/02/14)
1461    created by risq
1462    website (docs & demos) : http://risq.github.io/jquery-advanced-news-ticker/
1463*/
1464(function(b,k,l,m){function g(a,f){this.element=a;this.$el=b(a);this.options=b.extend({},c,f);this._defaults=c;this._name=d;this.moveInterval;this.moving=this.paused=this.state=0;(this.$el.is("ul")||this.$el.is("ol"))&&this.init()}var d="newsTicker",c={row_height:20,max_rows:3,speed:400,duration:2500,direction:"up",autostart:1,pauseOnHover:1,nextButton:null,prevButton:null,startButton:null,stopButton:null,hasMoved:function(){},movingUp:function(){},movingDown:function(){},start:function(){},stop:function(){},
1465pause:function(){},unpause:function(){}};g.prototype={init:function(){this.$el.height(this.options.row_height*this.options.max_rows).css({overflow:"hidden"});this.checkSpeed();this.options.nextButton&&"undefined"!==typeof this.options.nextButton[0]&&this.options.nextButton.click(function(a){this.moveNext();this.resetInterval()}.bind(this));this.options.prevButton&&"undefined"!==typeof this.options.prevButton[0]&&this.options.prevButton.click(function(a){this.movePrev();this.resetInterval()}.bind(this));
1466this.options.stopButton&&"undefined"!==typeof this.options.stopButton[0]&&this.options.stopButton.click(function(a){this.stop()}.bind(this));this.options.startButton&&"undefined"!==typeof this.options.startButton[0]&&this.options.startButton.click(function(a){this.start()}.bind(this));this.options.pauseOnHover&&this.$el.hover(function(){this.state&&this.pause()}.bind(this),function(){this.state&&this.unpause()}.bind(this));this.options.autostart&&this.start()},start:function(){this.state||(this.state=
14671,this.resetInterval(),this.options.start())},stop:function(){this.state&&(clearInterval(this.moveInterval),this.state=0,this.options.stop())},resetInterval:function(){this.state&&(clearInterval(this.moveInterval),this.moveInterval=setInterval(function(){this.move()}.bind(this),this.options.duration))},move:function(){this.paused||this.moveNext()},moveNext:function(){"down"===this.options.direction?this.moveDown():"up"===this.options.direction&&this.moveUp()},movePrev:function(){"down"===this.options.direction?
1468this.moveUp():"up"===this.options.direction&&this.moveDown()},pause:function(){this.paused||(this.paused=1);this.options.pause()},unpause:function(){this.paused&&(this.paused=0);this.options.unpause()},moveDown:function(){this.moving||(this.moving=1,this.options.movingDown(),this.$el.children("li:last").detach().prependTo(this.$el).css("marginTop","-"+this.options.row_height+"px").animate({marginTop:"0px"},this.options.speed,function(){this.moving=0;this.options.hasMoved()}.bind(this)))},moveUp:function(){if(!this.moving){this.moving=
14691;this.options.movingUp();var a=this.$el.children("li:first");a.animate({marginTop:"-"+this.options.row_height+"px"},this.options.speed,function(){a.detach().css("marginTop","0").appendTo(this.$el);this.moving=0;this.options.hasMoved()}.bind(this))}},updateOption:function(a,b){"undefined"!==typeof this.options[a]&&(this.options[a]=b,"duration"==a||"speed"==a)&&(this.checkSpeed(),this.resetInterval())},add:function(a){this.$el.append(b("<li>").html(a))},getState:function(){return paused?2:this.state},
1470checkSpeed:function(){this.options.duration<this.options.speed+25&&(this.options.speed=this.options.duration-25)},destroy:function(){this._destroy()}};b.fn[d]=function(a){var f=arguments;return this.each(function(){var c=b(this),e=b.data(this,"plugin_"+d),h="object"===typeof a&&a;e||c.data("plugin_"+d,e=new g(this,h));"string"===typeof a&&e[a].apply(e,Array.prototype.slice.call(f,1)
1470)})}})(jQuery,window,document);

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.