if (typeof unsafeWindow == "undefined") unsafeWindow = window;
if (typeof site_name == "undefined") site_name = '';
if (typeof unsafeWindow.SNAP_COM == "undefined") unsafeWindow.SNAP_COM = {};
var SNAP_COM_skip_lists = false;
var SNAP_COM_urlBlacklist = new Array(
/^http:\/\/del\.icio\.us\/post\?/, //delicious post links
/\*\*http%3a\/\/rc[0-9]+\.overture\.com/, //yahoo ad redirects
/^http:\/\/feed(s|)\./, //all purpose feed link blocker
/http:\/\/([^\/]*\.)*aaafreebies\.com/,
/http:\/\/([^\/]*\.)*accelerator-media\.com/,
/http:\/\/([^\/]*\.)*ad-flow\.com/,
/http:\/\/([^\/]*\.)*adbrite\.com/,
/http:\/\/([^\/]*\.)*adintensity\.com/,
/http:\/\/([^\/]*\.)*adjuggler\.com/,
/http:\/\/([^\/]*\.)*adlegend\.com/,
/http:\/\/([^\/]*\.)*adreactor\.com/,
/http:\/\/([^\/]*\.)*adrevolver\.com/,
/http:\/\/([^\/]*\.)*adriver\.ru/,
/http:\/\/([^\/]*\.)*adsrevenue\.net/,
/http:\/\/([^\/]*\.)*adtech\.de/,
/http:\/\/([^\/]*\.)*adtology2\.com/,
/http:\/\/([^\/]*\.)*adultfriendfinder\.com/,
/http:\/\/([^\/]*\.)*advertising\.com/,
/http:\/\/([^\/]*\.)*afcyhf\.com/,
/http:\/\/([^\/]*\.)*akamai\.net/,
/http:\/\/([^\/]*\.)*allfreethings\.com/,
/http:\/\/([^\/]*\.)*amateurmatch\.com/,
/http:\/\/([^\/]*\.)*anrdoezrs\.net/,
/http:\/\/([^\/]*\.)*atdmt\.com/,
/http:\/\/([^\/]*\.)*ausdatahost\.com/,
/http:\/\/([^\/]*\.)*awltovhc\.com/,
/http:\/\/([^\/]*\.)*blogads\.com/,
/http:\/\/([^\/]*\.)*bluestreak\.com/,
/http:\/\/([^\/]*\.)*budsinc\.com/,
/http:\/\/([^\/]*\.)*bullz-eye\.com/,
/http:\/\/([^\/]*\.)*burstnet\.com/,
/http:\/\/([^\/]*\.)*casalemedia\.com/,
/http:\/\/([^\/]*\.)*checkm8\.com/,
/http:\/\/([^\/]*\.)*chitika\.net/,
/http:\/\/([^\/]*\.)*cjb\.net/,
/http:\/\/([^\/]*\.)*clickhype\.com/,
/http:\/\/([^\/]*\.)*clicksor\.com/,
/http:\/\/([^\/]*\.)*clicktorrent\.info/,
/http:\/\/([^\/]*\.)*cmpnet\.com/,
/http:\/\/([^\/]*\.)*com\.com/,
/http:\/\/([^\/]*\.)*cpxinteractive\.com/,
/http:\/\/([^\/]*\.)*crispads\.com/,
/http:\/\/([^\/]*\.)*datinggold\.com/,
/http:\/\/([^\/]*\.)*depositfiles\.com/,
/http:\/\/([^\/]*\.)*doubleclick\.net/,
/http:\/\/([^\/]*\.)*ebayobjects\.com/,
/http:\/\/([^\/]*\.)*eyewonder\.com/,
/http:\/\/([^\/]*\.)*falkag\.net/,
/http:\/\/([^\/]*\.)*fastclick\.net/,
/http:\/\/([^\/]*\.)*feedburner\.com/,
/http:\/\/([^\/]*\.)*filehostingreview\.com/,
/http:\/\/([^\/]*\.)*finestresults\.com/,
/http:\/\/([^\/]*\.)*firstadsolution\.com/,
/http:\/\/([^\/]*\.)*fmpub\.net/,
/http:\/\/([^\/]*\.)*fredericks\.com/,
/http:\/\/([^\/]*\.)*freesoftwaremagazine\.com/,
/http:\/\/([^\/]*\.)*freestuffonline\.com/,
/http:\/\/([^\/]*\.)*gambling\.com/,
/http:\/\/([^\/]*\.)*gonamic\.de/,
/http:\/\/([^\/]*\.)*googlesyndication\.com/,
/http:\/\/([^\/]*\.)*hbmediapro\.com/,
/http:\/\/([^\/]*\.)*imagevenue\.com/,
/http:\/\/([^\/]*\.)*intellitxt\.com/,
/http:\/\/([^\/]*\.)*isohunt\.com/,
/http:\/\/([^\/]*\.)*kontera\.com/,
/http:\/\/([^\/]*\.)*lduhtrp\.net/,
/http:\/\/([^\/]*\.)*linksynergy\.com/,
/http:\/\/([^\/]*\.)*mediaplex\.com/,
/http:\/\/([^\/]*\.)*netcraft\.com/,
/http:\/\/([^\/]*\.)*omg2\.com/,
/http:\/\/([^\/]*\.)*onthebox\.com/,
/http:\/\/([^\/]*\.)*ookla\.com/,
/http:\/\/([^\/]*\.)*orangoo\.com/,
/http:\/\/([^\/]*\.)*overture\.com/,
/http:\/\/([^\/]*\.)*peel\.com/,
/http:\/\/([^\/]*\.)*playfuls\.com/,
/http:\/\/([^\/]*\.)*precisionclick\.com/,
/http:\/\/([^\/]*\.)*reduxmedia\.com/,
/http:\/\/([^\/]*\.)*revenue\.net/,
/http:\/\/([^\/]*\.)*revsci\.net/,
/http:\/\/([^\/]*\.)*rmxads\.com/,
/http:\/\/([^\/]*\.)*serving-sys\.com/,
/http:\/\/([^\/]*\.)*softpedia\.com/,
/http:\/\/([^\/]*\.)*streamray\.com/,
/http:\/\/([^\/]*\.)*sublimemedia\.net/,
/http:\/\/([^\/]*\.)*targetpoint\.com/,
/http:\/\/([^\/]*\.)*thefreeguide\.com/,
/http:\/\/([^\/]*\.)*thefreesite\.com/,
/http:\/\/([^\/]*\.)*thefreestuffgallery\.com/,
/http:\/\/([^\/]*\.)*todaysfreevideo\.com/,
/http:\/\/([^\/]*\.)*torrentsearchx\.com/,
/http:\/\/([^\/]*\.)*tqlkg\.com/,
/http:\/\/([^\/]*\.)*tracking101\.com/,
/http:\/\/([^\/]*\.)*tradedoubler\.com/,
/http:\/\/([^\/]*\.)*trafficmp\.com/,
/http:\/\/([^\/]*\.)*tribalfusion\.com/,
/http:\/\/([^\/]*\.)*ucas\.com/,
/http:\/\/([^\/]*\.)*usacasino\.com/,
/http:\/\/([^\/]*\.)*valencemedia\.com/,
/http:\/\/([^\/]*\.)*vnunet\.com/,
/http:\/\/([^\/]*\.)*yceml\.net/,
/http:\/\/([^\/]*\.)*yieldmanager\.com/,
/http:\/\/([^\/]*\.)*yieldx\.com/,
/http:\/\/([^\/]*\.)*zanox\.com/,
/http:\/\/([^\/]*\.)*zdnet\.com/,
/http:\/\/([^\/]*\.)*zeads\.com/);
var SNAP_COM_urlWhitelist = new Array();
function SNAP_COM_matchesList(needle, haystack){
var length = haystack.length;
for (var x=0; x < length; x++) {
if(needle.match(haystack[x])) return true;
}
return false;
}
function SNAP_COM_checkListLinks(url){
if(SNAP_COM_matchesList(url, SNAP_COM_urlWhitelist)){
return "white";
}else{
if(SNAP_COM_matchesList(url, SNAP_COM_urlBlacklist)) return "black";
}
return false;
}
//Shots profile includes
function addClassName(element, name){
var e = element;
//if this is a string, we assume it's an element's ID
if(typeof(element) == "string") e = document.getElementById(element);
if(e){
if(!classNameMatch(name, e)) e.className += " " + name;
}
}
function activateElement(elementID){
addClassName(elementID, "snap_shots");
}
function deactivateElement(elementID){
addClassName(elementID, "snap_noshots");
}
function addClassNameByClass(newClassName, oldClassName, tag, element) {
element = element || document;
tag = tag || "*";
var elements = element.getElementsByTagName(tag);
var l = elements.length;
for (var i = 0; i < l; i++) {
if(classNameMatch(oldClassName, elements[i])) addClassName(elements[i], newClassName);
}
}
function classNameMatch(needle, element){
if(!element.className) return false;
var className = " " + element.className + " ";
if(className.indexOf(" " + needle + " ") == -1){
return false;
}else{
return true;
}
}
function activateElementByClass(className, tag, element) {
addClassNameByClass("snap_shots", className, tag, element);
}
function deactivateElementByClass(className, tag, element) {
addClassNameByClass("snap_noshots", className, tag, element);
}
function SNAP_COM_getTLDFromUrl(url){
var return_domain = false;
try{
var result = url.match(/^http:\/\/([^\/]+)/);
var full_hostname = result[1];
if(full_hostname.match(/\.co\..+/)){
return_domain = full_hostname.match(/[^\.]+\.co\.[^\.]+$/)[0];
}else{
return_domain = full_hostname.match(/[^\.]+\.[^\.]+$/)[0];
}
}catch(e){
}
return return_domain;
}
function SNAP_COM_enable_external_links_in_class(className, tld, element, elementType){
element = element || document;
elementType = elementType || "div";
var divs = element.getElementsByTagName(elementType);
var total_divs = divs.length;
var changed = false;
//find actual divs to disable within
for (var i = 0; i < total_divs; i++) {
if (divs[i].className.indexOf(className) != -1){
var links = divs[i].getElementsByTagName('a');
//disable the internal links
for (var l=0, pos=0; l < links.length; l++) {
if(links[l].href.indexOf(tld) == -1 && SNAP_COM_checkListLinks(links[l].href) != "black"){
var classN = links[l].className;
activateElement(links[l]);
if(classN != links[l].className) changed = true;
}
}
}
}
if(changed && unsafeWindow.SNAP_COM.shot) unsafeWindow.SNAP_COM.shot.Rescan();
}
var inFrame = true;
var frameOk = false;
try{
frameOk = frameOverride;
} catch(e) {};
if(frameOk){
inFrame = false;
}else{
try {
inFrame = location.href != top.location.href;
} catch(e) {};
}
var doc_body_array = document.getElementsByTagName("body");
if(doc_body_array){
doc_body = doc_body_array[0];
if (doc_body && (!inFrame) ){
var shots = document.createElement('script');
shots.type = 'text/javascript';
shots.src = shots_url + "&plugin=1";
doc_body.appendChild(shots);
unsafeWindow.SNAP_COM.clientActive = true;
}
}
function SNAP_COM_process_link_lists(){
var links = document.getElementsByTagName('a');
var links_length = links.length;
for (var l=0; l < links_length; l++) {
var list = SNAP_COM_checkListLinks(links[l].href);
if(list == "white") activateElement(links[l]);
if(list == "black") deactivateElement(links[l]);
}
}
if(!SNAP_COM_skip_lists) SNAP_COM_process_link_lists();