PageSourceSearch

https://almoaten.net/wp-content/themes/pegsweb/js/main.js?ver=1.0

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

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.