Christmas within the Shul

‘;
newWin.doc.write(NewDocumentWrite);
// newWin.addEventListener(‘load’,perform(){
// });
newWin.print();
newWin.shut();
}

/*
* @perform for print article
*/

perform tn_print_fn(){

var tn_current_url=window.location.href;
if(check_comment == true){
window.open(tn_current_url+’?print=1&remark=1′,’_blank’);
}else{
window.open(tn_current_url+’?print=1′,’_blank’);
}
return false;
}

/*
* @perform sailthru motion tout
*/

perform add_action_tout_sailthru(post_id){

var ajaxurl=ajax_object.ajax_url;
var sailthru_email_take_action = doc.getElementById(‘take_action_sailthru_email_’+post_id).worth;
if(sailthru_email_take_action!=”){
var take_action_sailthru_list_final = doc.getElementById(‘take_action_sailthru_list_final_’+post_id).worth;
var action_tout_sailthru=’action_tout_sailthru’;
jQuery.ajax({
url :ajaxurl,
kind :”POST”,
information :”sailthru_email_take_action=”+sailthru_email_take_action+”&take_action_sailthru_list_final=”+take_action_sailthru_list_final+”&motion=”+action_tout_sailthru,
success : perform(information){
doc.getElementById(‘action_tout_response_’+post_id).innerHTML=information;
doc.getElementById(‘take_action_sailthru_email_’+post_id).worth=”;
}
});
}else{
var error_msg=’Please Enter E-mail‘;
doc.getElementById(‘action_tout_response_’+post_id).innerHTML=error_msg;
}
}

/*
* Test for logged in person
*/
perform getParaOneNextStep( articlePostId, step ){
if( typeof articlePostId !== typeof undefined && is_user_logged_in!=null && typeof paragraph_module!=typeof undefined && paragraph_module[articlePostId][step].user_logged_in==1 ){
step = parseInt(step)+1;
step = ( step > 5 )? 0 : step;
step = getParaOneNextStep( articlePostId, step );
}
return step;
}

/*
* @perform E-mail Signal Up Logic
*/
perform email_signup_module( articlePostId ){

/*
* Test For E-mail Signal Up Cookie
*/
if( typeof paragraph_module[articlePostId] !== typeof undefined ){

/* Cover All */
$(“.abody-“+articlePostId+” .email-signup-module”).conceal();
/* Cover All */

var TNstep = getCookie(‘TNstep’);
if( TNstep!=null ){

var step = getParaOneNextStep(articlePostId, TNstep);
$(“.abody-“+articlePostId+” .email-signup-module.para-one-“+paragraph_module[articlePostId][step].order+””).present();

/* present occasion monitoring */
paragraphOneShowEvent(articlePostId, step);
/* present occasion monitoring */
}else{
var TNlifetime = getCookie(‘TNlifetime’);
if( TNlifetime!=null ){
nextTNstep = parseInt(TNlifetime)+1;
nextTNstep = ( nextTNstep > 5 )? 0 : nextTNstep;

var step = getParaOneNextStep(articlePostId, nextTNstep);
var cookieDateTNstep = new Date();
cookieDateTNstep.setTime(cookieDateTNstep.getTime() + (30*24*60*60*1000));
doc.cookie = “TNstep=”+step+”;expires=”+cookieDateTNstep.toUTCString()+”;path=/”;

var cookieDateTNlifetime = new Date();
cookieDateTNlifetime.setTime(cookieDateTNlifetime.getTime() + (10*365*24*60*60*1000));
doc.cookie = “TNlifetime=”+step+”;expires=”+cookieDateTNlifetime.toUTCString()+”;path=/”;

$(“.abody-“+articlePostId+” .email-signup-module.para-one-“+paragraph_module[articlePostId][step].order+””).present();

/* present occasion monitoring */
paragraphOneShowEvent(articlePostId,step);
/* present occasion monitoring */
}else{
var step = getParaOneNextStep(articlePostId, 0);
var cookieDateTNstep = new Date();
cookieDateTNstep.setTime(cookieDateTNstep.getTime() + (30*24*60*60*1000));
doc.cookie = “TNstep=”+step+”;expires=”+cookieDateTNstep.toUTCString()+”;path=/”;

var cookieDateTNlifetime = new Date();
cookieDateTNlifetime.setTime(cookieDateTNlifetime.getTime() + (10*365*24*60*60*1000));
doc.cookie = “TNlifetime=”+step+”;expires=”+cookieDateTNlifetime.toUTCString()+”;path=/”;

$(“.abody-“+articlePostId+” .email-signup-module.para-one-“+paragraph_module[articlePostId][step].order+””).present();

/* present occasion monitoring */
paragraphOneShowEvent(articlePostId, step);
/* present occasion monitoring */
}
}
}
}

/*
* Occasion Monitoring Capabilities
*/

/* Paragraph One Present Occasion Set off */
perform paragraphOneShowEvent( articlePostId, step ){

if( typeof articlePostId !== typeof undefined && typeof step !== typeof undefined && (typeof paragraph_module[articlePostId] !== typeof undefined) && (paragraph_module[articlePostId][step].event_name!=””) ){
/*
* Observe Views paragraph one module GTM
*/
dataLayer.push({
‘occasion’: ‘gaParagraphOneShowEvent’,
‘gaEventCategory’: ”+ paragraph_module[articlePostId][step].event_name +”,
‘gaEventAction’: ”+ paragraph_module[articlePostId][step].event_name +’-show’,
‘gaEventLabel’: doc.URL,
});
}
}

/* Paragraph One Click on Occasion Set off */
perform paragraphOneClickEvent( articlePostId, step ){

if( typeof articlePostId !== typeof undefined && typeof step !== typeof undefined && (typeof paragraph_module[articlePostId] !== typeof undefined) && (paragraph_module[articlePostId][step].event_name!=””) ){
dataLayer.push({
‘occasion’: ‘gaParagraphOneEvent’,
‘gaEventCategory’: ”+ paragraph_module[articlePostId][step].event_name +”,
‘gaEventAction’: ”+ paragraph_module[articlePostId][step].event_name +’-click’,
‘gaEventLabel’: doc.URL,
});
}
}

/*
* Occasion Monitoring Capabilities
*/

/* Associated Single Article */
perform relatedSingleArticle( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.related-oneup”).size > 0 ){

var depend = jQuery(“.postid-“+articlePostId+” apart.related-oneup”).size;
for( i=0; i 0 ){

var depend = jQuery(“.postid-“+articlePostId+” apart.related-multi”).size;
for( i=0; i 0 ){
/*
* Observe Views Present Concern Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaCurrentIssueModuleShowEvent’,
‘gaEventCategory’: ‘current-issue-module’,
‘gaEventAction’: ‘current-issue-module-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Inline CTA 1 Views */
perform inlineCtaOne( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.inline-cta-1″).size > 0 ){
/*
* Observe Views Present Concern Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaInlineCtaOneShowEvent’,
‘gaEventCategory’: ‘inline-cta-1’,
‘gaEventAction’: ‘inline-cta-1-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Inline CTA 2 Views */
perform inlineCtaTwo( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.inline-cta-2″).size > 0 ){
/*
* Observe Views Present Concern Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaInlineCtaTwoShowEvent’,
‘gaEventCategory’: ‘inline-cta-2’,
‘gaEventAction’: ‘inline-cta-2-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}
perform inlineCtaSignup( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.inline-cta_form”).size > 0 ){
/*
* Observe Views Present Concern Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaInlineCtaSignupShowEvent’,
‘gaEventCategory’: ‘inline-cta-signup’,
‘gaEventAction’: ‘inline-cta-signup-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}
/* Writer Spotlight Views */
perform authorHighlight( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.author-modules”).size > 0 ){
/*
* Observe Views Writer Spotlight GTM
*/
dataLayer.push({
‘occasion’: ‘gaAuthorHighlightShowEvent’,
‘gaEventCategory’: ‘author-Spotlight’,
‘gaEventAction’: ‘author-Spotlight-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Sequence Module Views */
perform seriesModule( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.series-modules”).size > 0 ){
/*
* Observe Views Sequence Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaSeriesModuleShowEvent’,
‘gaEventCategory’: ‘series-module’,
‘gaEventAction’: ‘series-module-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Remark Module Views */
perform commentModule( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.comment-module”).size > 0 ){
/*
* Observe Views Remark Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaCommentsModuleShowEvent’,
‘gaEventCategory’: ‘comments-module’,
‘gaEventAction’: ‘comments-module-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Books Salad Views */
perform booksSalad( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.book-module”).size > 0 ){
/*
* Observe Views Books Salad GTM
*/
dataLayer.push({
‘occasion’: ‘gaBooksSaladShowEvent’,
‘gaEventCategory’: ‘books-salad’,
‘gaEventAction’: ‘books-salad-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Motion Tout Module Views */
perform actionToutModule( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.takeaction”).size > 0 ){
/*
* Observe Views Motion Tout Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaActionToutModuleShowEvent’,
‘gaEventCategory’: ‘action-tout-module’,
‘gaEventAction’: ‘action-tout-module-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Sidebar Group Module Views */
perform sidebarCommunityModule( articlePostId ){

if( jQuery(“.postid-“+articlePostId+” .expand-reduce”).size ==0 || jQuery(“.postid-“+articlePostId+” .expand-close”).size !=0 ){

if( jQuery(“.postid-“+articlePostId+” apart.n-community”).size > 0 ){
/*
* Observe Views Sidebar Group Module GTM
*/
dataLayer.push({
‘occasion’: ‘gaSidebarShowEvent’,
‘gaEventCategory’: ‘sidebar-community’,
‘gaEventAction’: ‘sidebar-community-show’,
‘gaEventLabel’: doc.URL,
});
}
}
}

/* Taxnonomy and Writer GA Occasion on single article web page */
perform gaTaxonomyAuthor( gaEventCategory, gaEventAction, gaEventLabel ){
dataLayer.push({
“occasion”: “gaglobaltaxonomyauthor”,
“gaEventCategory”: gaEventCategory,
“gaEventAction”: gaEventAction,
“gaEventLabel”: gaEventLabel
});
}

jQuery( doc ).prepared(perform($) {

/*============== Variables ==================*/

var preventLoad_article = false;
var flag = false;
var $e = $(‘.article-body’).youngsters().final();
var $t = $e.prop(“tagName”);
var tagsArray = [‘FORM’,’ASIDE’];
var anothertagsArray = {‘UL’:’li’,’OL’:’li’,’BLOCKQUOTE’:’p’};
var url_id = window.location.hash.substr(1);
var pageChange = 1;
var articlePostId = 433375;
var depend = 1;
var article_divider = 1;
var loagAgn = false;
var scroll_art_recric = true;
var checklist;

/*============== Variables ==================*/

/* Taxnonomy and Writer GA Occasion on single article web page */
var allSubject = $(‘.postid-‘+articlePostId+’ enter[name=”tpTags”]’).val();
var allAuthor = $(‘.postid-‘+articlePostId+’ enter[name=”tpContentAuthor”]’).val();
var first_article_title = $(‘.postid-‘+articlePostId).attr(‘articlelisttitle’);
var first_article_path = $(‘.postid-‘+articlePostId).attr(‘articlelistlinks’);

var allSubject = allSubject.cut up(‘,’);
$.every( allSubject, perform( i, allsubval ) {
gaTaxonomyAuthor( allsubval, first_article_title, first_article_path );
});

var allAuthor = allAuthor.cut up(‘,’);
$.every( allAuthor, perform( i, allautval ) {
gaTaxonomyAuthor( allautval, first_article_title, first_article_path );
});

/*
* Physique content material picture in gallery
*/

$(‘part.article-body img’).every(perform() {
if($(this).mother or father(“a”).mother or father(“determine”).hasClass(‘bx-item’)){
flag = true;
}else{
var href_val = $(this).mother or father(“a”).attr(‘href’);
var img_src = $(this).attr(‘src’);

if( href_val === img_src && !$(this).mother and father().hasClass(“email-signup-module”) ){
$(this).mother or father(“a”).addClass(“gallery”);
}else{
if( !$(this).mother or father(“a”).hasClass(“no-target-blank”) ){
$(this).mother or father(“a”).attr(‘goal’,’_blank’);
}
}
}
});

/*
* Run picture slider
*/

if(flag){
runSlider(jQuery(‘.gallery-2′));
}

/*
* E-mail Signal Up
*/
if(!flag){
email_signup_module( 433375 );
}

/*
* Article N emblem
*/
articleNLogo( 433375 );

/*
* Associated Single Article Observe
*/
relatedSingleArticle( 433375 );

/*
* Associated A number of Article Observe
*/
relatedMultiArticle( 433375 );

/*
* Present Concern Module Observe
*/
currentIssueModule( 433375 );

/*
* Inline CTA One Observe
*/
inlineCtaOne( 433375 );

/*
* Inline CTA Two Observe
*/
inlineCtaTwo( 433375 );

/*
* Inline CTA Signup Observe
*/
inlineCtaSignup( 433375 );
/*
* Writer Spotlight Observe
*/
authorHighlight( 433375 );

/*
* Sequence Module Observe
*/
seriesModule( 433375 );

/*
* Remark Module Observe
*/
commentModule( 433375 );

/*
* Books Salad Observe
*/
booksSalad( 433375 );

/*
* Motion Tout Module Observe
*/
actionToutModule( 433375 );

/*
* Sidebar Group Module Observe
*/
sidebarCommunityModule( 433375 );

/*
* @perform for print article
*/

/*
* Test for video
*/

/*
* Purple dot after article content material
*/

if(jQuery.inArray($t, tagsArray )!=’-1′){
}else{
if($t in anothertagsArray){
$(‘.article-body > p:last-of-type’).toggleClass(‘modified’);
$e.discover(anothertagsArray[$t]+’:final’).addClass(‘redotclass’);
}
}

/*
* this wrapped in jQuery will give us the present .letter-q div
*/

$(‘determine’).every(perform(){
if( $(this).hasClass(‘alignright’)||$(this).hasClass(‘alignleft’) || $(this).hasClass(‘aligncenter’) ){
$(this).after(‘

‘);
}
});

/*
* Scroll IF # id exist in URL
*/
if(url_id!=”){
var s = url_id;
var n = s.indexOf(‘/’);
if(n!=”&& typeof n!= ‘undefined’){
var id_var = s.substring(0, n != -1 ? n : s.size);
$(‘html, physique’).animate({
scrollTop: $(‘#’+id_var).offset().high
},2000);
return false;
}
}

/*
* Test for audio
*/

/*
* script to deal with Again Button Occasion
*/

if(window.attachEvent){
window.attachEvent(‘onpopstate’, datHash);
}

perform datHash(occasion){
var str = $(‘#goback’).val();
if(str==”){
window.historical past.go(-Math.abs(pageChange));
}else{
window.historical past.go(-Math.abs(pageChange));
}
return false;
}

/*
*
*/
$(‘.post-edit-link’).attr(‘href’, perform( _, motion){
return motion.exchange(‘https’, ‘http’);
});

/*
* @perform for load article in infinite scroll
*/

$(‘a.inifiniteLoader’).conceal();

perform loadArticle(pageNumber){

$(‘a.inifiniteLoader’).present(‘quick’);

$.ajax({

url : “https://www.thenation.com/wp-admin/admin-ajax.php”,
kind : ‘POST’,
cache : false,
dataType : ‘json’,
information : {motion:’infinite_scroll’,page_no: pageNumber,loop_file: ‘articleload’,slug:’political-figures,politics,society’,curr_post_id:’433375′},
success : perform(receivedHTML){

if ( typeof receivedHTML == ‘object’ && receivedHTML!=null ){
if(typeof receivedHTML.html!==’undefined’ && receivedHTML.html!=”){
html = receivedHTML.html;
}
}else{
$(‘a.inifiniteLoader’).conceal();
$(“#single_article_footer”).present();
}

$(‘a.inifiniteLoader’).conceal(‘1000’);

if ( typeof receivedHTML == ‘object’ && receivedHTML!=null ){

$(“#wrap”).append(html); // This would be the div the place our content material might be loaded

var postID = $($.parseHTML(html)).filter(“.scrolltrace”).attr(‘article-post-id’);
var postLink = $($.parseHTML(html)).filter(“.scrolltrace”).attr(‘articlelistlinks’);
var postTitle = $($.parseHTML(html)).filter(“.scrolltrace”).attr(‘articlelisttitle’);

$(‘.abody-‘+postID+’ .article-body-inner’).youngsters(‘p:first-of-type’).html(perform (i, html) {
if ( $(‘.abody-‘+postID).youngsters(‘img’).size == “0” ){
var textual content = $(‘.abody-‘+postID+’ .article-body-inner’).youngsters(‘p:first-of-type’).html();
$(‘.abody-‘+postID+’ .article-body-inner’).youngsters(‘p:first-of-type’).html(textual content.exchange(/^(<.>)?([A-Za-z0-9])/g,’$1$2‘));
}
});

if( !$(‘.abody-‘ + postID +”).mother or father().mother or father().hasClass(‘textContainer_Truncate’) ){
$(‘

‘).insertAfter(‘.abody-‘ + postID);
}

if($(‘.abody-‘+postID).mother or father().mother or father()){
$(‘.abody-‘+postID).mother or father().mother or father().attr(“aria-posinset”, pageNumber);
$(‘.abody-‘+postID).mother or father().mother or father().attr(“aria-setsize”, “-1″);
}

/*
* Article Divider Rely
*/
article_divider = article_divider+1;
$(‘.abody-‘+postID+”).attr(“article-number”,article_divider);

/*for hiding meterpaywall popups when pixel advertisements name begins right here*/
var hidePixelBool = false;
var meetkatstep1 = jQuery(‘#paywall .step.one’);
var meetkatstep2 = jQuery(‘#paywall .step.two’);
var meetkatstep3 = jQuery(‘#paywall .step.three’);
var meetkatstep4 = jQuery(‘#paywall .step.4′);
if( typeof meetkatstep1!=’undefined’ && meetkatstep1.is(‘:seen’) ){
hidePixelBool = true;
}
if ( typeof meetkatstep2!=’undefined’ && meetkatstep2.is(‘:seen’) ){
hidePixelBool = true;
}
if( typeof meetkatstep3!=’undefined’ && meetkatstep3.is(‘:seen’) ){
hidePixelBool = true;
}
if( typeof meetkatstep4!=’undefined’ && meetkatstep4.is(‘:seen’) ){
hidePixelBool = true;
}
if( hidePixelBool===false ){
/*for hiding meterpaywall popups when pixel advertisements name ends right here*/
/****Alternate Popup code begin*********/
var enable_alterpopup_check;
enable_alterpopup_check =”;
if( typeof(enable_alterpopup_check) != “undefined” && enable_alterpopup_check == 1 ){
var alternate_article_no;
alternate_article_no = ”;
if( pageCounterPaywall % alternate_article_no == 0 && pageCounterPaywall!=0 ){
show_lightbox(”,”);
}
}
/******Alternate Popup code Finish********/
}

pageCounterPaywall++;
ajaxCarousel(postID);
ajaxGallery(postID);
articleNLogo(postID);

/** Slider Content material **/
flag = false;
$(‘part.article-body:final img’).every(perform(){
if($(this).mother or father(“a”).mother or father(“determine”).hasClass(‘bx-item’)){
flag = true;
}else{
$(this).mother or father(“a”).addClass(“gallery”);
}
});

if(flag){
var ok = $(‘part.article-body:final’).discover(‘.gallery-2’).bxSlider({
adaptiveHeight: true,
adaptiveHeightSpeed: 500,
infiniteLoop: false,
hideControlOnEnd: false,
pager: false
});
ok.reloadSlider();
}
/* Slider Content material Finish */

var usera = navigator.userAgent.toLowerCase();
if ( $(‘.article-page’).size ) {
var slickWidth = $(‘.article-list.slick-slide’).width();

if ($(‘.ie9’).size){
slickWidth = $(‘.recirc-carousel.slick-initialized.slick-slider’).width();
}
$(‘.slick-list.draggable’).css({‘width’ : slickWidth});
if( !/android|webos|iphone|ipad|ipod|blackberry/i.take a look at(usera) ){
$(‘.article-list.slick-slide’).youngsters(‘li’).css({‘width’ : slickWidth});
$(‘.slick-list’).css({‘width’ : slickWidth});
}
}

var $newArticles = $(html);
var imagesLoading = [];

$newArticles.discover(‘img’).every(perform() {

// For every picture, create a brand new deferred object that resolves when the
// picture has loaded and add that to an array of deferred objects.

var loadingImage = $.Deferred();
imagesLoading.push(loadingImage);

// “this” is the picture ingredient right here and may have an entire property.
// See http://stackoverflow.com/a/24201249

if (this.full){
loadingImage.resolve();
}else{
var adTimeout = window.setTimeout(perform() {
loadingImage.resolve();
}, 3000);

this.addEventListener(‘load’, perform() {
loadingImage.resolve();
window.clearTimeout(adTimeout);
});

this.addEventListener(‘error’, perform() {
// We actually do not care if the picture by no means hundreds, however we nonetheless want
// to resolve the promise in order that we are able to reset the waypoints.
loadingImage.resolve();
window.clearTimeout(adTimeout);
});

// Clear up occasion listeners
this.removeEventListener(‘load’, perform() {
loadingImage.resolve();
window.clearTimeout(adTimeout);
});
this.removeEventListener(‘error’, perform() {
loadingImage.resolve();
window.clearTimeout(adTimeout);
});
}
});
$.when.apply(this, imagesLoading).then(perform() {
fixedAds($(‘.postid-‘ + postID).youngsters(‘article’));
}, perform() {

});
/**Inifnite Scroll Share This */
var newSharePostID = window.__sharethis__.config[‘inline-share-buttons’];
newSharePostID.id=”inline-share-button-“+postID;
newSharePostID.url= postLink;
newSharePostID.title= postTitle;
var shareLoadPromise = new Promise(perform(resolutionFunc,rejectionFunc){resolutionFunc()});
shareLoadPromise.then(perform(){
window.__sharethis__.load(‘inline-share-buttons’, newSharePostID);
})
.then(perform(){
$(“#inline-share-button-“+postID+” > .st-last “).removeClass(“st-last”);
$(“#inline-share-button-“+postID).append(”);
});

if (getCookie(‘SESSuserinfo’) != false) {
var tn_sfg_local = localStorage.getItem(“tn_sfg_local”);
if (null != tn_sfg_local && undefined != tn_sfg_local && ” != tn_sfg_local) {
tn_sfg_local = JSON.parse(tn_sfg_local);
if (tn_sfg_local.consists of(parseInt(postID))) {
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).addClass(‘chosen’);
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).removeClass(‘conceal’);
}else {
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).removeClass(‘conceal’);
}
} else {
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).removeClass(‘conceal’);
}
}

}
}
});
return false;
}

/*
* Load second article on scroll
*/

$(window).bind(‘scroll’, perform(){

$(‘.scrolltrace’).every(perform(){

var submit = $(this);
var topp = submit.place().high;
var bott = submit.place().high + submit.top();
var pos = $(window).scrollTop();

if ( pos>=topp && pos 0){

}else{
window.historical past.pushState({}, “”, $(‘.currentScr’).attr(‘articlelistlinks’));

articlePostId = $(‘.currentScr’).attr(“article-post-id”);

/*New non subscriber For Infinite Scroll*/
if (null != is_user_logged_in) {
var tn_sfg_local = localStorage.getItem(“tn_sfg_local”);
if (null != tn_sfg_local && undefined != tn_sfg_local && ” != tn_sfg_local) {
tn_sfg_local = JSON.parse(tn_sfg_local);
if (tn_sfg_local.consists of(parseInt(articlePostId))) {
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).addClass(‘chosen’);
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).removeClass(‘conceal’);
}else {
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).removeClass(‘conceal’);
}
} else {
$(‘.currentScr’).discover(‘.tn-sfg-add-to-list’).removeClass(‘conceal’);
}
}
/*New non subscriber For Infinite Scroll*/

var allSubject = $(‘.postid-‘+articlePostId+’.currentScr enter[name=”tpTags”]’).val();
var allAuthor = $(‘.postid-‘+articlePostId+’.currentScr enter[name=”tpContentAuthor”]’).val();

var username = getCookie(‘SESSname’);
if(username != null){
_cbq.push([‘_acct’, ‘paid’]);
}else{
_cbq.push([‘_acct’, ‘anon’]);
}

pSUPERFLY.virtualPage({
sections: allSubject,
authors : allAuthor,
path : window.location.pathname,
title : $(‘.currentScr’).attr(‘articlelisttitle’)
});
}

/* Taxonomy and Writer Set off in GA Occasion Begin */
var allSubject = allSubject.cut up(‘,’);
$.every( allSubject, perform( i, allsubval ) {
gaTaxonomyAuthor( allsubval, $(‘.currentScr’).attr(‘articlelisttitle’), $(‘.currentScr’).attr(‘articlelistlinks’) );
});

var allAuthor = allAuthor.cut up(‘,’);
$.every( allAuthor, perform( i, allautval ) {
gaTaxonomyAuthor( allautval, $(‘.currentScr’).attr(‘articlelisttitle’), $(‘.currentScr’).attr(‘articlelistlinks’) );
});
/* Taxonomy and Writer Set off in GA Occasion Finish */

/*
* Name E-mail Signup for infinite scroll
*/
if( !$(‘.postid-‘+articlePostId+’ .article-body img’).mother or father(“a”).mother or father(“determine”).hasClass(‘bx-item’) ){

if( !$(“.abody-“+articlePostId+””).hasClass(“email-signup-visited”) ){
email_signup_module( articlePostId );
}
}

/* Content material Web page View Occasion */
dataLayer.push({
‘occasion’: ‘gaPageViewEvent’,
‘gaEventCategory’: ‘article’,
‘gaEventAction’: $(‘.currentScr’).attr(‘articlelisttitle’),
‘gaEventLabel’: articlePostId,
});
/* Content material Web page View Occasion */

/*
* Article Divider Scrolled Over Whole Rely
*/
dataLayer.push({
‘occasion’: ‘gaRecirculationEvent’,
‘gaEventCategory’: ‘recirculation’,
‘gaEventAction’: ‘article-divider-scrolled-over’,
‘gaEventLabel’: $(‘.currentScr’).attr(‘articlelistlinks’),
});

/*
* Article Divider Scrolled Over Particular person Rely
*/
article_number = $(‘.abody-‘+articlePostId+”).attr(“article-number”);
if (typeof article_number !== typeof undefined && article_number !== false) {
dataLayer.push({
‘occasion’: ‘gaRecirculationEvent’,
‘gaEventCategory’: ‘recirculation’,
‘gaEventAction’: ‘article-divider-scrolled-over-‘+article_number+”,
‘gaEventLabel’: $(‘.currentScr’).attr(‘articlelistlinks’),
});
}

// Google Analytics for Infinite Scroll
/*ga(‘ship’, ‘pageview’, {
‘web page’: $(‘.currentScr’).attr(‘articlelistlinks’),
‘title’: $(‘.currentScr’).attr(‘articlelisttitle’)
});*/

ga(‘set’, ‘dimension1’, $(‘.currentScr’).discover(‘.tn_publish_date’).textual content());
ga(‘ship’, ‘pageview’, {
‘web page’: window.location.pathname,
‘title’: $(‘.currentScr’).attr(‘articlelisttitle’)
});

dataLayer.push({
‘occasion’:’InfiniteScrollPageView’,
‘virtualPageURL’: window.location.pathname,
‘virtualPageTitle’ : $(‘.currentScr’).attr(‘articlelisttitle’)
});

$(“nav.major ul li.article-meta h2”).html($(‘.currentScr’).attr(‘articlelisttitle’).substring(0,100));
$(“title”).html($(‘.currentScr’).attr(‘articlelisttitle’));

var linktext = $(‘.currentScr’).discover(“.anchor_subject”).html();
if ( linktext!=” ){

var linkredirectval =$(‘.currentScr’).discover(“.anchor_subject”).attr(‘subjectlink’);

if(typeof linkredirectval!=’undefined’){
var subject_head_link = ““+linktext+”“;
$(‘.tophead_subject’).html(subject_head_link);
}else{
var subject_head_link = “”;
$(‘.tophead_subject’).html(subject_head_link);
}

}

pageChange = parseInt(pageChange) + 1;
}

}else{
$(this).removeClass(‘currentScr’);
}
});

$current_article = $(‘.scrolltrace.currentScr’);
// Load subsequent leaderboard advert on attain to backside motion tout
if($current_article.hasClass(‘currentScr’)){

articlePostId = $(‘.currentScr’).attr(“article-post-id”);

var windowTop = $(window).scrollTop();

if( $current_article.discover(‘.expand-reduce’).size != 0 ){

if( !$(‘#expand-reduce-‘+articlePostId+”).hasClass(‘expand-close’) && !$(‘#expand-reduce-‘+articlePostId+”).hasClass(‘tn-first-expand’)){

if( $(‘.abody-‘+articlePostId+”).hasClass(‘keep-reading’) ){

/* Overflow Hidden Father or mother Div */
$(‘.abody-‘+articlePostId+”).mother or father().addClass(“keep-reading-parent”);

/* Cover Article Footer */
$(‘#article-footer-‘+articlePostId+”).conceal();

/* Cover Rev Content material Block */
$(‘#tabola-block-‘+articlePostId+”).conceal();

/* Cover apart wrap modules */
$(‘.scrolltrace.currentScr .aside-wrap .ad-wrap’).not(‘:eq(0)’).conceal();

/* Present develop Cut back */
$(‘#expand-reduce-‘+articlePostId+”).present();
}else{

// Execute when the web page loaded
eval(“pushDataPianoOnInfinite_”+articlePostId+”()”);
tp.expertise.execute();

}
}
}
}

var loadPoint = $(‘.article-body:final’).offset().high – 68;

if (loadPoint!=false && $(window).scrollTop() >= loadPoint){
if( $(‘.scrolltrace’).size==depend ){

loagAgn = true;

if(loagAgn){
depend++;

if(depend
eval(“pushDataPianoOnInfinite_”+$article_id+”()”);
// Execute when the web page loaded
tp.expertise.execute();

/*
* Associated Single Article Observe
*/
relatedSingleArticle( $article_id );

/*
* Associated A number of Article Observe
*/
relatedMultiArticle( $article_id );

/*
* Present Concern Module Observe
*/
currentIssueModule( $article_id );

/*
* Inline CTA One Observe
*/
inlineCtaOne( $article_id );

/*
* Inline CTA Two Observe
*/
inlineCtaTwo( $article_id );

/*
* Inline CTA Two Observe
*/
inlineCtaSignup( $article_id );

/*
* Writer Spotlight Observe
*/
authorHighlight( $article_id );

/*
* Sequence Module Observe
*/
seriesModule( $article_id );

/*
* Remark Module Observe
*/
commentModule( $article_id );

/*
* Books Salad Observe
*/
booksSalad( $article_id );

/*
* Motion Tout Module Observe
*/
actionToutModule( $article_id );

/*
* Sidebar Group Module Observe
*/
sidebarCommunityModule( $article_id );
}, 2000);
tp.push([“setCustomVariable”, “book_and_arts_article”, “false”]);

$(‘.abody-‘+$article_id+”).removeClass(‘keep-reading’);

$(‘.abody-‘+$article_id+”).removeClass(‘no-reading’);

/* Overflow Seen Father or mother */
$(‘.abody-‘+$article_id+”).mother or father().removeClass(“keep-reading-parent”);

/* Present Article Footer */
$(‘#article-footer-‘+$article_id+”).present();

/* Present Rev Content material Block */
$(‘#tabola-block-‘+$article_id+”).present();

/* Present apart wrap modules */
$(‘.postid-‘+$article_id+’ .aside-wrap .ad-wrap’).not(‘:eq(0)’).present();

/* Cover develop Cut back */
$(‘#expand-reduce-‘+$article_id+”).conceal();
if (sharethis_infinite.consists of($article_id) === false && 0 a’,perform(){
/*
* Click on Occasion
*/
dataLayer.push({
‘occasion’: ‘gaAuthorHighlight’,
‘gaEventCategory’: ‘author-Spotlight’,
‘gaEventAction’: ‘author-Spotlight-click’,
‘gaEventLabel’: $(this).attr(‘href’),
});
});

/*
* Click on Occasion Monitoring for Sequence Module
*/

$(doc).on(‘click on’, ‘.series-modules .series-modules-blocks .series-blocks > a’,perform(){
/*
* Click on Occasion
*/
dataLayer.push({
‘occasion’: ‘gaSeriesModule’,
‘gaEventCategory’: ‘series-module’,
‘gaEventAction’: ‘series-module-click’,
‘gaEventLabel’: $(this).attr(‘href’),
});
});

/*
* Click on Occasion Monitoring for Remark Module
*/

$(doc).on(‘click on’, ‘.comment-module .comment-blocks .cta enter’,perform(){
/*
* Click on Occasion
*/
dataLayer.push({
‘occasion’: ‘gaCommentsModule’,
‘gaEventCategory’: ‘comments-module’,
‘gaEventAction’: ‘comments-module-click’,
‘gaEventLabel’: $(this).val(),
});
});

/*
* Click on Occasion Monitoring for Books Salad
*/

$(doc).on(‘click on’, ‘.book-module .newrelated-blocks a’,perform(){
/*
* Click on Occasion
*/
dataLayer.push({
‘occasion’: ‘gaBooksSalad’,
‘gaEventCategory’: ‘books-salad’,
‘gaEventAction’: ‘books-salad-click’,
‘gaEventLabel’: $(this).mother or father().mother or father().discover(‘h5’).textual content(),
});

});

/*
* Click on Occasion Monitoring for Motion Tout Module
*/

$(doc).on(‘click on’, ‘apart.takeaction .cta enter’,perform(){
/*
* Click on Occasion
*/
dataLayer.push({
‘occasion’: ‘gaActionToutModule’,
‘gaEventCategory’: ‘action-tout-module’,
‘gaEventAction’: ‘action-tout-module-click’,
‘gaEventLabel’: doc.URL,
});
});

/*
* Click on Occasion Monitoring for Maintain Studying 2/3/4/5
*/

$(doc).on(‘click on’, ‘.expand-reduce a’,perform(){

var article_number = $(this).mother and father(‘.scrolltrace’).discover(‘.article-body’).attr(‘article-number’);

if (typeof article_number !== typeof undefined && article_number !== false) {
/*
* Click on Occasion
*/
dataLayer.push({
‘occasion’: ‘gaKeepReading’,
‘gaEventCategory’: ‘keep-reading’,
‘gaEventAction’: ‘keep-reading-‘+article_number+’-click’,
‘gaEventLabel’: doc.URL,
});
}
});

/*
* Article E-mail Signal Up
*/

$(doc).on(‘click on’,’.para_one_button_email’,perform(){
/*
* Observe Click on On Signal Up Button GTM
*/
var current_email_signup = $(this).mother and father(“.email-signup-module”);
var current_step = current_email_signup.attr(“data-section”);
var article_id = $(this).mother and father(“#url-title”).mother or father().attr(“article-post-id”);
paragraphOneClickEvent(article_id, current_step);

var electronic mail = current_email_signup.discover(“#para-one-email-input-“+current_step+””).val();
var sailthru_list = current_email_signup.discover(“#para-one-sailthru-list-“+current_step+””).val();
var current_parent = $(this).mother or father();

if( electronic mail!=” && typeof electronic mail!==typeof undefined){
jQuery.ajax({
url :ajax_object.ajax_url,
kind :”POST”,
information :”sailthru_email_take_action=”+electronic mail+”&take_action_sailthru_list_final=”+sailthru_list+”&motion=action_tout_sailthru”,
success : perform(information){
if( information.indexOf(‘errormsg’) > 0 ){
current_parent.discover(‘.footer_email_error’).html(information);
}else{
/*
* Observe Profitable Signal Up GTM
*/

if( typeof article_id !== typeof undefined && typeof current_step !== typeof undefined && (typeof paragraph_module !== typeof undefined) && (paragraph_module[article_id][current_step].event_name!=””) ){
dataLayer.push({
‘occasion’: ‘gaParagraphOneEvent’,
‘gaEventCategory’: ”+ paragraph_module[article_id][current_step].event_name +”,
‘gaEventAction’: ”+ paragraph_module[article_id][current_step].event_name +’-list’,
‘gaEventLabel’: electronic mail,
});
}

var nextTNstep = parseInt(current_step)+1;
nextTNstep = ( nextTNstep > 5 )? 0 : nextTNstep;
var step = getParaOneNextStep(article_id, nextTNstep);

var cookieDateTNstep = new Date();
cookieDateTNstep.setTime(cookieDateTNstep.getTime() + (30*24*60*60*1000));
doc.cookie = “TNstep=”+step+”;expires=”+cookieDateTNstep.toUTCString()+”;path=/”;

var cookieDateTNlifetime = new Date();
cookieDateTNlifetime.setTime(cookieDateTNlifetime.getTime() + (10*365*24*60*60*1000));
doc.cookie = “TNlifetime=”+step+”;expires=”+cookieDateTNlifetime.toUTCString()+”;path=/”;

$(“.abody-“+article_id+” .email-signup-module”).conceal();
current_email_signup.subsequent(“#para-one-thankyou-“+article_id+””).present();
}
}
});
}else{
current_parent.discover(‘.footer_email_error’).html(‘Please Enter E-mail’);
}
});

/*
* Paragraph one different module
*/

$(doc).on(‘click on’,’.para_one_button’,perform(){
/*
* Observe Click on On Signal Up Button GTM
*/
var current_step = $(this).mother and father(“.email-signup-module”).attr(“data-section”);
var article_id = $(this).mother and father(“#url-title”).mother or father().attr(“article-post-id”);
var nextTNstep = parseInt(current_step)+1;

nextTNstep = ( nextTNstep > 5 )? 0 : nextTNstep;
var step = getParaOneNextStep(article_id, nextTNstep);

var cookieDateTNstep = new Date();
cookieDateTNstep.setTime(cookieDateTNstep.getTime() + (30*24*60*60*1000));
doc.cookie = “TNstep=”+step+”;expires=”+cookieDateTNstep.toUTCString()+”;path=/”;

var cookieDateTNlifetime = new Date();
cookieDateTNlifetime.setTime(cookieDateTNlifetime.getTime() + (10*365*24*60*60*1000));
doc.cookie = “TNlifetime=”+step+”;expires=”+cookieDateTNlifetime.toUTCString()+”;path=/”;

paragraphOneClickEvent(article_id, current_step);
});

$(doc).on(‘click on’,’.inline_cta_signup’,perform(){

var current_email_signup = $(this).mother and father(“.inline-cta-form-module”);
var article_id = $(this).mother and father(“#url-title”).mother or father().attr(“article-post-id”);
$(“.inline_cta__form_error_”+article_id).html(“”);
$(“.inline_cta__form_toperror_”+article_id).html(“”);
var electronic mail = $(“#inline_cta__email_”+article_id).val();
var sailthru_list = $(“#inline_cta__sail_list_”+article_id).val();
var current_parent = $(this).mother or father();

if( electronic mail!=” && typeof electronic mail!==typeof undefined){
if(!isValidEmailAddress(electronic mail)){
$(“.inline_cta__form_error_”+article_id).html(”);
}
else{
jQuery.ajax({
url :ajax_object.ajax_url,
kind :”POST”,
information :”article_id=”+article_id+”&electronic mail=”+electronic mail+”&checklist=”+sailthru_list+”&motion=inlinecta-signup”,
success : perform(information){
if( information.indexOf(‘errormsg’) > 0 ){
$(“.inline_cta__form_error_”+article_id).html(information);
}else{
$(“.inline_cta__signup_module_”+article_id).conceal();
if (information.indexOf(‘verify_email’) > 0) {
$(“#inline_cta__form_thanks”+article_id).html(information);
}
$(“#inline_cta__form_thanks”+article_id).present();
}
}
});
}
}else{
$(“.inline_cta__form_error_”+article_id).html(”);
}
});

});
perform isJSON(string){
attempt {
JSON.parse(string);
} catch (e) {
return false;
}
return true;
}

Read More

Vinkmag ad

Read Previous

10 Issues You Didn’t About Tremendous Footballer Pele

Read Next

Africa: No Winner of Day by day Belief African of the 12 months Award 2022.  

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular