
Function.NoOp = function(a) { return (a); }
if (!window.BtvOverlay) window.BtvOverlay = {};
(function(){
if (!BtvOverlay.Util) BtvOverlay.Util = {};
BtvOverlay.Util.ArrayToHash = function(a, fnc)
{
fnc = fnc || Function.NoOp;
var ht = {};
for (var i = 0; a && (i < a.length); i++) ht[fnc(a[i])] = true;
return (ht);
}
BtvOverlay.Util.ToLowerCase = function(s)
{
return(s.toLowerCase());
}
BtvOverlay.Util.ToUpperCase = function(s)
{
return(s.toUpperCase());
}
var re = new RegExp("[\\[\\]{}\\\\|().*+?\^\$]", "g");
BtvOverlay.Util.RegExpEscape = function(s)
{
return s.replace(re, "\\$&");
}
})();
BtvOverlay.Dom = new function()
{
var oThis = this;
oThis.Traverse = function(oNode, fnc, fncStop)
{
function Loop()
{
while (aNodesToSearch.length > 0)
{
if (iDelayIterations++ == 100)
{
iDelayIterations = 0;
window.setTimeout(Loop, 10);
fncStop(true);
return;
}
else
{
oNode = aNodesToSearch[aNodesToSearch.length-1];
if (oNode == aParentNodes[aParentNodes.length-1])
{
aParentNodes.pop();
aNodesToSearch.pop();
fnc(oNode, false);
}
else
{
if (!fnc(oNode, true) && oNode.childNodes.length)
{
aParentNodes.push(oNode);
for (var i = oNode.childNodes.length - 1; i >= 0; i--)
{
aNodesToSearch.push(oNode.childNodes[i]);
}
}
else
{
aNodesToSearch.pop();
fnc(oNode, false)
}
}
}
}
fncStop(false);
}
var iDelayIterations = 0;
var aNodesToSearch = oNode ? [oNode] : [];
var aParentNodes = [];
Loop();
}
oThis.FindNodes = function(oNode, aNodeTypes, oRules, fncCallback)
{
function Nodify(oNode, bln)
{
if (bln)
{
var iType = oNode.nodeType;
if (iInclude && htNodeTypes[iType]) aTextNodes.push(oNode);
if (iType != 1) return(true);
var id = oNode.getAttribute("id");
if (lookup[0] && lookup[0].ids[id]) return(true);
var strTagName = oNode.tagName;
if (lookup[0] && lookup[0].tags[strTagName]) return(true);
var strClasses = oNode.className;
if (lookup[0] && lookup[0].classes[strClasses]) return(true);
if (lookup[1] && (lookup[1].tags[strTagName] || lookup[1].ids[id] || lookup[1].classes[strClasses]))
{
aIncludeNodes.push(oNode);
iInclude++;
}
return(false);
}
else
{
if (aIncludeNodes.length && (aIncludeNodes[aIncludeNodes.length-1] == oNode))
{
aIncludeNodes.pop();
iInclude--;
}
}
}
function Stop(bln)
{
fncCallback(aTextNodes, bln);
aTextNodes = [];
}
function CreateLookup()
{
var lookup = [];
if (oRules.oExclude) lookup[0] = {
tags: ath(oRules.oExclude.aTags, BtvOverlay.Util.ToUpperCase)
,ids: ath(oRules.oExclude.aIds)
,classes: ath(oRules.oExclude.aClasses)
};
if (oRules.oInclude) lookup[1] = {
tags: ath(oRules.oInclude.aTags, BtvOverlay.Util.ToUpperCase)
,ids: ath(oRules.oInclude.aIds)
,classes: ath(oRules.oInclude.aClasses)
};
return(lookup);
}
oRules.aNodeTypes = aNodeTypes;
var iInclude = oRules.oInclude ? 0 : 1;
var ath = BtvOverlay.Util.ArrayToHash;
var htNodeTypes = BtvOverlay.Util.ArrayToHash(oRules.aNodeTypes);
var lookup = CreateLookup();
var aIncludeNodes = [];
var aTextNodes = [];
BtvOverlay.Dom.Traverse(oNode, Nodify, Stop);
}
};
BtvOverlay.Dom.Tokenizer = new function()
{
var oThis = this;
oThis.Run = function(oNode, astrKeywords, htTermsData, oRules, strTermColor, fnc)
{
function RunSet(aNodes, astrKeywords, fnc)
{
function BuildReplacement(oNode, strText, aMatches)
{
function InAnchor()
{
var o = oNode;
while (o.parentNode)
{
if (o.parentNode.tagName && (o.parentNode.tagName.toLowerCase() == "a")) return(true);
o = o.parentNode
}
return(false);
}
function Adorn(str)
{
var span = document.createElement("foo");
if (!span.addEventListener) span.style.position = "relative";
span.style.display = "inline";
span.style.textDecoration = "underline";
span.style.borderBottom = "solid 1px " + strTermColor;
if (!span.addEventListener) span.style.top = "1px";
span.style.cursor = "pointer";
span.style.zoom = 1;
fnc(span, str);
span.innerHTML = str;
return (span);
}
function CheckSpan(span)
{
var str = span.innerHTML;
span.innerHTML = '&nbsp;';
var iOneLineHeight = span.offsetHeight;
span.innerHTML = str;
var iEntireHeight = span.offsetHeight;
span._blnWrap = (iEntireHeight > (1.5 * iOneLineHeight));
}
function CreateIcon(str)
{
var img = document.createElement('img');
img.src = '/images/overlay-action.png';
img.style.borderWidth = '0px';
img.style.display = 'inline';
//img.style.verticalAlign = 'text-bottom';
img.style.padding = '1px 0px 0px 4px';
img.style.margin = '0px';
img.style.cursor = "pointer";
img.style.zoom = 1;
img.__blnOverlay = true;
fnc(img, str);
return(img);
}
if (!oNode.parentNode) return;
for (var i=0; i < oNode.parentNode.childNodes.length; i++)
{
if (oNode.parentNode.childNodes[i].__blnOverlay) return;
}
var iStart = 0;
for (var i = 0; i < aMatches.length; i++)
{
var strMatch = aMatches[i][0];
var strTerm = aMatches[i][1];
if (true)
{
var iPlainTextLength = aMatches[i].index + strMatch.indexOf(strTerm);
var textNode = document.createTextNode(strText.substring(iStart, iPlainTextLength));
oNode.parentNode.insertBefore(textNode, oNode);
var span = Adorn(strTerm);
oNode.parentNode.insertBefore(span, oNode);
CheckSpan(span);
iStart = iPlainTextLength + strTerm.length;
}
else
{
var iPlainTextLength = aMatches[i].index + strMatch.indexOf(strTerm) + strTerm.length;
var textNode = document.createTextNode(strText.substring(iStart, iPlainTextLength));
oNode.parentNode.insertBefore(textNode, oNode);
oNode.parentNode.insertBefore(CreateIcon(strTerm), oNode);
iStart = iPlainTextLength;
}
}
var textNode = document.createTextNode(strText.substring(iStart));
oNode.parentNode.insertBefore(textNode, oNode);
oNode.parentNode.removeChild(oNode);
}
function SortKeywords(s1, s2)
{
var i1 = s1.length;
var i2 = s2.length;
return((i1 < i2) ? 1 : ((i1 > i2) ? -1 : 0));
}
astrKeywords.sort(SortKeywords);
var aReKeywords = [];
for (var i=0; i < astrKeywords.length; i++)
{
aReKeywords.push(BtvOverlay.Util.RegExpEscape(astrKeywords[i]));
}
var reSearch = new RegExp("(?:^|[^0-9A-Za-z])(" + aReKeywords.join('|') + ")([^0-9A-Za-z]|$)", "g");
var aMatch;
var aMatches;
var strTerm;
for (var i = 0; i < aNodes.length; i++)
{
aMatches = null;
var str = aNodes[i].nodeValue;
while ((aMatch = reSearch.exec(str)) != null)
{
aMatches = aMatches || [];
strTerm = aMatch[1];
if (!htTermMatches[strTerm]) htTermMatches[strTerm] = 0;
if (!htTermsData[strTerm] || (htTermsData[strTerm].MaxCount <= 0) || (htTermMatches[strTerm] < htTermsData[strTerm].MaxCount))
{
htTermMatches[strTerm]++;
aMatches.push(aMatch);
}
if (aMatch[2]) reSearch.lastIndex -= 1;
}
if (aMatches) BuildReplacement(aNodes[i], str, aMatches);
}
}
function HaveNodes(aTextNodes, bln)
{
RunSet(aTextNodes, astrKeywords, fnc);
if (!bln)
{
var dtEnd = (new Date()).valueOf();
//alert(dtEnd - dtStart);
}
}
var dtStart = (new Date()).valueOf();
if (!oRules.oExclude) oRules.oExclude = {};
if (!oRules.oExclude.aTags) oRules.oExclude.aTags = [];
if (!oRules.oExclude.aClasses) oRules.oExclude.aClasses = [];
oRules.oExclude.aTags.push("script");
oRules.oExclude.aTags.push("foo");
oRules.oExclude.aTags.push("textarea");
oRules.oExclude.aClasses.push("nooverlay", "btv_orange_button", "article_page_title");
var htTermMatches = {};
var aTextNodes = BtvOverlay.Dom.FindNodes(oNode, [3], oRules, HaveNodes);
}
};
(function()
{
var oOverlayData = {"data":[{"Url":"steffanie-walk.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Steffanie-Walk.jpg","Term":"Steffanie Walk","ID":10000304,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"steven-richardson.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Steven-Richardson.jpg","Term":"Steven Richardson","ID":10000310,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"sirbrina-guerrero.aspx","PhotoCount":1,"Rank":2299,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Sirbrina-Guerrero.jpg","Term":"Sirbrina Guerrero","ID":10000295,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"scout-durwood.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Scout-Durwood.jpg","Term":"Scout Durwood","ID":10000282,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"serenity-eve-sells.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Serenity-Eve-Sells.jpg","Term":"Serenity Eve Sells","ID":10000284,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"tarra-marie-lange.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Tarra-Marie-Lange.jpg","Term":"Tarra Marie Lange","ID":10000323,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-ben.aspx","PhotoCount":1951,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_1-ben.jpg","Term":"Ben","ID":40000213,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"coop.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_2-coop.jpg","Term":"Coop","ID":40000214,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"vikki-and-rikki.aspx","PhotoCount":27,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_ikkitwins.jpg","Term":"Vikki and Rikki","ID":40000156,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"v-amoretti.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/V-Amoretti.jpg","Term":"V Amoretti","ID":10000355,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"vanessa-romanelli.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Vanessa-Romanelli.jpg","Term":"Vanessa Romanelli","ID":10000361,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"rami-najjar.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Rami-Najjar.jpg","Term":"Rami Najjar","ID":10000245,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"rebecca-hollis.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Rebecca-Hollis.jpg","Term":"Rebecca Hollis","ID":10000247,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"rada-sims.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Rada-Sims.jpg","Term":"Rada Sims","ID":10000244,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"michelle-hart.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Michelle-Hart.jpg","Term":"Michelle Hart","ID":10000190,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"nick-ballard.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Nick-Ballard.jpg","Term":"Nick Ballard","ID":10000214,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"rob-armandi.aspx","PhotoCount":1,"Rank":2509,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Rob-Armandi.jpg","Term":"Rob Armandi","ID":10000256,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"sara-shaban.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Sara-Shaban.jpg","Term":"Sara Shaban","ID":10000278,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"scott-dickert.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Scotty-Dickert.jpg","Term":"Scotty Dickert","ID":10000281,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"samantha-michlig.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Samantha-Michlig.jpg","Term":"Samantha Michlig","ID":10000274,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"ryan-creighton.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Ryan-Creighton.jpg","Term":"Ryan Creighton","ID":10000265,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"ryan-kropski.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Ryan-Kropski.jpg","Term":"Ryan Kropski","ID":10000267,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"elise.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_17-elise.jpg","Term":"Elise","ID":40000229,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-jen.aspx","PhotoCount":3,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_18-jen.jpg","Term":"Jen","ID":40000230,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"dana.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_16-dana.jpg","Term":"Dana","ID":40000228,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-bella.aspx","PhotoCount":484,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_14-bella.jpg","Term":"Bella","ID":40000226,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-claudia.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_15-claudia.jpg","Term":"Claudia","ID":40000227,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"kandi.aspx","PhotoCount":1,"Rank":1862,"ImageSrc":"/usrimages/usr-1/-1_-1_19-kandi.jpg","Term":"Kandi","ID":40000231,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"rosemarie.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_23-rosemarie.jpg","Term":"Rosemarie","ID":40000235,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"xoe.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_24-xoe.jpg","Term":"Xoe","ID":40000236,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"rebekah.aspx","PhotoCount":4,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_22-rebekah.jpg","Term":"Rebekah","ID":40000234,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"kali.aspx","PhotoCount":1,"Rank":2543,"ImageSrc":"/usrimages/usr-1/-1_-1_20-kali.jpg","Term":"Kali","ID":40000232,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"nicky.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_21-nicky.jpg","Term":"Nicky","ID":40000233,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-james.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_6-james.jpg","Term":"James","ID":40000218,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-matt.aspx","PhotoCount":2,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_7-matt.jpg","Term":"Matt","ID":40000219,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-josh.aspx","PhotoCount":2,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_5-josh.jpg","Term":"Josh","ID":40000217,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-david.aspx","PhotoCount":741,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_3-david.jpg","Term":"David","ID":40000215,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"freddy.aspx","PhotoCount":631,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_4-freddy.jpg","Term":"Freddy","ID":40000216,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"fazio.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_8-fazio.jpg","Term":"Fazio","ID":40000220,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-trevor.aspx","PhotoCount":131,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_12-trevor.jpg","Term":"Trevor","ID":40000224,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-angela.aspx","PhotoCount":2,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_13-angela.jpg","Term":"Angela","ID":40000225,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-scott.aspx","PhotoCount":683,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_11-scott.jpg","Term":"Scott","ID":40000223,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-paul.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_9-paul.jpg","Term":"Paul","ID":40000221,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"shot-at-love-nick.aspx","PhotoCount":2,"Rank":2661,"ImageSrc":"/usrimages/usr-1/-1_-1_10-nick.jpg","Term":"Nick","ID":40000222,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"grace.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Grace-Soriano.jpg","Term":"Grace Soriano","ID":12157,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"amanda-3.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Amanda-Ireton.jpg","Term":"Amanda Ireton","ID":12160,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"ellie.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Ellie-Heagney.jpg","Term":"Ellie Heagney","ID":12155,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"brandi.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Brandi-Ryan.jpg","Term":"Brandi Ryan","ID":12151,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"dani.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Dani-Campbell.jpg","Term":"Dani Campbell","ID":12153,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"ashli.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Ashli-Haynes.jpg","Term":"Ashli Haynes","ID":12162,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"janny.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Janny-Tran.jpg","Term":"Janny Tran","ID":18392,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"fame.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Fame-Guzman.jpg","Term":"Fame Guzman","ID":18393,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"lauryn.aspx","PhotoCount":115,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Lauryn.jpg","Term":"Lauryn","ID":18390,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"tila-tequila.aspx","PhotoCount":96,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Tila-Tequila.jpg","Term":"Tila Tequila","ID":12163,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"tashi.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Tashi.jpg","Term":"Tashi","ID":18381,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"ben-1.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Ben-Boshnack.jpg","Term":"Ben Boshnack","ID":12132,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"domenico.aspx","PhotoCount":46,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Domenico-Nesci.jpg","Term":"Domenico Nesci","ID":12134,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"alex-1.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Alex-Larson.jpg","Term":"Alex Larson","ID":12130,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"greg-2.aspx","PhotoCount":3,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Greg-Gildea.jpg","Term":"Greg Gildea","ID":12126,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"ashley.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Ashley-McNeely.jpg","Term":"Ashley McNeely","ID":12128,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"bobby.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Bobby-Banhart.jpg","Term":"Bobby Banhart","ID":12137,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"eric-3.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Eric-Bayliss.jpg","Term":"Eric Bayliss","ID":12145,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"eddie.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Eddie-Kaulukukui.jpg","Term":"Eddie Kaulukukui","ID":12147,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"chaos.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Chaos-Krieger.jpg","Term":"Chaos Krieger","ID":12143,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"brenda-1.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Brenda-Teti.jpg","Term":"Brenda Teti","ID":12140,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"michael-r.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Michael-R.jpg","Term":"Michael R.","ID":12142,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"lala-thomas.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Lala-Thomas.jpg","Term":"Lala Thomas","ID":10000111,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"lance-brown.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Lance-Brown.jpg","Term":"Lance Brown","ID":10000112,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"kyle-smigielski.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Kyle-Smigielski.jpg","Term":"Kyle Smigielski","ID":10000108,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"kristy-morgan.aspx","PhotoCount":29,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Kristy-Morgan.jpg","Term":"Kristy Morgan","ID":10000104,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"krystal-white.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Krystal-White.jpg","Term":"Krystal White","ID":10000106,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"lili-fuentes.aspx","PhotoCount":1,"Rank":2244,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Lili-Fuentes.jpg","Term":"Lili Fuentes","ID":10000124,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"matt-liebman.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Matt-Liebman.jpg","Term":"Matt Liebman","ID":10000166,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"michael-buonanno.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Michael-Buonanno.jpg","Term":"Michael Buonanno","ID":10000185,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"mason-sharrow.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Mason-Sharrow.jpg","Term":"Mason Sharrow","ID":10000162,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"lisa-rizzo.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Lisa-Rizzo.jpg","Term":"Lisa Rizzo","ID":10000131,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"marcus-foy.aspx","PhotoCount":9,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Marcus-Foy.jpg","Term":"Marcus Foy","ID":10000147,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"greg-4.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Greg-Perrin.jpg","Term":"Greg Perrin","ID":18403,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"george.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/George-Martinez.jpg","Term":"George Martinez","ID":18404,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"jay.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Jay-Erlich.jpg","Term":"Jay Erlich","ID":18402,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"brittany-2.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Brittany-Rae-Leach.jpg","Term":"Brittany Rae Leach","ID":18394,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"jeremy.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Jeremy-Miller.jpg","Term":"Jeremy Miller","ID":18401,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"dominic-1.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Dominic-Perrin.jpg","Term":"Dominic Perrin","ID":18405,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"bo.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Bo-Kunkle.jpg","Term":"Bo Kunkle","ID":18409,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"keasha-mendez.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Keasha-Mendez.jpg","Term":"Keasha Mendez","ID":10000079,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"chad.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Chad-Tulik.jpg","Term":"Chad Tulik","ID":18408,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"christian-1.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Christian-Garcia.jpg","Term":"Christian Garcia","ID":18406,"RelatedID":1000378,"Scope":0,"MaxCount":3},{"Url":"chris-3.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/a-shot-at-love-with-tila-tequila/profile/Chris-Mythil.jpg","Term":"Chris Mythil","ID":18407,"RelatedID":1000378,"Scope":0,"MaxCount":3}]};
var oExcludeData = {"Ids":null,"Tags":["h2"],"Classes":["wiki-text"]};
var oIncludeData = {"Ids":null,"Tags":null,"Classes":["content-col"]};
var strTermColor = null || "#999999";
var strBaseUrl = '';
var oRules = {};
if (oExcludeData)
{
oRules.oExclude = {
aIds: oExcludeData.Ids || []
,aTags: oExcludeData.Tags || []
,aClasses: oExcludeData.Classes || []
};
}
if (oIncludeData)
{
oRules.oInclude = {
aIds: oIncludeData.Ids || []
,aTags: oIncludeData.Tags || []
,aClasses: oIncludeData.Classes || []
};
}
var afncCastOverlayBuilders = {};
afncCastOverlayBuilders[0] = function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('<div id=\"divHoverHandle');_write(Term);_write('\" style=\"width:285px;background:url(\'');_write(strBaseUrl);_write('/images/pop-shadow.png\');zoom:1;\">\n<div style=\"border:1px solid #666666; background:#eeeeee; font-size:11px;  padding:7px; position:relative;bottom:3px;right:3px;zoom:1;\">\n<a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\"><img src=\"http://www.buddytv.com');_write(ImageSrc);_write('\" style=\"border:none;width:92px;float:left;margin-right:5px;\"/></a>\n<div style=\"float:right;width:165px;zoom:1;\">\n<div style=\"font-size:16px;font-weight:bold;margin:-2px 0px 5px 0px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\">');_write(Term);_write('</a></div>\n<div style=\"margin-bottom:2px;zoom:1;\">Today’s Ranking: ');_write(Rank);_write('</div>\n<div style=\"margin-bottom:3px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=21&ctxid=');_write(ID);_write('&pid=21&pnum=-1\">View Photos</a></div>\n<div style=\"zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=21&ctxid=');_write(ID);_write('&pid=28&pnum=-1\">Rate now &raquo;</a></div>\n</div>\n<div style=\"clear:both;\"></div>\n</div>\n</div>');}return $text.join("");};
afncCastOverlayBuilders[1] = function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('<div id=\"divHoverHandle');_write(Term);_write('\" style=\"width:285px;background:url(\'');_write(strBaseUrl);_write('/images/pop-shadow.png\'); zoom:1;\">\n<div style=\"border:1px solid #666666; background:#eeeeee; font-size:11px;  padding:7px; position:relative;bottom:3px;right:3px;zoom:1;\">\n<a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\"><img src=\"http://www.buddytv.com');_write(ImageSrc);_write('\" style=\"border:none;width:92px;float:left;margin-right:5px;\"/></a>\n<div style=\"float:right;width:165px;zoom:1;\">\n<div style=\"font-size:16px;font-weight:bold;margin:-2px 0px 5px 0px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\">');_write(Term);_write('</a></div>\n<div style=\"margin-bottom:2px;zoom:1;\">Today’s Ranking: ');_write(Rank);_write('</div>\n<div style=\"margin-bottom:3px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=-1000&ctxid=');_write(ID);_write('&pid=21&pnum=-1\">View Photos (');_write(PhotoCount);_write(')</a></div>\n<div style=\"margin-bottom:3px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=-1000&ctxid=');_write(ID);_write('&pid=35&pnum=-1\">Play Trivia &raquo;</a></div>\n</div>\n<div style=\"clear:both;\"></div>\n</div>\n</div>');}return $text.join("");};
function Run()
{
function GiveElementLayout(el)
{
if (el && !el.hasLayout) el.style.zoom = 1;
}
function GetWindowPosition()
{
function f(p1, p2)
{
var iWin = window[p1] ? window[p1] : 0;
var iDocEl = document.documentElement ? document.documentElement[p2] : 0;
var iBody = document.body ? document.body[p2] : 0;
var i = iWin ? iWin : 0;
if (iDocEl && (!i || (i > iDocEl))) i = iDocEl;
return(iBody && (!i || (i > iBody)) ? iBody : i);
}
var iW = f('innerWidth', 'clientWidth');
var iH = f('innerHeight', 'clientHeight');
var iL = f('pageXOffset', 'scrollLeft');
var iT = f('pageYOffset', 'scrollTop');
return({t:iT, r:(iW + iL), b:(iH + iT), l:iL});
}
function GetElPosition(el)
{
var pt = GetAbsPos(el);
return({t:pt.y, r:(pt.x + el.offsetWidth), b:(pt.y + el.offsetHeight), l:pt.x});
}
function GetOverlayPlacementPoint(elContext, elOverlay)
{
var elPos = GetElPosition(elContext);
var wndPos = GetWindowPosition();
var iSpace = 10;
var posSpace = {t:(elPos.t - wndPos.t - iSpace), r:(wndPos.r - elPos.r - iSpace), b:(wndPos.b - elPos.b - iSpace), l:(elPos.l - wndPos.l - iSpace)};
var iW = elOverlay.offsetWidth;
var iH = elOverlay.offsetHeight;
var pt = {x:wndPos.l, y:wndPos.t};
if (posSpace.t >= iH)
{
pt.y = elPos.t - iH;
}
else if (posSpace.b >= iH)
{
pt.y = elPos.b;
}
if (posSpace.r >= iW)
{
pt.x = elPos.r;
}
else if (posSpace.l >= iW)
{
pt.x = elPos.l - iW;
}
//pt.y += 3;
return(pt);
}
function AdjustPlacementPoint(pt, elOverlay)
{
var iW = elOverlay.offsetWidth;
var iH = elOverlay.offsetHeight;
var posOverlay = {t:pt.y, r:(pt.x + iW), b:(pt.y + iH), l:pt.x};
var wndPos = GetWindowPosition();
var iSpace = 10;
var posSpace = {t:(posOverlay.t - wndPos.t - iSpace), r:(wndPos.r - posOverlay.r - iSpace), b:(wndPos.b - posOverlay.b - iSpace), l:(posOverlay.l - wndPos.l - iSpace)};
if (posSpace.r < 0)
{
pt.x += posSpace.r;
}
else if (posSpace.l < 0)
{
pt.x += (0 - posSpace.l);
}
if (posSpace.t < 0)
{
pt.y += (0 - posSpace.t);
}
else if (posSpace.b < 0)
{
pt.y += posSpace.b;
}
return(pt);
}
function GetAbsPos(element)
{
function F(el)
{ 
var pt = {x:0,y:0};
if (el)
{ 
GiveElementLayout(el); 
pt.x += el.offsetLeft;
pt.y += el.offsetTop; 
var elOffset = el.offsetParent;
var elParent = el.parentNode;
while (elOffset)
{
GiveElementLayout(elOffset);
pt.x += elOffset.offsetLeft; 
pt.y += elOffset.offsetTop; 
if ((document.body != elOffset) && (document.documentElement != elOffset))
{ 
pt.x -= elOffset.scrollLeft; 
pt.y -= elOffset.scrollTop; 
} 
if (false && blnFirefox)
{ 
while (elParent && (elOffset != elParent))
{ 
pt.x -= elParent.scrollLeft; 
pt.y -= elParent.scrollTop; 
elParent = elParent.parentNode; 
}
} 
elParent = elOffset.parentNode;
elOffset = elOffset.offsetParent; 
} 
} 
return pt; 
} 
var blnFirefox = !!element.addEventListener;
if (!blnFirefox)
{
F(element, blnFirefox);
}
return(F(element, blnFirefox));
}
function AddEvent(obj, type, fn)
{
if (obj.addEventListener)
{
obj.addEventListener(type, fn, false);
}
else if (obj.attachEvent)
{
obj["e" + type + fn] = fn;
obj[type + fn] = function() { obj["e" + type + fn](window.event); }
obj.attachEvent("on" + type, obj[type + fn]);
}
}
function GetOverlayNode(strTerm)
{
if (!htOverlays[strTerm])
{
var oData = htTermsData[strTerm];
var strOverlayHtml = afncCastOverlayBuilders[oData.Scope](oData);
var div = document.createElement("div");
div.innerHTML = strOverlayHtml;
htOverlays[strTerm] = div.childNodes[0];
}
return(htOverlays[strTerm]);
}
function ShowOverlay(oNode, strTerm, pt)
{
blnNeedEventHookup = !htOverlays[strTerm];
HideCurrentOverlay(true);
elCurrentOverlay = GetOverlayNode(strTerm);
divOverlay.appendChild(elCurrentOverlay);
document.body.appendChild(divOverlay);
if (blnNeedEventHookup)
{
var elHandler = document.getElementById("divHoverHandle" + strTerm);
AddEvent(elHandler, blnIsIE ? "mouseenter" : "mouseover", OverlayOver);
AddEvent(elHandler, blnIsIE ? "mouseleave" : "mouseout", CommonOut);
}
var oPoint = GetAbsPos(oNode);
var overlayPt = GetOverlayPlacementPoint(oNode, divOverlay);
if (oNode._blnWrap)
{
overlayPt.x = pt.x - divOverlay.offsetWidth;
AdjustPlacementPoint(overlayPt, divOverlay);
}
divOverlay.style.visibility = "hidden";
divOverlay.style.top = overlayPt.y + "px";
divOverlay.style.left = overlayPt.x + "px";
divOverlay.style.visibility = "visible";
}
function MouseCoordinates(evt)
{
if (blnIsIE)
{
var oPoint = GetAbsPos(evt.srcElement);
return({x:(evt.x + oPoint.x), y:(evt.y + oPoint.y)});
}
else
{
return({x:evt.pageX, y:evt.pageY});
}
}
function HideCurrentOverlay(bln)
{
function F()
{
if ((elCurrentOverlay) && (iCounter_local == iCounter) && (!iOverCount))
{
iOverCount = 0;
divOverlay.removeChild(elCurrentOverlay);
divOverlay.parentNode.removeChild(divOverlay);
elCurrentOverlay = null;
}
}
iCounter++;
var iCounter_local = iCounter;
if (bln)
{
iOverCount= 0;
F();
}
else
{
window.setTimeout(F, 400);
}
}
var iCounter = 0;
if (Btv && Btv.Ads)
{
//Btv.Ads.onChangeRequest.Attach(RunFromBody);
}
var elCurrentOverlay;
var htOverlays = {};
function HookupTerm(oNode, strTerm)
{
function Over(evt)
{
ShowOverlay(oNode, strTerm, MouseCoordinates(evt));
iOverCount++;
}
AddEvent(oNode, blnIsIE ? "mouseenter" : "mouseover", Over);
AddEvent(oNode, blnIsIE ? "mouseleave" : "mouseout", CommonOut);
AddEvent(oNode, "click", function(){HideCurrentOverlay(true);});
}
function OverlayOver()
{
iOverCount++;
}
function CommonOut()
{
iOverCount--;
HideCurrentOverlay();
}
var iOverCount = 0; 
var divOverlay = document.createElement('div');
divOverlay.style.position = "absolute";
divOverlay.style.zIndex = "9999";
var blnIsIE = !divOverlay.addEventListener;
var astrTerms = [];
var htTermsData = {};
function ProcessOverlayData()
{
for (var i=0; i < oOverlayData.data.length; i++)
{
if (!htTermsData[oOverlayData.data[i].Term])
{
astrTerms.push(oOverlayData.data[i].Term);
htTermsData[oOverlayData.data[i].Term] = oOverlayData.data[i];
oOverlayData.data[i].strBaseUrl = "";
}
}
}
ProcessOverlayData();
window["RunBtvTokenizer"] = function(el, oOverlayData_)
{
if (oOverlayData_)
{
oOverlayData.data = oOverlayData_;
ProcessOverlayData();
} 
if (el)
{
if (astrTerms.length > 0) BtvOverlay.Dom.Tokenizer.Run(el, astrTerms, htTermsData, oRules, strTermColor, HookupTerm);
blnPending = false;
}
else
{
Refresh();
}
}
function RunFromBody()
{
RunBtvTokenizer(document.body);
}
function TimedRun()
{
if (blnPending) RunFromBody();
}
function Refresh()
{
if (!blnPending)
{
blnPending = true;
window.setTimeout(TimedRun, 1000);
}
}
var blnPending = true;
if (true)
{
if (window["YAHOO"] && YAHOO.Btv && YAHOO.Btv.Runtime && YAHOO.Btv.Runtime.RegisterOnInit)
{
YAHOO.Btv.Runtime.RegisterOnInit(RunFromBody);
}
else
{
window.setTimeout(RunFromBody, 100);
}
} 
}
Run();
})();
