var tdHomepageFull={};
(function(b,f){tdHomepageFull={items:[],item:function(){this.blockUid="";this.$tmplBlock=f},addItem:function(a){if(!tdHomepageFull.items.length)switch(a.theme_name){case "Newsmag":tdHomepageFull._addNewsmagItem(a);break;default:tdHomepageFull._addItem(a)}},deleteItem:function(a){for(var c=0;c<tdHomepageFull.items.length;c++){var b=tdHomepageFull.items[c];if(b.blockUid===a)switch(b.theme_name){case "Newsmag":tdHomepageFull._deleteNewsmagItem(b,c);break;default:tdHomepageFull._deleteItem(b,c)}}return!1},
_addItem:function(a){a.$tmplBlock=b("#"+a.blockUid+"_tmpl");b(".td-header-wrap, .td-header-desktop-wrap").after(a.$tmplBlock.html());var c=b('<div class="backstretch"></div>'),d=b('<img class="td-backstretch not-parallax" src="'+a.postFeaturedImage+'"/>');c.append(d);b("body").prepend(c);var e=new tdBackstr.item;e.wrapper_image_jquery_obj=c;e.image_jquery_obj=d;tdBackstr.add_item(e);a.$article=b("#post-"+a.postId);a.$bgImageWrapper=c;a.backstrItem=e;tdHomepageFull.items.push(a)},_addNewsmagItem:function(a){a.$tmplBlock=
b("#"+a.blockUid+"_tmpl");b("body").addClass("single_template_6");b("#td-outer-wrap").prepend(a.$tmplBlock.html());var c=b('<div class="td-full-screen-header-image-wrap"></div>'),d=b('<div id="td-full-screen-header-image" class="td-image-gradient"></div>'),e=b('<img class="td-backstretch" src="'+a.postFeaturedImage+'"/>');c.append(d);d.append(e);b("#td-outer-wrap").prepend(c);a.$bgImageWrapper=c;d=new tdBackstr.item;d.wrapper_image_jquery_obj=c;d.image_jquery_obj=e;tdBackstr.add_item(d);a.$article=
b("#post-"+a.postId);a.backstrItem=d;b(".td-read-down a").on("click",function(a){a.preventDefault();tdUtil.scrollToPosition(b(".td-full-screen-header-image-wrap").height(),1200)});tdHomepageFull.items.push(a)},_deleteItem:function(a,b){a.$tmplBlock.remove();a.$article.remove();a.$bgImageWrapper.remove();tdHomepageFull.items.splice(b,1);tdBackstr.deleteItem(a.blockUid)&&(a.backstrItem=f);a=document.body.className;a=a.replace(/td-boxed-layout/g,"");a=a.replace(/single_template_8/g,"");a=a.replace(/homepage-post/g,
"");document.body.className=a},_deleteNewsmagItem:function(a,b){a.$tmplBlock.remove();a.$article.remove();a.$bgImageWrapper.remove();tdHomepageFull.items.splice(b,1);tdBackstr.deleteItem(a.blockUid)&&(a.backstrItem=f);a=document.body.className;a=a.replace(/single_template_6/g,"");document.body.className=a}}})(jQuery);
