Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/functions/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/functions/load-scripts.php

<?php
/*
 * Security 	: blocking direct access
 * Source		: http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");
/*
 * Deregister style for specific plugins
 *
 * Contact Form 7
 * WordPress Social Login
 * Font Awesome 4 Menus
 * Remove dashicons.min.css from Front-End for non-logged in users
 * EC Stars Rating scripts
 *
*/
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
add_action( 'wp_enqueue_scripts', 'deregister_specific_plugins', 100 );
function deregister_specific_plugins() {
	if( !is_user_logged_in() ) {
		wp_deregister_style('dashicons');
	}
	wp_deregister_style( 'contact-form-7' );
	if ( is_rtl() ) {
		wp_deregister_style( 'contact-form-7-rtl' );
	}
	wp_deregister_style( 'wsl-widget' );
	wp_deregister_style( 'font-awesome-four' );
}
remove_action( 'wp_enqueue_scripts'   , 'wsl_add_javascripts' );
remove_action( 'login_enqueue_scripts', 'wsl_add_javascripts' );
/*
 * Deregister style for Gutenberg
 *
*/
function mwp_gutenberg_deregister_styles() {
   if (!is_admin()) {
		wp_dequeue_style( 'wp-block-library' );
		wp_deregister_style( 'wp-block-library' );
		wp_dequeue_style( 'wp-block-library-rtl' );
		wp_deregister_style( 'wp-block-library-rtl' );
		wp_dequeue_style( 'wp-block-library-theme' );
		wp_deregister_style( 'wp-block-library-theme-rtl' );
   }
}
add_action( 'wp_print_styles', 'mwp_gutenberg_deregister_styles', 100 );
/*
 * Remove YARPP styles
 *
*/
if ( function_exists('related_posts') ) {
	add_action( 'wp_print_styles', 'remove_yarpp_header_styles' );
	function remove_yarpp_header_styles() {
	   wp_dequeue_style('yarppWidgetCss');
	   wp_deregister_style('yarppRelatedCss'); 
	}
	add_action( 'wp_footer', 'remove_yarpp_footer_styles' );
	function remove_yarpp_footer_styles() {
		wp_dequeue_style('yarppRelatedCss');
	}
}
/*
 * @Font-Face Helper + HTML Helper
 *
 * load a CSS file asynchronously.
 * equalHeights
 *
*/
add_action('wp_head', 'mwp_asyn_css_load', 5);
function mwp_asyn_css_load() {
	echo '<script>function load_MWP_CSS(a,d,f,g){var b=window.document.createElement("link");var c=d||window.document.getElementsByTagName("script")[0];var e=window.document.styleSheets;b.rel="stylesheet";b.href=a;b.media="only x";if(g){b.onload=g}c.parentNode.insertBefore(b,c);b.onloadcssdefined=function(h){var k;for(var j=0;j<e.length;j++){if(e[j].href&&e[j].href===b.href){k=true}}if(k){h()}else{setTimeout(function(){b.onloadcssdefined(h)})}};b.onloadcssdefined(function(){b.media=f||"all"});return b};function setCSSHEIGHT(b,a){(function(g,e,c,h){var d=g(b),i=d.find(a),f=function(){i.css("height","auto");var n=Math.floor(d.width()/i.width());if(n==null||n<2){return true}for(var m=0,l=i.length;m<l;m+=n){var o=0,k=i.slice(m,m+n);k.each(function(){var j=parseInt(g(this).outerHeight());if(j>o){o=j}});k.css("height",o)}};f();g(e).on("resize",f);g(c).on("cycle-bootstrap",f);d.find("img").on("load",f)})(jQuery,window,document)};</script>',"\n";
}

/*
 * Akismet Inline JS
 *
*/
add_action( 'wp_footer', 'mwp_akismet_deregister_script', 11 );
function mwp_akismet_deregister_script() { 
	if ( class_exists('Akismet') ) {
		wp_deregister_script('akismet-form');
		if (is_singular()) :
			?><script>var ak_js=document.getElementById("ak_js");if(!ak_js){ak_js=document.createElement('input');ak_js.setAttribute('id','ak_js');ak_js.setAttribute('name','ak_js');ak_js.setAttribute('type','hidden')}else{ak_js.parentNode.removeChild(ak_js)}ak_js.setAttribute('value',(new Date()).getTime());var commentForm=document.getElementById('commentform');if(commentForm){commentForm.appendChild(ak_js)}else{var replyRowContainer=document.getElementById('replyrow');if(replyRowContainer){var children=replyRowContainer.getElementsByTagName('td');if(children.length>0){children[0].appendChild(ak_js)}}}</script><?php
		endif;
	}
}
/*
 * Contact Form 7
 *
 * Inline Contact Form 7 Script
 * 
*/
add_action('wp_footer','mwp_contact_form7_scripts', 5);
function mwp_contact_form7_scripts() {
	if( function_exists( 'wpcf7_enqueue_scripts' ) && is_singular() ) {
    	$post = get_post();
    	if( has_shortcode($post->post_content, 'contact-form-7') ) {
			$cf7_src = MWP_PATH_URL . '/js/cf7.min.js';
			echo '<script src="'.$cf7_src.'" defer="defer"></script>';
		}
    }
}
/*
 * comment.reply.js inline
 *
*/
add_action('wp_footer', 'mwp_comment_reply_js', 6);
function mwp_comment_reply_js(){
	if ( (!is_admin()) && is_singular() && comments_open() && get_option('thread_comments') == 1 ) :
		$file = ABSPATH . WPINC .'/js/comment-reply.min.js';
		mwp_inline_js_file($file);
	endif;
}
/*
 * Inline wp-embed.min.js
 *
*/
function mwp_remove_wp_embed_script(){
	if (!is_admin()) {
		wp_deregister_script( 'wp-embed' );
		$file = ABSPATH . WPINC .'/js/wp-embed.min.js';
		mwp_inline_js_file($file);
	}
}
add_action( 'wp_footer', 'mwp_remove_wp_embed_script' );
/*
 * Inline WP-Postviews Scripts
 * 
*/
remove_action('wp_enqueue_scripts', 'wp_postview_cache_count_enqueue');
add_action('wp_footer', 'mwp_postview_cache', 99999999999);
function mwp_postview_cache() {
	if(function_exists('the_views')) {
		global $user_ID, $post;
		if( !defined( 'WP_CACHE' ) || !WP_CACHE )
			return;
		$views_options = get_option( 'views_options' );
		if( isset( $views_options['use_ajax'] ) && intval( $views_options['use_ajax'] ) === 0 )
			return;
		if ( !wp_is_post_revision( $post ) && ( is_single() || is_page() ) ) {
			$should_count = false;
			switch( intval( $views_options['count'] ) ) {
				case 0:
					$should_count = true;
					break;
				case 1:
					if ( empty( $_COOKIE[USER_COOKIE] ) && intval( $user_ID ) === 0) {
						$should_count = true;
					}
					break;
				case 2:
					if ( intval( $user_ID ) > 0 ) {
						$should_count = true;
					}
					break;
			}
			if ( $should_count ) {
				?>
				<script>
				/* <![CDATA[ */
				var viewsCacheL10n = {"admin_ajax_url":"<?php echo MWP_AJAX_ENDPOINT; ?>","post_id":"<?php echo $post->ID; ?>"};
				/* ]]> */
				</script>
				<script>jQuery(document).ready(function($){jQuery.ajax({type:"GET",url:viewsCacheL10n.admin_ajax_url,data:"postviews_id="+viewsCacheL10n.post_id+"&action=postviews",cache:!1});});</script>
				<?php
			}
		}
	} elseif ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'stats' ) ) {
		global $user_ID, $post;
		if( !defined( 'WP_CACHE' ) || !WP_CACHE )
		return;
		if ( is_single() || is_page()  ) {
			?>
			<script>
			/* <![CDATA[ */
			var viewsCacheL10n = {"admin_ajax_url":"<?php echo MWP_AJAX_ENDPOINT; ?>","post_id":"<?php echo $post->ID; ?>"};
			/* ]]> */
			</script>
			<script>jQuery(document).ready(function($){jQuery.ajax({type:"GET",url:viewsCacheL10n.admin_ajax_url,data:"postviews_id="+viewsCacheL10n.post_id+"&action=postviews",cache:!1});});</script>
			<?php
		}
	}
}
/*
 * Google Analytics
 *
 * avoid serving the analytics script to PageSpeed
 * https://stackoverflow.com/a/36137447
 *
*/
add_action('wp_footer', 'mwp_google_analytics', 0);
function mwp_google_analytics() {
	
	$get_track_type = mwp_option('mobile-analytics-type');
	$get_track_code = mwp_option('mobile-analytics');
	
	if (!empty($get_track_code)) {
		$track_code	= $get_track_code;
		$track_type = $get_track_type;
	} else {
		$track_code	= mwp_option('google-analytics');
		$track_type = mwp_option('google-analytics-type');
	}

	if($track_type == 1 && !empty($track_code)) {
		?>
		<script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
			ga('create', '<?php echo sanitize_text_field($track_code); ?>', 'auto');
			ga('send', 'pageview');
		</script>
		<?php
	} elseif($track_type == 2 && !empty($track_code)) {
		?>
		<script>
		function loadGAnalytics(src) {
			return new Promise(function (resolve, reject) {
				var s;
				s = document.createElement('script');
				s.src = src;
				s.onload = resolve;
				s.onerror = reject;
				document.head.appendChild(s);
			});
		}
		loadGAnalytics('https://www.googletagmanager.com/gtag/js?id=<?php echo sanitize_text_field($track_code); ?>');
		window.dataLayer = window.dataLayer || [];
		function gtag(){dataLayer.push(arguments);}
		gtag('js', new Date());
		gtag('config', '<?php echo sanitize_text_field($track_code); ?>');
			
		</script>
		<?php
	}
}
/*
 * Google Analytics
 *
 * avoid serving the analytics script to PageSpeed
 * https://stackoverflow.com/a/36137447
 *
*/
add_action('wp_footer', 'mwp_google_analytics_authors', 1);
function mwp_google_analytics_authors() {
	$track_code = get_the_author_meta('mwp_ars_analytics', get_the_author_meta( 'ID'));
	if(is_singular() && !empty($track_code)) {
		?><script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
			ga('create', '<?php echo sanitize_text_field($track_code); ?>', 'auto');
			ga('send', 'pageview');
		</script><?php
	}
}
/*
 * Alexa Certify 
 *
 * avoid serving the analytics script to PageSpeed
 * https://stackoverflow.com/a/36137447
 *
*/
add_action('wp_footer', 'mwp_alexa_certify', 0);
function mwp_alexa_certify() {
	
	$get_alexa_atrk_acct 	= mwp_option('mobile_alexa_atrk_acct');
	$get_alexa_domain 		= mwp_option('mobile_alexa_domain');
	
	if (!empty($get_alexa_atrk_acct) && !empty($get_alexa_domain)) {
		$alexa_atrk_acct	= $get_alexa_atrk_acct;
		$alexa_domain		= $get_alexa_domain;
	} else {
		$alexa_atrk_acct 	= mwp_option('alexa_atrk_acct');
		$alexa_domain 		= mwp_option('alexa_domain');
	}
	
	if(!empty($alexa_atrk_acct) && !empty($alexa_domain)) {
		?>
		<script>
		_atrk_opts = { atrk_acct:"<?php echo sanitize_text_field($alexa_atrk_acct); ?>", domain:"<?php echo sanitize_text_field($alexa_domain); ?>",dynamic: true};
		(function() { var as = document.createElement('script'); as.type = 'text/javascript'; as.async = true; as.src = "https://certify-js.alexametrics.com/atrk.js"; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(as, s); })();
		</script>
		<noscript><img src="https://certify.alexametrics.com/atrk.gif?account=<?php echo sanitize_text_field($alexa_atrk_acct); ?>" style="display:none" height="1" width="1" alt="" /></noscript>
		<?php
	}
}
/*
 * Facebook Pixel
 *
 * https://developers.facebook.com/docs/facebook-pixel/implementation
 *
*/
add_action('wp_footer', 'mwp_facebook_pixel', 0);
function mwp_facebook_pixel() {
	$facebook_pixel 	= mwp_option('facebook-pixel');
	if(!empty($facebook_pixel)) {
		?>
		<!-- Facebook Pixel Code -->
		<script>
		  !function(f,b,e,v,n,t,s)
		  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
		  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
		  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
		  n.queue=[];t=b.createElement(e);t.async=!0;
		  t.src=v;s=b.getElementsByTagName(e)[0];
		  s.parentNode.insertBefore(t,s)}(window, document,'script',
		  'https://connect.facebook.net/en_US/fbevents.js');
		  fbq('init', '<?php echo sanitize_text_field($facebook_pixel); ?>');
		  fbq('track', 'PageView');
		</script>
		<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=<?php echo sanitize_text_field($facebook_pixel); ?>&ev=PageView&noscript=1"/></noscript>
		<!-- End Facebook Pixel Code -->
		<?php
	}
}
/*
 * Load jQuery Library
 *
*/
if (!is_admin()) {
	add_action("wp_enqueue_scripts", "mwp_load_jquery", 0);
	function mwp_load_jquery() {
		wp_deregister_script('jquery');
		wp_deregister_script('comment-reply');
		if (mwp_option('inline-jquery') == 0) :
			if (mwp_option('cdn-js-css') == 1) :
				wp_register_script('jquery', MWP_CDN_URL .'[email protected]/dist/jquery.min.js', false, null);
				wp_enqueue_script('jquery');
			else :
				wp_register_script('jquery', get_template_directory_uri() .'/js/jquery.min.js', false, null);
				wp_enqueue_script('jquery');
			endif;
		endif;
	}
}
/*
 * Inline jQuery Library
 * 
*/
function mwp_load_inline_jquery() {
	if (mwp_option('inline-jquery') == 1) :
		$file = get_template_directory() .'/js/jquery.min.js';
		mwp_inline_js_file($file);
	endif;	
}
add_action("wp_head", "mwp_load_inline_jquery", 1);

/*
 *
 * Print All jQuery Scripts
 *
*/
add_action('wp_footer', 'mwp_print_all_scripts', 3);
function mwp_print_all_scripts() {
?>
<script>
var mwp_direction = {
	<?php if (is_rtl()) { ?>
	"dir": "rtl"
	<?php } else { ?>
	"dir": "ltr"
	<?php } ?>
};
window.___gcfg = {
	lang: '<?php echo mwp_locale(); ?>'
};
<?php 
/*
 * Sticky Header
*/
if (mwp_option('sticky-header-mobile') == 1) { ?>
jQuery(document).ready(function($){
	$(window).scroll(function() {    // this will work when your window scrolled.
		var height = $(window).scrollTop();  //getting the scrolling height of window
		if(height > 100) {
			$('.header').addClass("header-sticky");
		} else{
			$('.header').removeClass("header-sticky");
		}
	});
});
<?php
}
/*
 * @Jetpack Support Buttons
*/
?>
jQuery(document).ready(function(){
	jQuery('.pushbutton-wide').addClass('btn btn-color');
	jQuery('#subscribe-submit input[name="jetpack_subscriptions_widget"]').addClass('btn btn-color');
});
<?php
/*
 * @LazyLoad XT
 *
*/
if (mwp_option('lazyload-mobile') == 1) : 
	?>
	!function(a,b,c,d){function e(a,b){return a[b]===d?t[b]:a[b]}function f(){var a=b.pageYOffset;return a===d?r.scrollTop:a}function g(a,b){var c=t["on"+a];c&&(w(c)?c.call(b[0]):(c.addClass&&b.addClass(c.addClass),c.removeClass&&b.removeClass(c.removeClass))),b.trigger("lazy"+a,[b]),k()}function h(b){g(b.type,a(this).off(p,h))}function i(c){if(A.length){c=c||t.forceLoad,B=1/0;var d,e,i=f(),j=b.innerHeight||r.clientHeight,k=b.innerWidth||r.clientWidth;for(d=0,e=A.length;e>d;d++){var l,m=A[d],o=m[0],q=m[n],s=!1,u=c;if(z(r,o)){if(c||!q.visibleOnly||o.offsetWidth||o.offsetHeight){if(!u){var v=o.getBoundingClientRect(),x=q.edgeX,y=q.edgeY;l=v.top+i-y-j,u=i>=l&&v.bottom>-y&&v.left<=k+x&&v.right>-x}if(u){g("show",m);var C=q.srcAttr,D=w(C)?C(m):o.getAttribute(C);D&&(m.on(p,h),o.src=D),s=!0}else B>l&&(B=l)}}else s=!0;s&&(A.splice(d--,1),e--)}e||g("complete",a(r))}}function j(){C>1?(C=1,i(),setTimeout(j,t.throttle)):C=0}function k(a){A.length&&(a&&"scroll"===a.type&&a.currentTarget===b&&B>=f()||(C||setTimeout(j,0),C=2))}function l(){v.lazyLoadXT()}function m(){i(!0)}var n="lazyLoadXT",o="lazied",p="load error",q="lazy-hidden",r=c.documentElement||c.body,s=b.onscroll===d||!!b.operamini||!r.getBoundingClientRect,t={autoInit:!0,selector:"img[data-src]",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,forceLoad:s,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll touchmove focus",forceEvent:"",oninit:{removeClass:"lazy"},onshow:{addClass:q},onload:{removeClass:q,addClass:"lazy-loaded"},onerror:{removeClass:q},checkDuplicates:!0},u={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},v=a(b),w=a.isFunction,x=a.extend,y=a.data||function(b,c){return a(b).data(c)},z=a.contains||function(a,b){for(;b=b.parentNode;)if(b===a)return!0;return!1},A=[],B=0,C=0;a[n]=x(t,u,a[n]),a.fn[n]=function(c){c=c||{};var d,f=e(c,"blankImage"),h=e(c,"checkDuplicates"),i=e(c,"scrollContainer"),j={};a(i).on("scroll",k);for(d in u)j[d]=e(c,d);return this.each(function(d,e){if(e===b)a(t.selector).lazyLoadXT(c);else{if(h&&y(e,o))return;var i=a(e).data(o,1);f&&"IMG"===e.tagName&&!e.src&&(e.src=f),i[n]=x({},j),g("init",i),A.push(i)}})},a(c).ready(function(){g("start",v),v.on(t.loadEvent,l).on(t.updateEvent,k).on(t.forceEvent,m),a(c).on(t.updateEvent,k),t.autoInit&&l()})}(window.jQuery||window.Zepto||window.$,window,document),function(a){var b=a.lazyLoadXT;b.selector+=",video,iframe[data-src]",b.videoPoster="data-poster",a(document).on("lazyshow","video",function(c,d){var e=d.lazyLoadXT.srcAttr,f=a.isFunction(e);d.attr("poster",d.attr(b.videoPoster)).children("source,track").each(function(b,c){var d=a(c);d.attr("src",f?e(d):d.attr(e))}),this.load()})}(window.jQuery||window.Zepto||window.$);
	jQuery.extend(jQuery.lazyLoadXT,{selector:'img[data-src],iframe[data-src]',throttle:50});
	jQuery.lazyLoadXT.updateEvent = 'touchmove load orientationchange resize scroll focus click showlazy';
	jQuery.lazyLoadXT.edgeY = 0;
	<?php 
endif;
/*
 * @Google Doc Viewer
 *
*/
if (is_singular()) : 
	$post = get_post();
	if( has_shortcode($post->post_content, 'docs') ||  has_block('mwp/doc-viewer', $post->ID) ) {
		?>
		jQuery(window).on('load',function(){
		!function(e){e.fn.gdocsViewer=function(t){var i={width:"600",height:"700"};return t&&e.extend(i,t),this.each(function(){var t=e(this).attr("href"),r=t.substring(t.lastIndexOf(".")+1);/^(tiff|pdf|ppt|pps|doc|docx)$/.test(r)&&e(this).after(function(){var r=e(this).attr("id"),d="undefined"!=typeof r&&r!==!1?r+"-gdocsviewer":"";return'<div id="'+d+'" class="gdocsviewer"><iframe class="docview" src="https://docs.google.com/viewerng/viewer?embedded=true&url='+encodeURIComponent(t)+'" width="'+i.width+'" height="'+i.height+'" style="border: none;margin : 0 auto; display : block;"></iframe></div>'})})}}(jQuery);
		jQuery(document).ready(function(){jQuery('#embedURL,a.embed').gdocsViewer({width: 600, height: 400});});
		});
		<?php 
	}
endif;
/*
 * Default Gallery
 *
*/
if (is_singular()) : 
	$post = get_post();
	if( has_shortcode($post->post_content, 'gallery') ) {
		?>
		jQuery(window).on('load',function(){
			setTimeout(function(){
				setCSSHEIGHT (".gallery-columns-2", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-3", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-4", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-5", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-6", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-7", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-8", ".gallery-item");
				setCSSHEIGHT (".gallery-columns-9", ".gallery-item");
			}, 1000);
		});
		<?php 
	}
endif;
/*
 * Remove width attr from tables
 *
*/
?>
jQuery(document).ready(function() {
	jQuery('table td').removeAttr( "width" );	
	if (!$("table").hasClass("table")) {
		$('table').addClass( "table table-striped" );
	}
	$('.akismet_comment_form_privacy_notice').addClass( "alert alert-info" );
});
<?php
/*
 * @SlideOut.js
 *
*/
?>
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Slideout=t()}}(function(){var t,e,n;return function i(t,e,n){function o(r,a){if(!e[r]){if(!t[r]){var u=typeof require=="function"&&require;if(!a&&u)return u(r,!0);if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var f=e[r]={exports:{}};t[r][0].call(f.exports,function(e){var n=t[r][1][e];return o(n?n:e)},f,f.exports,i,t,e,n)}return e[r].exports}var s=typeof require=="function"&&require;for(var r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,n){"use strict";var i=t("decouple");var o=t("emitter");var s;var r=false;var a=window.document;var u=a.documentElement;var l=window.navigator.msPointerEnabled;var f={start:l?"MSPointerDown":"touchstart",move:l?"MSPointerMove":"touchmove",end:l?"MSPointerUp":"touchend"};var h=function v(){var t=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/;var e=a.getElementsByTagName("script")[0].style;for(var n in e){if(t.test(n)){return"-"+n.match(t)[0].toLowerCase()+"-"}}if("WebkitOpacity"in e){return"-webkit-"}if("KhtmlOpacity"in e){return"-khtml-"}return""}();function c(t,e){for(var n in e){if(e[n]){t[n]=e[n]}}return t}function p(t,e){t.prototype=c(t.prototype||{},e.prototype)}function d(t){t=t||{};this._startOffsetX=0;this._currentOffsetX=0;this._opening=false;this._moved=false;this._opened=false;this._preventOpen=false;this._touch=t.touch===undefined?true:t.touch&&true;this.panel=t.panel;this.menu=t.menu;if(this.panel.className.search("slideout-panel")===-1){this.panel.className+=" slideout-panel"}if(this.menu.className.search("slideout-menu")===-1){this.menu.className+=" slideout-menu"}this._fx=t.fx||"ease";this._duration=parseInt(t.duration,10)||300;this._tolerance=parseInt(t.tolerance,10)||70;this._padding=this._translateTo=parseInt(t.padding,10)||256;this._orientation=t.side==="right"?-1:1;this._translateTo*=this._orientation;if(this._touch){this._initTouchEvents()}}p(d,o);d.prototype.open=function(){var t=this;this.emit("beforeopen");if(u.className.search("slideout-open")===-1){u.className+=" slideout-open"}this._setTransition();this._translateXTo(this._translateTo);this._opened=true;setTimeout(function(){t.panel.style.transition=t.panel.style["-webkit-transition"]="";t.emit("open")},this._duration+50);return this};d.prototype.close=function(){var t=this;if(!this.isOpen()&&!this._opening){return this}this.emit("beforeclose");this._setTransition();this._translateXTo(0);this._opened=false;setTimeout(function(){u.className=u.className.replace(/ slideout-open/,"");t.panel.style.transition=t.panel.style["-webkit-transition"]=t.panel.style[h+"transform"]=t.panel.style.transform="";t.emit("close")},this._duration+50);return this};d.prototype.toggle=function(){return this.isOpen()?this.close():this.open()};d.prototype.isOpen=function(){return this._opened};d.prototype._translateXTo=function(t){this._currentOffsetX=t;this.panel.style[h+"transform"]=this.panel.style.transform="translateX("+t+"px)";return this};d.prototype._setTransition=function(){this.panel.style[h+"transition"]=this.panel.style.transition=h+"transform "+this._duration+"ms "+this._fx;return this};d.prototype._initTouchEvents=function(){var t=this;this._onScrollFn=i(a,"scroll",function(){if(!t._moved){clearTimeout(s);r=true;s=setTimeout(function(){r=false},250)}});this._preventMove=function(e){if(t._moved){e.preventDefault()}};a.addEventListener(f.move,this._preventMove);this._resetTouchFn=function(e){if(typeof e.touches==="undefined"){return}t._moved=false;t._opening=false;t._startOffsetX=e.touches[0].pageX;t._preventOpen=!t._touch||!t.isOpen()&&t.menu.clientWidth!==0};this.panel.addEventListener(f.start,this._resetTouchFn);this._onTouchCancelFn=function(){t._moved=false;t._opening=false};this.panel.addEventListener("touchcancel",this._onTouchCancelFn);this._onTouchEndFn=function(){if(t._moved){t.emit("translateend");t._opening&&Math.abs(t._currentOffsetX)>t._tolerance?t.open():t.close()}t._moved=false};this.panel.addEventListener(f.end,this._onTouchEndFn);this._onTouchMoveFn=function(e){if(r||t._preventOpen||typeof e.touches==="undefined"){return}var n=e.touches[0].clientX-t._startOffsetX;var i=t._currentOffsetX=n;if(Math.abs(i)>t._padding){return}if(Math.abs(n)>20){t._opening=true;var o=n*t._orientation;if(t._opened&&o>0||!t._opened&&o<0){return}if(!t._moved){t.emit("translatestart")}if(o<=0){i=n+t._padding*t._orientation;t._opening=false}if(!t._moved&&u.className.search("slideout-open")===-1){u.className+=" slideout-open"}t.panel.style[h+"transform"]=t.panel.style.transform="translateX("+i+"px)";t.emit("translate",i);t._moved=true}};this.panel.addEventListener(f.move,this._onTouchMoveFn);return this};d.prototype.enableTouch=function(){this._touch=true;return this};d.prototype.disableTouch=function(){this._touch=false;return this};d.prototype.destroy=function(){this.close();a.removeEventListener(f.move,this._preventMove);this.panel.removeEventListener(f.start,this._resetTouchFn);this.panel.removeEventListener("touchcancel",this._onTouchCancelFn);this.panel.removeEventListener(f.end,this._onTouchEndFn);this.panel.removeEventListener(f.move,this._onTouchMoveFn);a.removeEventListener("scroll",this._onScrollFn);this.open=this.close=function(){};return this};e.exports=d},{decouple:2,emitter:3}],2:[function(t,e,n){"use strict";var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t,e,n){var o,s=false;function r(t){o=t;a()}function a(){if(!s){i(u);s=true}}function u(){n.call(t,o);s=false}t.addEventListener(e,r,false);return r}e.exports=o},{}],3:[function(t,e,n){"use strict";var i=function(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}};n.__esModule=true;var o=function(){function t(){i(this,t)}t.prototype.on=function e(t,n){this._eventCollection=this._eventCollection||{};this._eventCollection[t]=this._eventCollection[t]||[];this._eventCollection[t].push(n);return this};t.prototype.once=function n(t,e){var n=this;function i(){n.off(t,i);e.apply(this,arguments)}i.listener=e;this.on(t,i);return this};t.prototype.off=function o(t,e){var n=undefined;if(!this._eventCollection||!(n=this._eventCollection[t])){return this}n.forEach(function(t,i){if(t===e||t.listener===e){n.splice(i,1)}});if(n.length===0){delete this._eventCollection[t]}return this};t.prototype.emit=function s(t){var e=this;for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++){i[o-1]=arguments[o]}var s=undefined;if(!this._eventCollection||!(s=this._eventCollection[t])){return this}s=s.slice(0);s.forEach(function(t){return t.apply(e,i)});return this};return t}();n["default"]=o;e.exports=n["default"]},{}]},{},[1])(1)});
(function($){$.fn.navAccordion=function(options,callback){this.each(function(){var settings=$.extend({expandButtonText:"+",collapseButtonText:"-",selectedExpand:"true",selectedClass:"selected",multipleLevels:"true",buttonWidth:"20%",buttonPosition:"right",slideSpeed:"fast",parentElement:"li",childElement:"ul",headersOnly:false,headersOnlyCheck:false,delayLink:false,delayAmount:null},options);var container=this,multi=settings.multipleLevels?'':' > '+settings.childElement+' > ';$(container).addClass('accordion-nav');$(multi+settings.parentElement,container).each(function(){if(($(this).contents(settings.childElement).length>0&&settings.headersOnlyCheck==false)||(!($('> a',this).attr('href'))&&settings.headersOnlyCheck==true)){$(this).addClass('has-subnav').css('position','relative').find('>a').css('margin-'+settings.buttonPosition,settings.buttonWidth);$(' > '+settings.childElement,this).before('<span class="accordion-btn-wrap"><span class="accordion-btn accordion-collapsed">'+settings.expandButtonText+'</span><span class="accordion-btn accordion-expanded">'+settings.collapseButtonText+'</span></span>');$('.accordion-btn-wrap',this).css({'width':settings.buttonWidth,'position':'absolute','top':0,'text-align':'center','cursor':'pointer','display':'inline-block'}).css(settings.buttonPosition,0);$('.accordion-btn ',this).css({'display':'inline-block','width':'100%'});$('.accordion-expanded',this).css('display','none')}if(!($('> a',this).attr('href'))||settings.headersOnly){$(this).addClass('accordion-header-only').find('.accordion-btn-wrap').css({'width':'100%','text-align':settings.buttonPosition}).find('.accordion-btn ').css({'width':settings.buttonWidth,'text-align':'center'})}if(settings.delayLink&&!settings.headersOnly){var currentThis=this,speed=settings.delayAmount!=null?settings.delayAmount:settings.slideSpeed;if(speed=="fast"){speed=200}else if(speed=="slow"){speed=600}$('> a',currentThis).on('click',function(e){if(!$('> .accordion-btn-wrap',currentThis).hasClass("accordion-active")){e.preventDefault();var href=$(this).attr('href');clickToggle($('> .accordion-btn-wrap',currentThis));setTimeout(function(){window.location=href},speed)}})}});var selectedNavAccordion=$(settings.parentElement+'.'+settings.selectedClass+' > .accordion-btn-wrap',container);var buttonheightResize=debounce(function(){buttonheight();expandSelected()},250);buttonheight();expandSelected();$(container).on('click','.accordion-btn-wrap',function(e){e.preventDefault();clickToggle(this)});if(typeof callback=="function"){callback()}function clickToggle(element){var nextChild=$(element).next(settings.childElement),currentExpandBtn=$('.accordion-expanded',element),currentCollapseBtn=$('.accordion-collapsed',element),parentObj=$(element).closest(settings.parentElement);if(nextChild.is(':visible')){nextChild.slideUp(settings.slideSpeed);$(element).removeClass('accordion-active');currentExpandBtn.css('display','none');currentCollapseBtn.css('display','inline-block');parentObj.add(parentObj.siblings('.active')).add(parentObj.find('.active')).removeClass('active')}else{$(element).closest(settings.childElement).find('.accordion-active').removeClass('accordion-active').next(settings.childElement).slideUp(settings.slideSpeed).prev().find('.accordion-expanded').css('display','none').parent().find('.accordion-collapsed').css('display','inline-block');parentObj.add(parentObj.siblings('.active')).add(parentObj.find('.active')).removeClass('active');$(element).addClass('accordion-active');nextChild.slideToggle(settings.slideSpeed);currentExpandBtn.css('display','inline-block');currentCollapseBtn.css('display','none');parentObj.addClass('active')}}function expandSelected(){if(settings.selectedExpand){if(!settings.headersOnlyCheck){selectedNavAccordion.find('.accordion-expanded').css('display','inline-block');selectedNavAccordion.find('.accordion-collapsed').css('display','none');selectedNavAccordion.addClass('accordion-active').next(settings.childElement).css('display','block');selectedNavAccordion.closest(settings.parentElement).addClass('active')}else{$(settings.parentElement+'.'+settings.selectedClass+' > '+settings.childElement,container).css('display','block');$(settings.parentElement+'.'+settings.selectedClass).addClass('active')}}}function buttonheight(){$('.accordion-btn',container).each(function(){$(settings.parentElement+'.has-subnav > '+settings.childElement,container).css('display','block');var parentItem=$(this).closest(settings.parentElement),lineheight=$('> a',parentItem).innerHeight();$(this).css({'line-height':lineheight+'px','height':lineheight});$(settings.parentElement+((settings.headersOnlyCheck)?' ':'.has-subnav > ')+settings.childElement,container).css('display','none');$('.accordion-expanded').css('display','none');$('.accordion-collapsed').css('display','inline-block')})}function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate)func.apply(context,args)};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)func.apply(context,args)}}})}})(jQuery);
jQuery(document).ready(function ($) {
	$("#header,#main,#footer,#page-overlay,.adslot").wrapAll("<div id='panel'></div>");
	var slideout = new Slideout({
		'panel': document.getElementById('panel'),
		'menu': document.getElementById('mmobile'),
		'touch': false,
		<?php if (is_rtl()) { ?>
		'side': 'right',
		<?php } else { ?>
		'side': 'left',
		<?php } ?>
		'padding': 256,
		'tolerance': 70
	});
	$('.nav-btn').on('click',function(){
		slideout.toggle();
	});
	function checkOpen(eve){
		if (slideout.isOpen()) {
			eve.preventDefault();
			slideout.close();
		}
	}
	function addClick() {
		document.querySelector('#panel').addEventListener('click', checkOpen);
	}
	function removeClick(){
		document.querySelector('#panel').removeEventListener('click', checkOpen);
	}
	slideout.on('open', addClick);
	slideout.on('close', removeClick);
	document.querySelector('.nav-btn').addEventListener('click', function() {
	  slideout.open();
	});
	function close(e) {
		e.preventDefault();
		slideout.close();
	}
	slideout.on('beforeopen', function() {
		jQuery('#page-overlay').show();
	}).on('open', function() {
		this.panel.addEventListener('click', close);
	}).on('beforeclose', function() {
		jQuery('#page-overlay').hide();
		this.panel.removeEventListener('click', close);
	});
});
jQuery(document).ready(function ($) {
	$('.menu-section-list').navAccordion({
		expandButtonText: '<i class="fa fa-plus"></i>', 
		collapseButtonText: '<i class="fa fa-minus"></i>',
		<?php if (is_rtl()) { ?>
		buttonPosition: 'left',
		<?php } else { ?>
		buttonPosition: 'right',
		<?php } ?>
	});
});
jQuery(document).on('newElements', function(){
    (adsbygoogle = window.adsbygoogle || []).push({});
});
<?php
/*
 * @LightBox library
*/
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'carousel' ) ) {

} elseif (mwp_option('lightbox-enable') == 1) {
	if (is_singular()) :
		if (mwp_option('lightbox-library') == 1) {
			echo 'jQuery(document).ready(function(){jQuery(".el-content a.swipebox,.entry-gallery a.swipebox").swipebox();});';
		} elseif (mwp_option('lightbox-library') == 2) {
			echo 'jQuery(document).ready(function(){jQuery(".el-content,.entry-gallery").find("img").addClass("data-lightbox");});';
		} elseif (mwp_option('lightbox-library') == 3) {
			echo 'jQuery(document).ready(function(){jQuery(".el-content a.venobox,.entry-gallery a.venobox").venobox({numeratio: true,titleattr: "title",});});';
		} 
	endif;
}
/*
 * Related Post (Jetpack)
*/
if (is_singular() && class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'related-posts' ) ) {
?>
var related_posts_js_options = {"post_heading":"h4"};
(function($){var jprp={response:null,getEndpointURL:function(URL){var locationObject,is_customizer='undefined'!==typeof wp&&wp.customize&&wp.customize.settings&&wp.customize.settings.url&&wp.customize.settings.url.self;if(is_customizer){locationObject=document.createElement('a');locationObject.href=wp.customize.settings.url.self}else{locationObject=document.location}if('string'===typeof(URL)&&URL.match(/^https?:\/\//)){locationObject=document.createElement('a');locationObject.href=URL}var args='relatedposts=1';if($('#jp-relatedposts').data('exclude')){args+='&relatedposts_exclude='+$('#jp-relatedposts').data('exclude')}if(is_customizer){args+='&jetpackrpcustomize=1'}var pathname=locationObject.pathname;if('/'!==pathname[0]){pathname='/'+pathname}if(''===locationObject.search){return pathname+'?'+args}else{return pathname+locationObject.search+'&'+args}},getAnchor:function(post,classNames){var anchor_title=post.title;if(''!==(''+post.excerpt)){anchor_title+='\n\n'+post.excerpt}var anchor=$('<a>');anchor.attr({'class':classNames,'href':post.url,'title':anchor_title,'rel':post.rel,'data-origin':post.url_meta.origin,'data-position':post.url_meta.position});var anchor_html=$('<div>').append(anchor).html();return[anchor_html.substring(0,anchor_html.length-4),'</a>']},generateMinimalHtml:function(posts,options){var self=this;var html='';$.each(posts,function(index,post){var anchor=self.getAnchor(post,'jp-relatedposts-post-a');var classes='jp-relatedposts-post jp-relatedposts-post'+index;if(post.classes.length>0){classes+=' '+post.classes.join(' ')}html+='<p class="'+classes+'" data-post-id="'+post.id+'" data-post-format="'+post.format+'">';html+='<span class="jp-relatedposts-post-title">'+anchor[0]+post.title+anchor[1]+'</span>';if(options.showDate){html+='<span class="jp-relatedposts-post-date">'+post.date+'</span>'}if(options.showContext){html+='<span class="jp-relatedposts-post-context">'+post.context+'</span>'}html+='</p>'});return'<div class="jp-relatedposts-items jp-relatedposts-items-minimal jp-relatedposts-'+options.layout+' ">'+html+'</div>'},generateVisualHtml:function(posts,options){var self=this;var html='';$.each(posts,function(index,post){var anchor=self.getAnchor(post,'jp-relatedposts-post-a');var classes='jp-relatedposts-post jp-relatedposts-post'+index;if(post.classes.length>0){classes+=' '+post.classes.join(' ')}if(!post.img.src){classes+=' jp-relatedposts-post-nothumbs'}else{classes+=' jp-relatedposts-post-thumbs'}html+='<div class="'+classes+'" data-post-id="'+post.id+'" data-post-format="'+post.format+'">';if(post.img.src){html+=anchor[0]+'<img class="jp-relatedposts-post-img" src="'+post.img.src+'" width="'+post.img.width+'" alt="'+post.title+'" />'+anchor[1]}else{var anchor_overlay=self.getAnchor(post,'jp-relatedposts-post-a jp-relatedposts-post-aoverlay');html+=anchor_overlay[0]+anchor_overlay[1]}html+='<'+related_posts_js_options.post_heading+' class="jp-relatedposts-post-title">'+anchor[0]+post.title+anchor[1]+'</'+related_posts_js_options.post_heading+'>';html+='<p class="jp-relatedposts-post-excerpt">'+$('<p>').text(post.excerpt).html()+'</p>';if(options.showDate){html+='<p class="jp-relatedposts-post-date">'+post.date+'</p>'}if(options.showContext){html+='<p class="jp-relatedposts-post-context">'+post.context+'</p>'}html+='</div>'});return'<div class="jp-relatedposts-items jp-relatedposts-items-visual jp-relatedposts-'+options.layout+' ">'+html+'</div>'},setVisualExcerptHeights:function(){var elements=$('#jp-relatedposts .jp-relatedposts-post-nothumbs .jp-relatedposts-post-excerpt');if(0>=elements.length){return}var fontSize=parseInt(elements.first().css('font-size'),10),lineHeight=parseInt(elements.first().css('line-height'),10);elements.css('max-height',(5*lineHeight/fontSize)+'em')},getTrackedUrl:function(anchor){var args='relatedposts_hit=1';args+='&relatedposts_origin='+$(anchor).data('origin');args+='&relatedposts_position='+$(anchor).data('position');var pathname=anchor.pathname;if('/'!==pathname[0]){pathname='/'+pathname}if(''===anchor.search){return pathname+'?'+args}else{return pathname+anchor.search+'&'+args}},cleanupTrackedUrl:function(){if('function'!==typeof history.replaceState){return}var cleaned_search=document.location.search.replace(/\brelatedposts_[a-z]+=[0-9]*&?\b/gi,'');if('?'===cleaned_search){cleaned_search=''}if(document.location.search!==cleaned_search){history.replaceState({},document.title,document.location.pathname+cleaned_search)}}};function startRelatedPosts(){jprp.cleanupTrackedUrl();var endpointURL=jprp.getEndpointURL(),$relatedPosts=$('#jp-relatedposts');$.getJSON(endpointURL,function(response){if(0===response.items.length||0===$relatedPosts.length){return}jprp.response=response;var html,showThumbnails,options={};if('undefined'!==typeof wp&&wp.customize){showThumbnails=wp.customize.instance('jetpack_relatedposts[show_thumbnails]').get();options.showDate=wp.customize.instance('jetpack_relatedposts[show_date]').get();options.showContext=wp.customize.instance('jetpack_relatedposts[show_context]').get();options.layout=wp.customize.instance('jetpack_relatedposts[layout]').get()}else{showThumbnails=response.show_thumbnails;options.showDate=response.show_date;options.showContext=response.show_context;options.layout=response.layout}html=!showThumbnails?jprp.generateMinimalHtml(response.items,options):jprp.generateVisualHtml(response.items,options);$relatedPosts.append(html);jprp.setVisualExcerptHeights();if(options.showDate){$relatedPosts.find('.jp-relatedposts-post-date').show()}$relatedPosts.show();$('#jp-relatedposts a.jp-relatedposts-post-a').click(function(){this.href=jprp.getTrackedUrl(this)})})}$(function(){if('undefined'!==typeof wp&&wp.customize){if(wp.customize.selectiveRefresh){wp.customize.selectiveRefresh.bind('partial-content-rendered',function(placement){if('jetpack_relatedposts'===placement.partial.id){startRelatedPosts()}})}wp.customize.bind('preview-ready',startRelatedPosts)}else{startRelatedPosts()}})})(jQuery);
<?php
}
/*
 * @Scroll to Top Button
*/
?>
jQuery(document).ready(function(){jQuery(window).scroll(function(){if(jQuery(this).scrollTop()>100){jQuery(".scrolltop").fadeIn()}else{jQuery(".scrolltop").fadeOut()}});jQuery(".scrolltop").click(function(){jQuery("html, body").animate({scrollTop:0},1000);return false})});
<?php
/*
 * removeDuplicates elements
*/
?>
(function($){'use strict';$.fn.removeDuplicates=function(){var $original=$([]);this.each(function(i,el){var $el=$(el),isDuplicate;$original.each(function(i,orig){if(el.isEqualNode(orig)){isDuplicate=true;$el.remove()}});if(!isDuplicate){$original=$original.add($el)}});return $original}}(jQuery));
</script>
<?php	
}
/*
 * Load Cycle2 jQuery
 * Theia Sticky Sidebar
 * LightBox jQuery
 * EC Stars Rating
 *
*/
add_action('wp_footer', 'mwp_load_cycle2_scripts', 4);
function mwp_load_cycle2_scripts() {
	
	if (mwp_option('jquery-cycle2') == 0) : 
		$cycle2_src = MWP_PATH_URL . '/js/jquery.cycle2.min.js';
		echo '<script src="'.$cycle2_src.'" defer="defer"></script>';
	endif;
	/*
	 * LightBox jQuery Libs
	*/
	if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'carousel' ) ) {
		
	} elseif (mwp_option('lightbox-enable') == 1 && is_singular()) {
		if (mwp_option('lightbox-library') == 1 ) {
			$lightbox_src = MWP_PATH_URL . '/js/lightbox/swipebox.min.js';
		} else if (mwp_option('lightbox-library') == 2 ) {
			$lightbox_src = MWP_PATH_URL . '/js/lightbox/lightbox.min.js';
		} else if (mwp_option('lightbox-library') == 3 ) {
			$lightbox_src = MWP_PATH_URL . '/js/lightbox/venobox.min.js';
		}
		echo '<script src="'.$lightbox_src.'" defer="defer"></script>';
	}
	/*
	 * EC Stars Rating
	 *
	*/
	if(function_exists('ec_stars_rating')) {
		wp_deregister_script('ec-stars-script');
		?>
		<script>
		/* <![CDATA[ */
		var ec_ajax_data = {"ajax_url":"<?php echo MWP_AJAX_ENDPOINT; ?>","codes":{"SUCCESS":1,"PREVIOUSLY_VOTED":0,"REQUEST_ERROR":2,"UNKNOWN":-1},"messages":{"success":"You've voted correctly","previously_voted":"You had previously voted","request_error":"The request was malformed, try again","unknown":"An unknown error has occurred, try to vote again"}};
		/* ]]> */
		</script>
		<?php
		if (get_option('ec_stars_rating_use_jquery')) {
			$ec_stars_rating_src = MWP_PATH_URL . '/js/ec-stars-rating.min.js';
		} else {
			$ec_stars_rating_src = MWP_PATH_URL . '/js/ec-stars-rating-nojq.min.js';
		}
		echo '<script src="'.$ec_stars_rating_src.'" defer="defer"></script>';
	}
}
/*
 * Comments settings
 *
*/
add_action('wp_footer', 'mwp_comments_script', 7);
function mwp_comments_script() {
	if (mwp_option('single-comments-type') <= '2') {
		if ( mwp_option( 'single-comments-ajax') == '1') {
			if ( is_singular() && comments_open() ) {
				$output = 'var comments_set = {';
				$output .= '"ajaxurl":"' . MWP_AJAX_ENDPOINT . '",';
				$output .= '"currenturl":"' . get_the_permalink() . '",';
				$output .= '"error_status":"'. __( 'You are posting comments too quickly. Slow down.', MWP_TEXT_DOMAIN ) . '",';
				$output .= '"error_fields":"'. __( 'You might have left one of the fields blank.', MWP_TEXT_DOMAIN ).'",';
				$output .= '"error_duplicate":"'. __( "Duplicate comment detected; it looks as though you've already said that!", MWP_TEXT_DOMAIN ).'",';
				$output .= '"error_email":"'. __( 'Please enter a valid email address', MWP_TEXT_DOMAIN ).'",';
				$output .= '"success":"'. __( 'Thanks for your comment. We appreciate your response.', MWP_TEXT_DOMAIN ).'",';
				$output .= '"heading_text":"'. __( 'Comments', MWP_TEXT_DOMAIN ).'",';
				$output .= '"heading_color":"'.mwp_csa_color().'",';
				$output .= '"heading_border":"'.mwp_csa_border().'",';
				$output .= '"waite":"'. __( 'Please waite', MWP_TEXT_DOMAIN ).'",';
				$output .= '"loader":"'.MWP_PATH_URL.'/images/loader-comment.gif"';
				$output .= '};';
				if ( $output != '' ) {
					$output = "<script>" . $output . "</script>\n";
					echo $output;
				}
				?><script>jQuery.extend(jQuery.fn,{validate:function(){if(jQuery(this).val().length<3){jQuery(this).addClass('required-error');return false}else{jQuery(this).removeClass('required-error');return true}},validateEmail:function(){var emailReg=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/,emailToValidate=jQuery(this).val();if(!emailReg.test(emailToValidate)||emailToValidate==""){jQuery(this).addClass('required-error');return false}else{jQuery(this).removeClass('required-error');return true}},});jQuery(function($){var $msg_pross=jQuery('<span class="simple-loader"></span>').appendTo(".comment-rules, .form-submit");$('#commentform').submit(function(){var button=$('#submit'),respond=$('#respond'),commentlist=$('.commentlist'),cancelreplylink=$('#cancel-comment-reply-link');if($('#author').length)$('#author').validate();if($('#email').length)$('#email').validateEmail();$('#comment').validate();jQuery(".comments-alerts").empty();if($('#author').hasClass('required-error')){jQuery('<span class="alert-hide alert alert-danger">'+comments_set.error_fields+'</span>').appendTo(".comments-alerts").css('display','block')}else if($('#email').hasClass('required-error')){jQuery('<span class="alert-hide alert alert-danger">'+comments_set.error_email+'</span>').appendTo(".comments-alerts").css('display','block')}else if($('#comment').hasClass('required-error')){jQuery('<span class="alert-hide alert alert-danger">'+comments_set.error_fields+'</span>').appendTo(".comments-alerts").css('display','block')}jQuery(window).trigger('resize');if(!button.hasClass('loadingform')&&!$('#author').hasClass('required-error')&&!$('#email').hasClass('required-error')&&!$('#comment').hasClass('required-error')){$.ajax({type:'POST',url:comments_set.ajaxurl,data:$(this).serialize()+'&action=load_ajax_comments',beforeSend:function(xhr){$msg_pross.empty().append('<img src="'+comments_set.loader+'" alt="Processing ...">').show()},error:function(request,status,error){$msg_pross.hide();if(status==500){jQuery('<span class="alert-hide alert alert-danger">'+comments_set.error_500+'</span>').appendTo(".comments-alerts").css('display','block')}else if(status=='timeout'){jQuery('<span class="alert-hide alert alert-danger">'+comments_set.error_timeout+'</span>').appendTo(".comments-alerts").css('display','block')}else{jQuery('<span class="alert-hide alert alert-danger">'+comments_set.error_status+'</span>').appendTo(".comments-alerts").css('display','block')}},success:function(addedCommentHTML){$msg_pross.hide();jQuery(".comments-alerts").empty();jQuery('<span class="alert-n alert alert-success">'+comments_set.success+'</span>').appendTo(".comments-alerts").css('display','block');if(commentlist.length>0){if(respond.parent().hasClass('comment')){if(respond.parent().children('.children').length){respond.parent().children('.children').append(addedCommentHTML)}else{addedCommentHTML='<ul class="children">'+addedCommentHTML+'</ul>';respond.parent().append(addedCommentHTML)}cancelreplylink.trigger("click")}else{commentlist.append(addedCommentHTML)}}else{addedCommentHTML='<div id="thread" class="comment-list"><h2 class="'+comments_set.heading_color+' '+comments_set.heading_border+'">'+comments_set.heading_text+'</h2><ul class="commentlist">'+addedCommentHTML+'</ul></div>';if(jQuery('.comments-note').length>0){jQuery('.comments-note').after($(addedCommentHTML))}else{jQuery('.comments-alerts').after($(addedCommentHTML))}}$('#comment').val('')},complete:function(){jQuery(window).lazyLoadXT();jQuery(window).trigger('resize')}})}return false})});</script><?php
			}
		}
	}
}

/*
 * Custom Script
 *
*/
add_action('wp_footer', 'mwp_custom_scripts', 9);
function mwp_custom_scripts() {
	if (mwp_option('mobile-custom-scripts') <> "") { 
		echo stripslashes(stripslashes(mwp_option('mobile-custom-scripts'))); 
	}
}

/*
 * Adsense - Page-level ads
 *
*/
add_action('wp_footer', 'mwp_adsense_page_level_ads', 99999999999999);
function mwp_adsense_page_level_ads() {
	if (mwp_option('mobile-page-level-ads') <> "") { 
		echo stripslashes(stripslashes(mwp_option('mobile-page-level-ads'))); 
	}
}

/*
 * Social Media Scripts & Urgent News
 *
*/
function mwp_footer_assets() {
?>
<div id="fb-root"></div>
<script>
<?php
	// facebook app sdk
	if (mwp_option('facebook-app-enable') == '1') {
		$facebook_appid = mwp_option('facebook-app-id');
		$facebook_app_url = '//connect.facebook.net/'.mwp_locale().'/sdk.js#xfbml=1&appId='.sanitize_text_field($facebook_appid).'&version=v3.2';
	} else {
		$facebook_app_url = '//connect.facebook.net/'.mwp_locale().'/sdk.js#xfbml=1&version=v3.2';
	} 
?>
var fired = false;
window.addEventListener("scroll", function(){
if ((document.documentElement.scrollTop != 0 && fired === false) || (document.body.scrollTop != 0 && fired === false)) {
	<?php
	// Load Google Adsense OnScroll
	// Improve Leverage browser caching in (PageSpeed Insights)
	if(mwp_option('adsense-on-scroll') == 1) : 
	?>
	(function(){var ad = document.createElement('script'); ad.type = 'text/javascript'; ad.async = true; ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
	<?php 
	endif; 
	// Load Social SDK
	// Facebook + Google Plus + Twitter + Disqus
	// Improve Leverage browser caching in (PageSpeed Insights)
	$get_shortname = mwp_option('disqus-shortname');
	if (!empty($get_shortname)) {
		$disqus_shortname = $get_shortname;
	} else {
		$disqus_shortname = 'localmaroc';
	}
	?>
	var disqus_shortname = '<?php echo sanitize_text_field($disqus_shortname); ?>';
	(function(d, s) {
		var js, fjs = d.getElementsByTagName(s)[0], frag = d.createDocumentFragment(), add = function(url, id) {
			if (d.getElementById(id)){return;}
			js = d.createElement(s);js.src = url;id && (js.id = id);frag.appendChild(js);
		};
		if(typeof window.__twttr == 'undefined'){
			if (document.querySelector('body .twitter-timeline') !== null || document.querySelector('body .twitter-tweet') !== null ||document.querySelector('body .twitter-follow-button') !== null) {
				add('https://platform.twitter.com/widgets.js');
			}
		}
		if(typeof window.FB == 'undefined'){
			if ( document.querySelector('body .fb-post') !== null || document.querySelector('body .fb-page') !== null || document.querySelector('body .fb-share-button') !== null || document.querySelector('body .fb-like') !== null || document.querySelector('body .fb-comments') !== null || document.querySelector('body .fb-video') !== null){
				add('<?php echo esc_url_raw($facebook_app_url); ?>', 'facebook-jssdk');
			}
		}
		if(typeof window.gapi == 'undefined'){
			if (document.querySelector('body .g-page') !== null || document.querySelector('body .g-follow') !== null || document.querySelector('body .g-ytsubscribe') !== null || document.querySelector('body .g-plusone') !== null) {
				add('https://apis.google.com/js/platform.js');
			}
		}
		if (document.querySelector('a[data-pin-do="buttonFollow"]') !== null) {
			add('http://assets.pinterest.com/js/pinit_main.js');
		}
		if (document.querySelector('body .instagram-media') !== null) {
			add('https://www.instagram.com/embed.js');
		}
		<?php if (mwp_option('single-comments-type') == 4 && is_singular()) : ?>
		if (document.querySelector('body #disqus_thread') !== null) {
			add('//' + disqus_shortname + '.disqus.com/embed.js');
		}
		<?php endif; ?>
		fjs.parentNode.insertBefore(frag, fjs);
	}(document, 'script'));
	
	fired = true;
  }
}, true)
</script>
<?php
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists