'use strict';(function(){var a=(a===undefined)?{}:a;a.au_selector=function(a,c){var d,e=function(e,f,i,j,k){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': bindEvents function called.');var l=window.innerHeight,m=function(b){if(((document.documentElement.scrollTop||document.body.scrollTop)+(l-1))>j.y)if(e.getAttribute('hov-no-animation')===null)if(c.animation)a(e).slideDown(500,function(){a(this).attr('data-attr','done');h.unbindEvent(window,'scroll',m);});else{e.style.display='block';h.unbindEvent(window,'scroll',m);}else h.unbindEvent(window,'scroll',m);};if(c.hr)h.handleResize(e,f,c.dimension.width,c.dimension.height,false,c.aud.is_after,function(a){d=a;});if(j)if(k){var n=window.setInterval(function(){if(e.getAttribute('hov-ad-rendered')=='true'){window.clearInterval(n);h.bindEvent(window,'scroll',m);}if(e.getAttribute('hov-ad-unbind')=='true'||e.getAttribute('hov-no-animation')=='true')window.clearInterval(n);},80);}else h.bindEvent(window,'scroll',m);if(i){a(i).click(function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Web BTC Close button Clicked.');if(c.aud.is_float)h.removeContainer(a(e),undefined,undefined,function(){},true);else if(c.animation)a(e).slideUp(500,function(){h.removeContainer(c.mslct,(c.aud.is_after?'after':'before'),'div',function(){});});else{e.style.display='none';h.removeContainer(c.mslct,(c.aud.is_after?'after':'before'),'div',function(){});}if(c.hr)h.unbindEvent(window,'resize',d);});window.setTimeout(function(){i.style.display='block';},c.cbat);}if(c.aud.infinite_scroll)h.urlHeightWatcher(c.aud.height_look?true:undefined,function(a,b){g();});},f=function(b,d,e){var f=b.length,g=0,i=false;c.aud.logic=h.convertString(c.aud.logic);for(;g'&&f>c.aud.logic[g].count){i=true;break;}else if(c.aud.logic[g].type=='<'&&f0)j=a(j).next(d.next);}a(j).addClass('clearfix');e(j);}},g=function(){if(c.aud.is_logical){h.isContainerLoaded(c.mslct,function(b){f(b,c.aud.eliminate,function(b){if(b){var d=a(b),f=document.createElement('div'),g;h.setAttributes(f,{'data-attr':'not-done','hov-ad-rendered':'false','hov-ad-unbind':'false','class':h.prefixName+'MainAdContainer','style':'height:auto;width:100%;text-align:center;padding:0;margin:auto auto !important;position:relative !important;overflow:hidden !important;background:transparent;'});if(c.aud.is_float)d.prepend(a(f));else c.aud.is_after?d.after(a(f)):d.before(a(f));g=h.makeContainer(f,c.dimension.width,c.dimension.height,c.cbp,c.scbtn);g.position=h.getOffset(f);f.style.display='none';if(g.close){g.close.style.display='none';g.close.style.position='absolute';}if(c.aud.lazyLoad)h.lazyPutAd(c.aud.lazyElm,function(){h.putAd(g.container,c.dimension.width,c.dimension.height,c.tag,function(a,b){e(g.mainContainer,g.container,g.close,((c.ob=='auto')?undefined:g.position),b);h.reloadAd(c.rt,c.rd,g.container,a,c.dimension.width,c.dimension.height,c.tag,function(a){});});});else h.putAd(g.container,c.dimension.width,c.dimension.height,c.tag,function(a,b){e(g.mainContainer,g.container,g.close,((c.ob=='auto')?undefined:g.position),b);h.reloadAd(c.rt,c.rd,g.container,a,c.dimension.width,c.dimension.height,c.tag,function(a){});});if(c.aud.is_after)a(g.mainContainer).prev().addClass('_hoverrDone');else a(g.mainContainer).next().addClass('_hoverrDone');}});});}else h.findContainer(c.mslct,(c.aud.is_after?'after':'before'),c.dimension.width,c.dimension.height,c.cbp,c.aud.is_inline,'','div',function(b){a.each(b,function(d,f){if(b[d].close)b[d].close.style.display='none';if(c.ob=='auto')if(c.animation)a(b[d].mainContainer).slideDown(500,function(){a(this).attr('data-attr','done');});else b[d].mainContainer.style.display='block';if(c.aud.lazyLoad)h.lazyPutAd(c.aud.lazyElm,function(){h.putAd(b[d].container,c.dimension.width,c.dimension.height,c.tag,function(a,f){e(b[d].mainContainer,b[d].container,b[d].close,((c.ob=='auto')?undefined:b[d].position),f);h.reloadAd(c.rt,c.rd,b[d].container,a,c.dimension.width,c.dimension.height,c.tag,function(a){});});});else h.putAd(b[d].container,c.dimension.width,c.dimension.height,c.tag,function(a,f){e(b[d].mainContainer,b[d].container,b[d].close,((c.ob=='auto')?undefined:b[d].position),f);h.reloadAd(c.rt,c.rd,b[d].container,a,c.dimension.width,c.dimension.height,c.tag,function(a){});});if(c.aud.is_after)a(b[d].mainContainer).prev().addClass('_hoverrDone');else a(b[d].mainContainer).next().addClass('_hoverrDone');});},undefined,c.scbtn);};b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': '+c.name+' initialized.');if(c.mcss)h.createStyleElement(c.mcss);g();};a.photogallery=function(a,c){var d='//fonts.googleapis.com/css?family=Roboto:400,700',e='//cdn.hoverr.me/json/',f=false,g=false,i=0,j=[],k=[],l,m=function(a,b){var c=h.getRandomInt(0,(a.length-1));if(j.indexOf(c)==-1){j.push(c);b(a[c]);}},n=function(){h.createStyleElement('.'+h.prefixName+'GalleryTextDiv::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);background-color:#9c9c9c;}.'+h.prefixName+'GalleryTextDiv::-webkit-scrollbar{width:6px;background-color:#9c9c9c;}.'+h.prefixName+'GalleryTextDiv::-webkit-scrollbar-thumb{background-color:#000000;}.'+h.prefixName+'PlayPauseButton.play{background-image: url(//cdn.hoverr.me/images/play.svg);}.'+h.prefixName+'PlayPauseButton.pause{background-image: url(//cdn.hoverr.me/images/pause.png);}.'+h.prefixName+'PlayPauseButton,.'+h.prefixName+'GalleryLeftSpan,.'+h.prefixName+'GalleryRightSpan{-webkit-transition:all 0.2s ease 0s;-moz-transition:all 0.2s ease 0s;-ms-transition:all 0.2s ease 0s;-o-transition:all 0.2s ease 0s;transition:all 0.2s ease 0s;}.'+h.prefixName+'PhotoMainContainer:hover .'+h.prefixName+'PlayPauseButton,.'+h.prefixName+'PhotoMainContainer:hover .'+h.prefixName+'GalleryLeftSpan,.'+h.prefixName+'PhotoMainContainer:hover .'+h.prefixName+'GalleryRightSpan{opacity:1 !important;-webkit-transition:all 0.2s ease 0s;-moz-transition:all 0.2s ease 0s;-ms-transition:all 0.2s ease 0s;-o-transition:all 0.2s ease 0s;transition:all 0.2s ease 0s;}');},o=function(a,b){var c='',d=(a*(b.list.length));for(var e=0;e
';}return{html:c,fullWidth:d};},p=function(a,d,e){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Creating the gallery.');var f=document.createElement('div'),g=document.createElement('div'),i=document.createElement('div'),j=document.createElement('div'),k=document.createElement('div'),m=document.createElement('div'),n=document.createElement('div'),p=document.createElement('div'),q=document.createElement('h4'),r=document.createElement('div'),s=document.createElement('div'),t=document.createElement('span'),u=document.createElement('span'),v=document.createElement('span'),w=document.createElement('pause'),x=document.createElement('ul'),y=window.innerWidth,z=window.innerHeight,A=Math.ceil(y*.55),B=0,C=0,D=((y-A)/2),E=((D/B)<=1)?(D/B):1,F=((D/B)<=1)?"left:"+((D-B)/2)+"px;":"",G=((D/B)<=1)?"right:"+-((D-B)/2)+"px;":"",H=((z-c.aud.gutter.dimension.height)/2);h.setAttributes(f,{'class':h.prefixName+'fullscreenDiv',style:'position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:2147483644;background:rgba(27,27,27,0.901961);font-family:Roboto,sans-serif;'});(document.body||document.getElementsByTagName('body')[0]).appendChild(f);h.setAttributes(r,{'class':h.prefixName+'LeftGutterDiv',style:'position:absolute;top:'+((H>=0)?H:0)+'px;right:initial;width:'+D+'px;height:'+c.aud.gutter.dimension.height+'px;-moz-transform:scale('+E+');-o-transform:scale('+E+');-webkit-transform:scale('+E+');transform:scale('+E+');text-align:center;'+F});h.setAttributes(s,{'class':h.prefixName+'RightGutterDiv',style:'position:absolute;top:'+((H>=0)?H:0)+'px;right:0;left:initial;width:'+D+'px;height:'+c.aud.gutter.dimension.height+'px;-moz-transform:scale('+E+');-o-transform:scale('+E+');-webkit-transform:scale('+E+');transform:scale('+E+');text-align:center;'+G});h.setAttributes(t,{'class':h.prefixName+'MainCloseButton',style:'position:absolute;background:rgba(255,255,255,0.6);height:50px;width:50px;top:0;right:0;z-index:2199999;font-size:40px;font-weight:100;cursor:pointer;line-height:1;text-align:center;'});t.innerHTML='×';h.setAttributes(g,{'class':h.prefixName+'galleryDiv',style:'background:rgb(27, 27, 27);width:'+A+'px;height:auto;margin:0px auto auto;'});f.appendChild(r);f.appendChild(g);f.appendChild(s);f.appendChild(t);h.setAttributes(q,{'class':h.prefixName+'PhotoHeading',style:'margin:0;padding:15px 20px;font-size:16px;color:#c1c1c1;border-bottom:#373737 solid 1px;text-align:left;'});q.innerHTML=(c.aud.heading_link)?''+d.heading+'':d.heading;g.appendChild(q);h.setAttributes(i,{'class':h.prefixName+'PhotoMainContainer',style:'width:100%;margin:0;'});g.appendChild(i);h.setAttributes(k,{'class':h.prefixName+'PhotoContainer',style:'width:100%;vertical-align:middle;background:#1b1b1b;border-right:#373737 solid 1px;'});i.appendChild(k);h.setAttributes(m,{'class':h.prefixName+'DescContainer',style:'width:100%;vertical-align:top;background:#1b1b1b;padding:10px;'});i.appendChild(m);B=h.measureWidth(k);h.setAttributes(j,{'class':h.prefixName+'GalleryContainer',style:'width:'+B+'px;overflow:hidden;position:relative;height:auto;margin:auto;'});k.appendChild(j);h.setAttributes(x,{'class':h.prefixName+'GalleryUl',style:'display:block;height:auto;padding:0;margin:0;white-space:nowrap;list-style:none;overflow:visible;line-height:normal;'});var I=(c.aud.show_arrow)?'opacity:1;':'opacity:0;';h.setAttributes(u,{'class':h.prefixName+'GalleryRightSpan',style:'display:block;position:absolute;cursor:pointer;right:0;top:43%;height:50px;width:30px;background-image:url(//cdn.hoverr.me/images/right.svg);background-size:80%;background-color:rgba(255,255,255,0.6);background-repeat:no-repeat;background-position:41% 50%;border-top-left-radius:2px;border-bottom-left-radius:2px;'+I});h.setAttributes(v,{'class':h.prefixName+'GalleryLeftSpan',style:'display:block;position:absolute;cursor:pointer;left:0;top:43%;height:50px;width:30px;background-image:url(//cdn.hoverr.me/images/left.svg);background-size:80%;background-color:rgba(255,255,255,0.6);background-repeat:no-repeat;background-position:41% 50%;border-top-right-radius:2px;border-bottom-right-radius:2px;'+I});h.setAttributes(w,{'class':h.prefixName+'PlayPauseButton play',style:'display:block;position:absolute;cursor:pointer;left:45%;top:43%;height:50px;width:50px;border-radius:50%;background-size:50%;background-color:rgba(255,255,255,0.6);background-repeat:no-repeat;background-position:center;'+I});j.appendChild(x);j.appendChild(u);j.appendChild(v);j.appendChild(w);l=o(B,d);x.innerHTML=l.html;x.style.width=l.fullWidth+'px';n.innerHTML=d.list[0].text;m.innerHTML='
';h.setAttributes(n,{'class':h.prefixName+'GalleryTextDiv',style:'font-size:13px;color:#c1c1c1;'+(c.aud.shwrghtad?'height:110px;overflow-y:scroll;':'height:100%;max-height:100%;overflow:auto;')+'overflow-x:hidden;text-align:left;line-height:1.45;'});m.insertBefore(n,m.firstChild);if(c.aud.shwrghtad){m.appendChild(p);h.setAttributes(p,{'class':h.prefixName+'AdContainer',style:'text-align:center;width:'+(h.measureWidth(p)-20)+'px;margin:auto;'});}f.style.display='none';e(f,g,n,(c.aud.shwrghtad?m:undefined),r,s,t,u,v,w,x,l.fullWidth,B,E,j,q);},q=function(a,d,e,f){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Creating the display section.');var g=document.createElement('div'),i=document.createElement('div'),j=document.createElement('div'),k=h.measureWidth(a);h.setAttributes(g,{'class':h.prefixName+'OuterDiv',style:'display:table;width:100%;margin:10px auto;width:'+k+'px;'});a.insertBefore(g,a.firstChild);h.setAttributes(i,{'class':h.prefixName+'LeftCell',style:'display:table-cell;margin:0;padding:0;vertical-align:middle;'});g.appendChild(i);if(c.aud.shwrghtad){g.appendChild(d);d.style.display='table-cell';d.style.verticalAlign='middle';}h.setAttributes(j,{'class':'_teraGalleryDisplayDiv',style:'padding-right:10px;margin-right:10px;height:'+c.dimension.height+'px;cursor:pointer;outline:none;'});i.appendChild(j);j.innerHTML='
Launch Gallery ('+e.list.length+' images)
'+e.heading+'
';f(g);},r=function(a){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Getting JSON data.');var d=e+((c.aud.domain)?c.aud.domain:h.host)+'.json';h.getGalleryData(d,function(c,e){if(e)a(h.convertString(e));else b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Oops! No gallery JSON found on this link: '+d);});},s=function(d,e,i,j,k,l,m){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Display Bind Events function called.');var n=window.innerHeight,o=h.getOffset(i),p=function(){if(!f){if(((document.documentElement.scrollTop||document.body.scrollTop)+(n-1))>(o.y+(window.innerHeight)/2)){h.unbindEvent(window,'scroll',p);h.putAd(i,c.dimension.width,c.dimension.height,c.tag,function(b,d){h.reloadAd(c.rt,c.rd,i,b,c.dimension.width,c.dimension.height,c.tag,function(a){});if(c.animation)a(i).slideDown(500,function(){a(this).attr('data-attr','done');});else i.style.display='block';});}}else h.unbindEvent(window,'scroll',p);};if(c.aud.shwonscrlad)if(c.aud.onscrladao)h.putAd(i,c.dimension.width,c.dimension.height,c.tag,function(b,d){h.reloadAd(c.rt,c.rd,i,b,c.dimension.width,c.dimension.height,c.tag,function(a){});if(c.animation)a(i).slideDown(500,function(){a(this).attr('data-attr','done');});else i.style.display='block';});else{h.bindEvent(window,'scroll',p);i.style.display='none';}else i.style.display='none';h.bindEvent(d,'click',function(){f=true;var b=(document.body||document.getElementsByTagName('body')[0]);b.style.overflow='hidden';e.style.display='block';a(b).addClass("_teraOverflowClass");if(!g){g=true;if(m>0.4){h.putAd(j,c.aud.gutter.dimension.width,c.aud.gutter.dimension.height,c.aud.gutter.tag,function(a,b){h.reloadAd(c.rt,c.rd,j,a,c.aud.gutter.dimension.width,c.aud.gutter.dimension.height,c.aud.gutter.tag,function(a){});});h.putAd(k,c.aud.gutter.dimension.width,c.aud.gutter.dimension.height,c.aud.gutter.tag,function(a,b){h.reloadAd(c.rt,c.rd,k,a,c.aud.gutter.dimension.width,c.aud.gutter.dimension.height,c.aud.gutter.tag,function(a){});});}if(l)h.putAd(l,c.dimension.width,c.dimension.height,c.tag,function(a,b){h.reloadAd(c.rt,c.rd,l,a,c.dimension.width,c.dimension.height,c.tag,function(a){});});}});},t=function(d,e,f,g,j,l,n,p,q,r,s,t,u,v,w,x,y,z){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Full Screen Bind Events function called.');console.log(z);var A,B=(c.aud.anmtm)?c.aud.anmtm:3000,C=0,D=0,E=false,F={},G=G,H=function(b){var c=b.getElementsByTagName('iframe');for(var d=0;d0.4){H(j);H(l);h.putAd(j,c.aud.gutter.dimension.width,c.aud.gutter.dimension.height,c.aud.gutter.tag,function(a,b){});h.putAd(l,c.aud.gutter.dimension.width,c.aud.gutter.dimension.height,c.aud.gutter.tag,function(a,b){});}},J=function(b,d){a(s).stop().animate({'marginLeft':-b+'px'},500,function(){E=false;});y.innerHTML=a(s).find('li').eq(d).attr('dt-hd');f.innerHTML=k[d].text;if(c.aud.clkreload&&(i%c.aud.clkcount)==0)I();},K=function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Left Arrow Button Clicked.');if(a(r).hasClass('pause'))N();if(!E){i--;C--;E=true;console.log(D);if(C==-1){C=x.list.length-1;D=(t-u);}else D=(u*C);J(D,C);}},L=function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Right Arrow Button Clicked.');if(!E){i++;C++;E=true;D=(u*C);if((D==(t-u))||(D==t))if(c.aud.infinite)m(z,function(a){P(true);G=o(u,a);s.innerHTML=s.innerHTML+G.html;t=t+G.fullWidth;s.style.width=t+'px';J(D,C);});else{C=0;J((u*C),C);}else{J((u*C),C);P(true);}}},M=function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Starting the slideshow.');a(r).removeClass('play').addClass('pause');A=window.setInterval(function(){L();},B);},N=function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Stopping the slideshow.');a(r).removeClass('pause').addClass('play');window.clearInterval(A);},O=function(){var b=(document.body||document.getElementsByTagName('body')[0]);b.style.overflow='scroll';a(b).removeClass("_teraOverflowClass");d.style.display='none';},P=function(b){var c=h.measureHeight(w);s.style.height=c+'px';if(c>100&&b)a(s).children('li').each(function(){a(this).css({'height':c+'px'});});};a(r).click(function(){if(a(this).hasClass('play'))M();else N();});h.bindEvent(n,'click',O);a(q).click(function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Right Arrow Button Clicked.');if(a(r).hasClass('pause'))N();K();});a(p).click(function(){b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': Right Arrow Button Clicked.');console.log(1);if(a(r).hasClass('pause'))N();L();});};b.log('['+h.getTimeStamp()+'] '+h.logPrefix+': photo gallery ad-unit initialized.');if(c.mcss)h.createStyleElement(c.mcss);r(function(b){n();h.loadCSS(d,function(d){m(b,function(d){h.findContainer(c.mslct,(c.aud.is_after?'after':'before'),c.dimension.width,c.dimension.height,c.cbp,false,'height:auto;bottom:0;z-index:1;font-family:\'Roboto\',sans-serif;','div',function(e){a.each(e,function(f,g){if(c.ob=='auto')if(c.animation)a(e[f].mainContainer).slideDown(500,function(){a(this).attr('data-attr','done');});else e[f].mainContainer.style.display='block';else e[f].mainContainer.style.display='block';if(e[f].close)e[f].close.style.display='none';p(e[f].mainContainer,d,function(a,g,i,j,k,l,m,n,o,p,r,u,v,w,x,y){q(e[f].mainContainer,e[f].container,d,function(b){if(c.aud.shwrghtad)h.putAd(e[f].container,c.dimension.width,c.dimension.height,c.tag,function(a,b){h.reloadAd(c.rt,c.rd,e[f].container,a,c.dimension.width,c.dimension.height,c.tag,function(a){});});s(b,a,e[f].container,k,l,j,w);});t(a,g,i,j,k,l,m,n,o,p,r,u,v,w,x,d,y,b);});});},undefined,c.scbtn);});});});};if(typeof console==="undefined"||typeof console.log==="undefined"){console={};console.log=function(){};}var b={},c=true;b.log=function(a){if(c)console.log(a);};(function(a,b){a=a||"docReady";b=b||window;var c=[],d=false,e=false;function f(){if(!d){d=true;for(var a=0;a0)return parseInt(a.substring(b+5,a.indexOf('.',b)),10);var c=a.indexOf('Trident/');if(c>0){var d=a.indexOf('rv:');return parseInt(a.substring(d+3,a.indexOf('.',d)),10);}var e=a.indexOf('Edge/');if(e>0)return parseInt(a.substring(e+5,a.indexOf('.',e)),10);return false;},e=function(a,b){var c=function(a,b){var c=document.createElement('script');c.src=a;c.type="text/javascript";c.onreadystatechange=c.onload=function(){var a=c.readyState;if(!b.done&&(!a||/loaded|complete/.test(a))){b.done=true;b(true);}};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(c);};if(Array.isArray(a)){var d=0,e=a.length;for(var f=0;f-1||d()!=0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(window.navigator.userAgent.toLowerCase())?'mobile':'web';},g=function(a){var b=document.createElement('script');b.type='text/javascript';b.src='//cdn.automatad.com/demo/india_today_sticky.js';(document.head||document.documentElement).appendChild(b);var c=window.location.pathname,d;if("/"==c)d=c;else{var e=c.replace(/^\/|\/$/g,"").split("/"),f=e.length?e[0]:"/";if(c=='/story/sunil-grover-ali-asgar-what-does-the-future-hold-for-the-kapil-sharma-show-lifetv/1/914479.html')d='photogallery/*';else "/"==f?d=f:"story"==f?(""!==$(".path div:nth-child(3) span").text()?d=$(".path div:nth-child(3) span").text().toLowerCase():""!==$(".path div:nth-child(2) span").text()&&(d=$(".path div:nth-child(2) span").text().toLowerCase()),-1!==e[e.length-1].indexOf(".html")?d=f+"/*":d=f+"/"):"section"==f?-1!==e[e.length-1].indexOf(".html")&&(d=e[e.length-1].replace(".html","")+"/"):-1!==e[e.length-1].indexOf(".html")?d=f+"/*":d=f+"/";}a(d);},h={isInit:false,isMobile:f()=='mobile',isTablet:f()=='tablet',isFireFox:f(true),isIEorNot:d()!=false,$:window.jQuery||window.$,section:undefined,host:window.location.host||window.location.hostname,url:window.location.href,mainData:JSON.parse('{"*/*": {"mobile": [], "web": [{"rt": "adtimer", "rd": {"reloadcap": 5, "focuscount": 20000}, "name": "Selector", "mslct": "#floatingColumn ._teraMainAdContainer", "mcss": "", "animation": true, "ob": "auto", "cbat": 4000, "hr": false, "cbp": "tr", "tag": "
", "mode": "live", "fnm": "au_selector", "scbtn": false, "dimension": {"width": 300, "height": 250}, "aud": {"lazyLoad": false, "infinite_scroll": false, "is_inline": false, "height_look": false, "is_float": false, "lazyElm": "null", "eliminate": "undefined", "is_logical": false, "logic": "[]", "is_after": true}}, {"rt": "none", "rd": {}, "name": "Photogallery", "mslct": ".rt-colum.noborder:first", "mcss": "._teraLeftCell{display: block !important;}._teraGalleryDisplayDiv{padding-right: 0px !important; margin-right: 0px !important;}", "animation": true, "ob": "scroll", "cbat": 4000, "hr": false, "cbp": "tr", "tag": "
", "mode": "live", "fnm": "photogallery", "scbtn": false, "dimension": {"width": 300, "height": 250}, "aud": {"domain": "indiatoday.intoday", "gutter": {"tag": "
", "dimension": {"width": 160, "height": 600}}, "onscrladao": true, "shwonscrlad": false, "show_arrow": true, "heading_link": true, "clkreload": true, "shwrghtad": false, "anmtm": "3000", "infinite": true, "clkcount": "3", "is_after": false}}], "name": "Generic Article", "tablet": []}, "*/": {"mobile": [], "web": [], "name": "Generic Section", "tablet": []}, "/": {"mobile": [], "web": [], "name": "Home", "tablet": []}}'),hiddenFieldCounter:0,ttrim:new RegExp(/(^\s+|\s+$)/g),gaRequired:true,GTMId:'GTM-TPSQRM3',TO_DL:[],demoName:'hoverrdemo',gaTriggerEventName:'toEventTrigger',putGTM:function(a){var b=this,c=document.createElement('script'),d="(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','TO_DL','"+this.GTMId+"');";c.setAttribute('type','text/javascript');try{c.appendChild(document.createTextNode(d));}catch(e){c.text=d;}document.head.appendChild(c);setTimeout(function(){if(b.TO_DL.length>0)for(var c=0;c(d+(a.getBoundingClientRect().height/2)))&&(g<(e-(a.getBoundingClientRect().height/2))))return true;else return false;},pushEvent:function(a){if(this.gaRequired){var b={event:this.gaTriggerEventName,toAction:a.action,toCategory:a.category,toLabel:a.label};this.TO_DL.push(b);}},getRandomInt:function(a,b){return Math.floor(Math.random()*(b-a+1))+a;},isLocalStorageSupported:function(){return typeof Storage!=="undefined";},getGalleryData:function(a,b){if(this.isLocalStorageSupported()){var c=this.getCookie('_hov_data_present'),d=this.getRandomInt,e=this.storeDataInLocalstorage,f=this.isLocalStorageSupported,g=this.createCookie,h=localStorage._hovData;if(c=='true'&&h)b(null,JSON.parse(h));else this.httpGet(a,function(a,c){g('_hov_data_present',true);b(null,e(c,d,f));});}else this.httpGet(a,b);},storeDataInLocalstorage:function(a,b,c){var d=[],e=[],f=0,a=(typeof a==='string')?JSON.parse(a):a,g=a.length;if(g>50){while(d.length<50){f=b(0,g-1);if(e.indexOf(f)==-1){d.push(a[f]);e.push(f);}}}else d=a;if(c())localStorage.setItem("_hovData",JSON.stringify(d));return d;},createCookie:function(a,b,c){var d="",e=new Date(),f=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59);d="; expires="+f.toGMTString();if(!c)c="/";document.cookie=a+"="+b+d+"; path="+c;},getCookie:function(a){var b=a+"=";var c=document.cookie.split(';');for(var d=0;d-1),b=((b.indexOf('|')>-1)?b.split('|'):b),b=((b.indexOf('&')>-1)?b.split('&'):b),e=[];if(typeof b==='string'){try{c=a.querySelectorAll(b);}catch(f){c=h.$(a).find(b);}return c;}else if(d){for(var g=0;g=b.length)?c:[];}else{for(var g=0;g0)break;}return c;}},isContainerLoaded:function(a,b){var c=this.getElement,d,e;e=window.setInterval(function(){d=c(document,a);if(d.length){window.clearInterval(e);window.setTimeout(function(){b(d);},100);}},80);},createScriptElement:function(a){var b=document.head||document.getElementsByTagName('head')[0]||document.documentElement,c=document.createElement('script');c.type='text/javascript';c.appendChild(document.createTextNode(a));b.appendChild(c);},createStyleElement:function(a){var b=document.head||document.getElementsByTagName('head')[0]||document.documentElement,c=document.createElement('style');c.type='text/css';if(c.styleSheet)c.styleSheet.cssText=a;else c.appendChild(document.createTextNode(a));b.appendChild(c);},getDocumentHeight:function(){var a=document.body,b=document.documentElement;return Math.max(a.scrollHeight,a.offsetHeight,b.clientHeight,b.scrollHeight,b.offsetHeight);},getParams:function(){var a={};if(window.location.search.length!==0)window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(b,c,d){c=decodeURIComponent(c);if(typeof a[c]==="undefined")a[c]=decodeURIComponent(d);else a[c]=[].concat(a[c],decodeURIComponent(d));});return a;},loadCSS:function(a,b){var c,d=0,e=function(a){c=document.createElement('link');c.href=a;c.rel="stylesheet";(document.head||document.getElementsByTagName("head")[0]||document.documentElement).appendChild(c);};if(Array.isArray(a))for(;d0.5){b.style.transform="scale("+l+")";b.style.left=j+'px';a.style.display='block';}else a.style.display='none';}else if(g/c>0.5){a.style.display='block';l=((g/c)<=1)?(g/c):1;j=((g/c)<=1)?((g-c)/2):undefined;if(e){k=(d*l)/2;if(f)a.style.bottom='-'+k+'px';else a.style.top='-'+k+'px';}b.style.transform="scale("+l+")";b.style.left=j+'px';}else a.style.display='none';};this.bindEvent(window,'resize',j);g(j);},elementWatcher:function(a,b,c,d){if(a&&a.getAttribute(b))var e=a.getAttribute(b),f,g=setInterval(function(){f=a.getAttribute(b);if(f!=e){e=f;c(a,g);}},d?d:1000);},makeContainer:function(a,b,c,d,e){var f=h.measureWidth(a),g=document.createElement('div'),i=document.createElement('span'),j=undefined,k=((f/b)<=1)?(f/b):1,l=((f/b)<=1)?"left: "+((f-b)/2)+"px;":"",m=Math.ceil(((c*k)-c)/2),n="position:relative;margin:5px auto;padding:0;"+l+"width:"+b+"px;height:"+c+"px;-moz-transform:scale("+k+");-o-transform: scale("+k+");-webkit-transform:scale("+k+");transform:scale("+k+");overflow:hidden;";if(h.isIEorNot)n+='-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11='+k+', M12=0, M21=0, M22='+k+', SizingMethod=\'auto expand\')"; filter: progid:DXImageTransform.Microsoft.Matrix(M11='+k+', M12=0, M21=0, M22='+k+', SizingMethod=\'auto expand\');"';h.setAttributes(g,{'class':h.prefixName+'AdContainer',style:n});switch(d){case 'tl':j='top:0;left:0;';break;case 'tr':j='top:0;right:0;';break;case 'bl':j='bottom:0;left:0;';break;case 'br':j='bottom:0;right:0;';break;};if(e){h.setAttributes(i,{'class':"_hovClose",style:j+'position:absolute;height:19px;width:19px;text-align:center;cursor:pointer;font-size:19px !important;line-height:17px !important;color:#FFFFFF;z-index:2147483648;background:#000000;margin:0 !important;'+((h.demoName&&h.demoName=='etherdemo')?'background:rgb(142,142,142);border-radius:50%;':''),title:'Close'});i.innerHTML='×';g.appendChild(i);}a.appendChild(g);var o={mainContainer:a,container:g,cWidth:f,bottom:m};if(e)o.close=i;return o;},writeIframe:function(a,c,d){try{b.log('['+this.getTimeStamp()+'] '+h.logPrefix+': Seting html in try block.');var e=a.contentDocument||a.contentWindow.document;e.open();e.write(c);e.close();}catch(f){b.log(f);b.log('['+this.getTimeStamp()+'] '+h.logPrefix+': Seting html in catch block.');var g=document.createElement("input");this.setAttributes(g,{type:"hidden",name:"_adSenceImagePush_"+this.hiddenFieldCounter,id:"_adSenceImagePush_"+this.hiddenFieldCounter,value:d?d:"javascript:'"+c.replace(new RegExp("'",'g'),'"').replace(new RegExp('"','g'),'\\"')+"'"});(document.getElementsByTagName("body")[0]||document.documentElement).appendChild(g);this.setAttributes(a,{"src":document.getElementById('_adSenceImagePush_'+this.hiddenFieldCounter).value});this.hiddenFieldCounter++;(document.getElementsByTagName("body")[0]||document.documentElement).removeChild(g);}},putAd:function(a,b,c,d,e){var f=false,g=document.createElement('iframe'),i="height:"+c+"px !important; min-height:"+c+"px; width:"+b+"px !important; min-width: initial !important; overflow:hidden;margin:0 auto;position:relative; background: transparent; z-index: 999;max-width:initial !important;";this.setAttributes(g,{width:b,height:c,scrolling:"no",frameBorder:0,allowtransparency:true,"class":"_adSenceImagePush",loadStatus:0,"data-width":b,"data-height":c,style:i});a.appendChild(g);if(d.search('googletag')>-1){f=false;d+='';}this.writeIframe(g,''+d+'',"javascript:'"+d.replace(new RegExp("'",'g'),'"')+"'");e(g,f);},lazyPutAd:function(a,b){var c=this.bindEvent,d=this.unbindEvent;this.isContainerLoaded(a,function(a){var d=h.getOffset(a[0]),e=window.innerHeight,f=function(a){var c=((document.documentElement.scrollTop||document.body.scrollTop)+(e-1));if(c>d.y){h.unbindEvent(window,'scroll',f);b(true);}};c(window,'scroll',f);});},findContainer:function(a,c,d,e,f,g,i,j,k,l,m){b.log('['+this.getTimeStamp()+'] '+h.logPrefix+': findContainer function called.');var n,o=this.$,p=this.setAttributes,q=this.getOffset,r=this.makeContainer,s=this.measureWidth;this.isContainerLoaded(a,function(a){var b=[],t=0;for(;t0){var e=0,i;for(;e0&&(i.hasClass(h.prefixName+'MainAdContainer')||i.hasClass(h.prefixName+'MainAdContainerDiv')))f(i);}}d(true);});}else{f(a);d(true);}},reloadAd:function(a,c,d,e,f,g,i,j){var k=function(a){try{a.contentWindow.location.reload();}catch(b){}a.parentNode.removeChild(a);},l=1,m=this,n=0,o=false,p=null,q=function(a){var b=0;if(h.elementInViewport(d,g)){if(!p){p=window.setInterval(r,(c.focuscount-5000));o=true;}}else{o=false;window.clearInterval(p);p=null;}var b=0;};var r=function(){if(document.hasFocus())if(!(n==c.reloadcap)){n++;window.setTimeout(function(){var a=h.getElement(d,'iframe')[0];a.parentNode.removeChild(a);},5000);h.putAd(d,f,g,i,function(a,b){});if(n==1){window.clearInterval(p);p=null;p=window.setInterval(r,(c.focuscount));}}else h.unbindEvent(document,'scroll',q);};switch(a){case 'url':if(c.cc)m.urlHeightWatcher(undefined,function(a,b){if(l%c.cc==0){k(e);m.putAd(d,f,g,i,function(a,b){e=a;});}l++;j(b);});break;case 'attribute':if(c.cc&&c.elm&&c.attr)m.isContainerLoaded(c.elm,function(a){m.elementWatcher(a[0],c.attr,function(a,b){if(l%c.cc==0){k(e);m.putAd(d,f,g,i,function(a,b){e=a;});}l++;j(b);});});break;case 'click':if(c.cc&&c.elm){var s=function(a){if(l%c.cc==0){k(e);m.putAd(d,f,g,i,function(a,b){e=a;});}l++;j(a);};m.isContainerLoaded(c.elm,function(a){for(var b=0;b':i[m].tag;if((i[m].mode!='demo'||e)&&a[i[m].fnm]!==undefined)a[i[m].fnm](h.$,i[m]);if(i[m].mode=='demo')j++;else k++;}if(window._backupData===undefined)window._backupData={};if(window._backupData[c]===undefined)window._backupData[c]=i;else for(var m=0;m