How To Whiten Your Teeth Naturally At Home

Spread the love


How to whiten your teeth at home

Believe it or not, the history of the dazzling Hollywood smile didn’t start in Tinseltown—the American dentist Dr Irwin Smigel, who gave Elizabeth Taylor her pearly whites, may have been a pioneer of teeth-whitening and cosmetic veneers in the 1970s, but the practice of teeth-whitening dates back some 4,000 years to the time of Cleopatra when well-to-do Egyptians, keen to show off their wealth and status (no change there then) used a paste of ground pumice stone and wine vinegar on their teeth to brighten them up. The Romans were equally obsessed, though less appealingly they used the natural bleaching agent ammonia found in urine to whiten their teeth. They were willing to go to such lengths because they knew as well as we do that, as Dr Smigel put it in an interview in New York magazine in 1981, “The eyes may be the soul of the face, but the mouth is the first thing people look at.”

These days, there’s a whole industry around the pursuit of perfectly white teeth with most people’s bathroom cabinets containing some kind of DIY, teeth-whitening product, whether it be a charcoal-activated powder, prescriptive paint-on products, dentist-designed toothpastes or coconut oil.

But do they work? Can you really get a set of pearly whites sitting on your sofa at home? We investigate.

Do natural teeth-whitening products work?

Back in the 14th century, the French surgeon Guy de Chauliac’s recipe for white teeth was “a mixture of honey and burnt salt to which some vinegar has been added”. Today, natural teeth-whitening products still play a part alongside the high-tech, teeth-whitening systems that come complete with LED lights and heat. Currently making beauty headlines for its DIY teeth-whitening properties is activated charcoal teeth-whitening powder. It might seem counterintuitive to brush your teeth with black powder, but the theory is that the charcoal pulls stains off your teeth through a process called “adsorption”. When processed with intense heat, the fine black powder blend of bone char, olive pits, coal, sawdust and coconut shells changes its internal structure becoming more porous than regular charcoal. It’s not an overnight cure for white teeth, but it’s been proven to be effective in absorbing plaque and other teeth-staining compounds, so it will brighten your smile.

Should you enlist a dentist’s help?

In the 17th century, barbers, who in those days also dabbled in dentistry, would file down teeth and apply an acid to whiten them while eroding the tooth enamel. These days, dentists use a high-strength hydrogen peroxide for instant whitening, but the treatment doesn’t come cheap. Dr Penelope Hall, a British dentist based in Singapore, says: “It’s effective but results vary from patient to patient and it’s hard to determine what the outcome will be. Patients often end up using at-home, teeth-whitening trays to maintain, so it’s effectively more expensive.” It’s also very painful for many people, she warns, “although the pain usually only lasts for a couple of days”. Dr Hall thinks pairing a custom-made whitening tray created by your dentist with a store-bought whitening kit, such as Opalescence 35% Carbamide Peroxide, is the best way to whiten teeth. “The great thing with at-home, dentist-prescribed trays is that patients can top up their whitening periodically by buying a new syringe of whitening gel.” Such custom-bleaching trays use lower levels of peroxide than in-dentist offerings, however, so need to be used more regularly.

What’s the deal with coconut oil?

Recently, the 3,000-year-old Ayurvedic practice of swishing a tablespoon of coconut oil (buy it here) around your mouth for 20 minutes a day has gained traction as an effective teeth-whitening home remedy. The oil is thought to cut through plaque, which, over time, means whiter teeth. However, while coconut oil pulling has been shown to optimise oral health—cleansing teeth and gums of bacteria—there is little evidence that it whitens teeth. “A lot of people say it does whiten teeth, but there is nothing really supporting this,” says Ayurvedic expert and author of The Body Balance Diet Plan, Eminé Ali Rushton. “I coconut oil pull to cleanse my mouth, gums and teeth, and to draw out toxins. I also find that charcoal and coconut toothpaste leaves my teeth looking brighter. As they are gently abrasive and deep-cleansing, teeth do tend to look whiter afterwards, but the coconut oil thing alone is a little misleading.”

Is baking soda good for whitening teeth?

“Baking soda is great for stain removal but can be abrasive,” says Dr Hall. “It doesn’t physically whiten the enamel, it just makes teeth look cleaner as it removes plaque and stains.” In fact, most natural teeth-whitening treatments are, in reality, simply teeth stain removers. While superficial stains come from caffeine, wine, cola, tobacco and also some medications, certain diseases or just unlucky genes, it is possible to prevent teeth stains occurring in the first place.

OK, so how do you prevent teeth stains?

If you don’t want to get stains on your teeth, you need to avoid the biggest culprits, which, unfortunately, are caffeine and red wine, alongside cigarettes and berry-boosted smoothies.

Saliva is your friend when it comes to breaking down plaque, which causes teeth to look yellow. And because we may only swallow 20 times while we sleep—as opposed to around 2,000 times during the day—it’s vital that you brush your teeth (for two minutes) just before you go to bed. Nutritionist Natasha Corrett also recommends eating foods that crunch (apples, nuts and seeds, cauliflower and raw broccoli), as this stimulates saliva production.

However, even if you follow all of the above, the effects of all teeth-whitening treatments are temporary—even whitening strips, which bleach the part of the tooth just below the enamel—so to keep a gleaming smile, you really need to lay off tea, coffee, tobacco, wine and cola. But if that’s too much? Walk the middle path of cause and cure.

Also read:

How to get perfect pearly-white teeth: Tips from a celebrity dentist

The best breakfast options for those on the intermittent fasting diet

6 foods to add to your diet to boost your immunity this monsoon

The best beauty products you should get your hands on this August

What you need to know before jumping on the natural skincare bandwagon

Now Playing: Aditi Rao Hydari’s Behind the Scenes Cover Shoot for the May 2018 issue

";
var sb_focus="focused";
var isSponsored = false;

var crossed = false;
var randomInterval = 5000;
var adDelay = 2000;
var videoadDelay = 3000;
var mobAdDelay = 5000;
var adpause = true;
var currentAdSlot = "";
var currentPos = 0;
var currentScroll;
var firsttime = true, doitfornext = false;
var ADcont = [];
var storyLeaderboardID = $("#topadbnr div").attr("ad-slot-id");
ADcont.push(eval(storyLeaderboardID));
var magazineid = '';
var ctaFallback = "";

$(window).scroll(function (event) {

if($(window).width() > 768){

var article__header_padding_top = 30;

//var right_ad = ($('.article__header').offset().top + article__header_padding_top) + $('.article__header').height() - $('.article__summary').height() - 60;

var top_ad = $('.site__header').height();

if($(window).scrollTop() > top_ad){
$('.ad.ad--top').addClass('fixed');

if($('.content_body').find('.ad--top-cloned').is(":hidden")){

//$('.content_body').find('.ad--top-cloned').remove();
//$('.content_body').prepend('

');
$('.content_body').find('.ad--top-cloned').show();
}

//$('body').addClass('fixedTopAd');
} else {
$('.ad.ad--top').removeClass('fixed');
//$('.content_body').find('.ad--top-cloned').remove();

//$('body').removeClass('fixedTopAd');
$('.content_body').find('.ad--top-cloned').hide();
}
}

if($(window).width() > 1199) {
rightSideAdContainer();
}

currentScroll = $(window).scrollTop()+$(window).height();
if (currentScroll > currentPos)
{
currentPos = currentScroll;
crossed = true;
}

});

var cn_size_crossed = isMobile.any();
$(window).on('resize', function(){
if($(window).width() > 1199) {
rightSideAdContainer();
} else {
$('.right_side.ad').removeClass('fixed');
}

if(cn_size_crossed && $(window).width() > 768) {
cn_size_crossed = false;
totalInterval = 0;
clearInterval(ADintervalLeaderboard);
autoADtimerLeaderboard();
}
if(!cn_size_crossed && $(window).width() < 768) { cn_size_crossed = true; totalInterval = 0; clearInterval(ADintervalLeaderboard); autoADtimerLeaderboard(); } }); function rightSideAdContainer() { $($(".single-article-block").get()).each(function() { if ($(this).is_on_screen()) { if($(this).find('.article__image--fullsize').length > 0)
{
var top_bound = $(this).find('.article__image--fullsize').offset().top + $(this).find('.article__image--fullsize').height() - $('.ad.ad--top.fixed').height();
} else {
var top_bound = $(this).offset().top - $('.ad.ad--top.fixed').height();
}
var bottom_bound = $(this).height() + $(this).offset().top;

var bottom_bound_offset = window.innerHeight - $(this).find('.right_side').height(); - $("#header-leaderboard-ad").height();
bottom_bound = bottom_bound - bottom_bound_offset;

if($(window).scrollTop() > top_bound && $(window).scrollTop() < bottom_bound){ $(this).find('.right_side.ad').addClass('fixed'); $(".right_side.ad").not($(this).find('.right_side.ad')).removeClass('fixed'); } else { $(this).find('.right_side.ad').removeClass('fixed'); } return false; } else { $(this).find('.right_side.ad').removeClass('fixed'); } }); } $(window).scroll(function(e) { //infinite scroll articles if ($(window).scrollTop() >= ($(document).height() - $(window).height() - ($(window).height()*0.2) )) {
infinite_single_json(Articlecount, 0);
}

//Vertical scroll events
$($(".single-article-block").get()).each(function(t) {
$(this).find(".in-story-slideshow .slide").each(function(t) {
if ($(this).is_on_screen()) {
if ($(this).hasClass("ad-refreshed") || !$(this).is(":visible"))
{
} else {
if (isMobile.any()) {
gtmSlideshowVerticalScroll('Mobile');
} else {
gtmSlideshowVerticalScroll('Desktop');
}
$(this).addClass("ad-refreshed");
}
}
});
});

//infinite scroll title & url
$($(".single-article-block").get().reverse()).each(function() {
if ($(this).is_on_screen() && $(this).attr("data-post-url") == (location.protocol + '//' + location.host + location.pathname)) {
return false;
}
if ($(this).attr("data-post-url") && $(this).attr("data-post-title") && $(this).is_on_screen() && $(this).attr("data-post-url") != (location.protocol + '//' + location.host + location.pathname))
{
cnReplaceUrlandTitle($(this).attr("data-post-title"), $(this).attr("data-post-url"));
return false;
}
});
});

$(document).ready(function() {
$.ajaxSetup({ cache: true });
$.getScript('//connect.facebook.net/en_US/sdk.js', function(){
FB.init({
appId: '543661672486127',
version: 'v2.8'
});
FB.XFBML.parse();
});
});

var hidden, state, visibilityChange;
if (typeof document.hidden !== "undefined") {
hidden = "hidden";
visibilityChange = "visibilitychange";
state = "visibilityState";
} else if (typeof document.mozHidden !== "undefined") {
hidden = "mozHidden";
visibilityChange = "mozvisibilitychange";
state = "mozVisibilityState";
} else if (typeof document.msHidden !== "undefined") {
hidden = "msHidden";
visibilityChange = "msvisibilitychange";
state = "msVisibilityState";
} else if (typeof document.webkitHidden !== "undefined") {
hidden = "webkitHidden";
visibilityChange = "webkitvisibilitychange";
state = "webkitVisibilityState";
}

var sb_focus = "focused";
window.addEventListener('focus', function() {
sb_focus ='focused';
});

window.addEventListener('blur', function() {
sb_focus = 'not focused';
});

window.onblur = function() { window.blurred = true; };
window.onfocus = function() { window.blurred = false; };

function onScrollAutoplayVideo(ifx)
{
ifx[0].contentWindow.playad();
}

function onScrollAutopauseVideo(ifx)
{
ifx[0].contentWindow.pausead();
}

jQuery(window).scroll(function(e){
// Code for inview video autoplay
$('body').find('.video-ads').each(function(index){
if(isScrolledIntoView($(this)))
{
onScrollAutoplayVideo($(this));
}
else
{
onScrollAutopauseVideo($(this));
}
});
// END Code for inview video autoplay
});
// END Window Scroll Handlers

jQuery.fn.is_on_screen = function() {
var win = $(window);
var viewport = {
top : win.scrollTop(),
left : win.scrollLeft()
};
viewport.right = viewport.left + win.width();
viewport.bottom = viewport.top + win.height();

var bounds = this.offset();
bounds.right = bounds.left + this.innerWidth();
bounds.bottom = bounds.top + this.innerHeight();

return (!(viewport.bottom < bounds.top || viewport.top > bounds.bottom));
};

window.addEventListener('message', function(event) {
if (~event.origin.indexOf('https://www.vogue.in')) {
if(event.data.event && event.data.event == "CN-AD-refresh")
{

if(document[state] != 'visible') { return; }
if(sb_focus == 'not focused') { return; }

if(typeof event.data.slot !== "undefined" && event.data.slot)
{
if($.inArray(event.data.slot, window.cnAdsRefreshArray.leaderboard))
{
clearInterval(ADintervalLeaderboard);
autoADtimerLeaderboard();
}

if($.inArray(event.data.slot, window.cnAdsRefreshArray.mpu))
{
clearInterval(ADintervalMPU);
autoADtimerMPU();
}
}

if(typeof event.data.slot !== "undefined" && event.data.slot)
{
googletag.cmd.push(function() {
googletag.pubads().refresh([eval(event.data.slot)]);
});
}
}
} else {
return;
}
});

$(document).ready(function(e) {
window.addEventListener('focus', function() {
sb_focus ='focused';
});

window.addEventListener('blur', function() {
sb_focus = 'not focused';
});

// cnWebengage('article-category', 'article_category', {"category":"How To","sub_category":"Beauty"});

$("img.lazy").lazyload({
skip_invisible : true
});

autoADtimerLeaderboard = function() {
ADintervalLeaderboard = window.setInterval(function(){
if(document[state] != 'visible') { return; }
if(sb_focus == 'not focused') { return; }
if(true)
{
var leaderboardAdSlot = $("#header-leaderboard-ad div").attr("ad-slot-id");
googletag.cmd.push(function() {
googletag.pubads().refresh([eval(leaderboardAdSlot)]);
});
}
}, randomInterval);
}

autoADtimerMPU = function() {
ADintervalMPU = window.setInterval(function(){
if(document[state] != 'visible') { return; }
if(sb_focus == 'not focused') { return; }
if(true)
{
$($(".mpu-ad-slot").get()).each(function() {
if ($(this).is_on_screen()) {
var mpuAdSlot = $(this).find('.sb-mpu-ad').attr("ad-slot-id");

googletag.cmd.push(function() {
googletag.pubads().refresh([eval(mpuAdSlot)]);
});
}
});
$($(".new-ad-unit").get()).each(function() {
if ($(this).is_on_screen()) {
var secMpuAdSlot = $(this).attr("ad-slot-id");

googletag.cmd.push(function() {
googletag.pubads().refresh([eval(secMpuAdSlot)]);
});
}
});
}
}, randomInterval);
}

autoADtimerLeaderboard();
autoADtimerMPU();

$('body').imagesLoaded( function() {
if ($(window).scrollTop() >= ($(document).height() - $(window).height() - ($(window).height()*0.2) )) {
infinite_single_json(count, 0);
}
});

$(document).on('click','.open_other_social', function(){
$(this).parents('.socialShare.socialShare-top.social-sharer-buttons-article-top').find('ul').css('right','0');
$(this).parents('.socialShare.socialShare-top.social-sharer-buttons-article-top').find('li').css('width','auto');
$(this).parents('.socialShare.socialShare-top.social-sharer-buttons-article-top').find('li a').css('display','block');
$(this).parents('.socialShare.socialShare-top.social-sharer-buttons-article-top').find('.fb_rect_wrapper').remove();
$(this).hide();
});

gtmFirstLoad();
// get_related_stories('0','967483','no','31945','19580,16552,19592,10601,9691,10634');
setTimeout(function(){
processBrightcoveVideos();
$('a.embed-popover').webuiPopover();
}, 2000);
});

function cn_lr_logout_callback(){
if((!regwall_story||isLoggedIn)&&!isSponsored)
load_instory_cta_ajax('967483', 0, '31945', magazineid);
}

function cn_lr_login_callback(){
if((!regwall_story||isLoggedIn)&&!isSponsored)
load_instory_cta_ajax('967483', 0, '31945', magazineid);
}

function limitLengthInWords(desc, maxWords) {
var value = desc,
wordCount = value.split(/S+/).length - 1,
re = new RegExp("^\s*\S+(?:\s+\S+){0,"+(maxWords-1)+"}");
if (wordCount >= maxWords) {
desc = value.match(re);
}
return desc;
}

function check_ref_sub(postid, issue_id, referer, guid, page_no = 0){

$.ajax({
type: 'POST',
url: 'https://www.vogue.in/wp-admin/admin-ajax.php',
async: false,
data: "action=getsubstatus" + "&postid=" + postid + "&issue_id=" + issue_id + "&referer=" + referer,
success: function (data) {

if (data === ' blocked' || data === 'blocked')
{

var blockedhtml = '

';

setTimeout(function(){
gtmMagazineHomeSubscribe("WebStory Page", "Subscribe Button Impressions");
}, 500);

var pTagCount = 0;
var pETop = 0
var targetPtag;

$("#post-"+postid+" .description ").find('.gqBrightcove:first-child').remove();
$("#post-"+postid+" .description ").find('.tag-slider-video').remove();

$.each($("#post-"+postid+" .description").children('p, h2'),function()
{
pTagCount++;
if(pTagCount>1) $(this).remove();
if(pTagCount==2){ targetPtag = $(this); pETop = $(this).offset().top;}
});
var pTagCount = 0;
var sETop = 0

$.each($("#post-"+postid+" .slide"),function(){
pTagCount++;
if(pTagCount>regwallSlides){ var regSlider = $(this).parents('div.cycle-slideshow'); }
if(pTagCount>(parseInt(regwallSlides)+1)){ $(this).prev('.instory-slide-counter').remove(); $(this).remove(); }
if(pTagCount==regwallSlides) sETop = $(this).offset().top;
});

if(pETop>sETop&&sETop!=0) pETop = sETop;
if(pETop==0) pETop = sETop;
$.each($("#post-"+postid+" .description").children(),function(){
if(pETop!=0&&$(this).offset().top>pETop&&!$(this).hasClass('nextStory')&&!$(this).hasClass('socialIconSet'))
{
if(pETop!=sETop){} else $(this).remove();
}
});
$("#post-"+postid+" .storyLink").remove();
$.each($("#post-"+postid+" .wrapper").children(),function(){
if(!$(this).hasClass('nextStory')&&!$(this).hasClass('tag-slider-video')&&!$(this).hasClass('socialIconSet')) $(this).remove();
});

$("#post-"+postid+" .description").append(blockedhtml);

if(guid != '' && guid !== undefined){ load_subscription_btn_1(guid); }else{ $('.button1_popup').remove(); }

} else if(data === ' blockedref' || data === 'blockedref') {

}

else {
$('#get_all_post_ids').val(data);
}

}
});
}

$(document).on("click",".addFbComment",function(){
var commentMarkup = '';
$(this).parents('div.comment_section').html(commentMarkup);
FB.XFBML.parse();
});

//load cta
function load_instory_cta_ajax(post_id, pageNumber, category_id, magazineid){
var ctaSlot = "CTA_" + post_id + "_" + pageNumber + "_1";
if (isMobile.any()) {
var ctaHtml = get_instory_cta_dfp(ctaSlot);
insert_cta_html(post_id, ctaHtml);
} else {
ctaHtml = "";
}
$.ajax({
url: action_url+'?action=get_instory_cta_ajax',
type:'POST',
data: {"page_no":pageNumber,'post_id': post_id, 'isLoggedIn' : isLoggedIn,'category_id':category_id,'magazineid' : magazineid}
}).done(function(data) {
data = JSON.parse(data);
ctaFallback = data.cta1;
if(ctaFallback == "Fallback") $("#div-gpt-ad-"+ctaSlot).html(ctaFallback);
$(".cta_holder-"+pageNumber+"-b").html(data.cta2);
});
}

//Get Related Stories Ajax
function get_related_stories(pageNumber, post_id, sponsored, category_id, topic_ids) {
$.ajax({
url: action_url+'?action=related_story_ajax',
type:'POST',
data: {"page_no":pageNumber,'post_id': post_id,'sponsored':sponsored,'category_id':category_id,'rel_ids':$("#get_all_post_ids").val(),'topic_ids':topic_ids}
}).done(function(data) {
$("#related-stories-"+pageNumber).html(data);
owl_cursel_init();
});
}

//get instory CTA
function get_instory_cta_dfp(ctaSlot)
{
var deviceSlot = "[[848,218],[848,200],[848,250],[848,150]]";
if (isMobile.any()) {
deviceSlot = "[[320,157]]";
}
var ctaHtml = "

";
setTimeout(function(){
if($("#div-gpt-ad-"+ctaSlot).height() == 0){
$("#div-gpt-ad-"+ctaSlot).replaceWith(ctaFallback);
}
}, 2000);
return ctaHtml;
}

function insert_cta_html(post_id, ctaHtml){
if(isMobile.any())
{
if($("#post-"+post_id+" .description").children('p').length > 1 && $("#post-"+post_id+" .description .slide").length > 1)
{
if($("#post-"+post_id+" .description").children('p').eq(1).offset().top > $("#post-"+post_id+" .description .slide").eq(1).offset().top )
{
$("#post-"+post_id+" .description .slide").eq(1).after(ctaHtml);
} else {
$("#post-"+post_id+" .description").children('p').eq(1).after(ctaHtml);
}
} else {
if($("#post-"+post_id+" .description").children('p').length > 2)
{
$("#post-"+post_id+" .description").children('p').eq(1).after(ctaHtml);
} else {
$("#post-"+post_id+" .description .slide").eq(1).after(ctaHtml);
}
}
} else {
if($("#post-"+post_id+" .description").children('p').length>2)
$("#post-"+post_id+" .description").children('p').eq(1).after(ctaHtml);
}
}

//ad check
googletag.cmd.push(function() {
googletag.pubads().addEventListener('slotRenderEnded', function(e) {
if(e.isEmpty){
if($("#"+e.slot.getSlotElementId()).hasClass("instory_cta")){
$("#"+e.slot.getSlotElementId()).html(ctaFallback);
if(!ctaFallback) ctaFallback = "Fallback";
}
$("#"+e.slot.getSlotElementId()).parent(".adinsert").slideUp(400);
if(!$("#native_story .native-story-ad").is(":visible")&&!$(".topadbnr").is(":visible")){$("#native_story").remove();singleNativeCarousel = false;isSingleNativeCarousel=false;$(".topadbnr").show(); $("body").css({paddingTop:parseInt($("#navBar").outerHeight()+$(".topadbnr").outerHeight())+"px"});}
} else {
$("#"+e.slot.getSlotElementId()).parent(".adinsert").slideDown(400);
}
});
});

//Get Next Story
function infinite_single_json(pageNumber, animation) {
if (typeof(animation)==='undefined') animation = 0;
$('.loader_img:last').show();
var get_all_post_ids = $("#get_all_post_ids").val();
var all_post_ids_arr = new Array();
all_post_ids_arr = get_all_post_ids.split(",");
var next_article_id = all_post_ids_arr[(parseInt(pageNumber) - 1 )];

if(next_article_id&&typeof(next_article_id)!=='undefined')
{
if($("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id).length == 0)
{
if(load_start==0)
{
load_start = 1;
var action_url = 'https://www.vogue.in/wp-admin/admin-ajax.php';
$.ajax({
url: action_url+'?action=infinite_single_json',
type:'POST',
data: {"page_no":pageNumber,'get_all_post_ids':get_all_post_ids}
}).done(function(data) {
//console.log("infinite_data",data);
load_start = 0;Articlecount++;
data = JSON.parse(data);
$('.loader_img').hide();
if(!data.sponsored_status&&!isLoggedIn&&!data.issue_id) singleStoryCookie(data.article_id);
isSponsored = data.sponsored_status;

ADPostId = data.article_id;

$(".next_article:last").hide();
if(!data.is_mobile)
{
$( ".topadbnr:first" ).remove();
}

data.page_no_i = data.page_no + 1;
data.encoded_permalink = encodeURI(data.permalink);

//related Stories start
var sponsored = 'no';
if(data.sponsored_status) sponsored = 'yes';
var topic_tags = [];
$.each(data.topic_tags,function(index,tag){
topic_tags.push(tag.term_id);
});
/*if(is_sponsored==1)
{
get_related_stories(data.page_no,data.article_id,'yes',data.category_term_id,topic_tags.join(','));
}
else
{
get_related_stories(data.page_no,data.article_id,'no',data.category_term_id,topic_tags.join(','));
}*/

if(!data.sponsored_status) load_instory_cta_ajax(data.article_id,data.page_no, data.category_term_id, data.magazineid);

//mustache code
var template = $('#template').html();
Mustache.parse(template); // optional, speeds up future uses
var rendered = Mustache.render(template, data);
if(Cookies.get('cn_bid'))
{
dataLayerBID = Cookies.get('cn_bid');
re = new RegExp("<%shareBid%>", "g");
rendered = rendered.replace(re, dataLayerBID);
}
$("#load_article_content").append(rendered);
$("img.lazy").lazyload({
skip_invisible : true
});

if(data.issue_id)
{
marketing_text = data.marketing_text;
check_ref_sub(data.article_id, data.issue_id, 'internal', data.guid, data.page_no);
}

var google_category = $(".topadbnr:last").attr('data-google-category');
var sponsor_ad = $(".topadbnr:last").attr('data-sponsor-story');
var is_sponsored = $(".topadbnr:last").attr("data-is-sponsored");
var leaderboardcode = $(".topadbnr:last").attr("data-leaderboard-code");
var mpucode = $(".topadbnr:last").attr("data-mpu-code");

if(!data.is_magazine)
{
if(!data.is_mobile)
{
$("#header-leaderboard-ad").html(data.leaderboard_ad);
}
// $('#mpu-ad-slot').html(data.mpu_ad);
// $("#secondary-mpu-ad-slot").html(data.mpu_ad2);
mpuAd = data.mpu_ad;
}
if(!data.is_mobile)
{
dfpCount = 0;
totalInterval = 0;
clearInterval(ADintervalLeaderboard);
autoADtimerLeaderboard();
clearInterval(ADintervalMPU);
autoADtimerMPU();
}

var currentDiv = $("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id);
cnReplaceUrlandTitle(currentDiv.data("post-title"), currentDiv.data("post-url"));
gtmSingleContinuousScroll();
processBrightcoveVideos();
if(animation==1)
{
if(isMobile.any())
{
$("html, body").animate({
scrollTop: $("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id).offset().top - $("#navBar").outerHeight() - $('#topadbnr').outerHeight() + 20
}, 600);
} else {
$("html, body").animate({
scrollTop: $("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id).offset().top - $("#navBar").outerHeight() - $('#topadbnr').outerHeight()
}, 600);
}
}
onloadAjax.initAll();
});
}
} else {
if(animation==1)
{
console.log($("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id).offset().top, $("#navBar").outerHeight(), $('#topadbnr').outerHeight());
if(isMobile.any())
{
$("html, body").animate({
scrollTop: $("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id).offset().top - $("#navBar").outerHeight() - $('#topadbnr').outerHeight() + 20
}, 600);
} else {
$("html, body").animate({
scrollTop: $("#next_story_"+(parseInt(pageNumber))+'_'+next_article_id).offset().top - $("#navBar").outerHeight() - $('#topadbnr').outerHeight()
}, 600);
}
}
}
} else {
load_start = 1;
$('.loader_img:last').hide();
}
}

$(document).on('click', '.subscription_popup .content_btns', function(){
gtmMagazineHomeSubscribe("WebStory Page - "+$(this).data("price"), "Subscribe Button Click");
});

$(document).on('click','.close_reg_wall', function(){
$('.reg_wall_v2').fadeOut();
});

$(window).load(function(){
// alert($('body').find('.has-responsive-video').width());

if($(window).width() < 768) { $('.reg_wall_v2').width($(window).width()); } else{ $('.reg_wall_v2').width($('.has-responsive-video').width()); } })



Source link