if(typeof bbMainDomain=="undefined"){bbMainDomain=window.location.hostname
}if(typeof cdnPrefix=="undefined"){cdnPrefix=""
}if(typeof bbCodeDomain=="undefined"){bbCodeDomain="code."+window.location.hostname
}if(typeof bbLibManager=="undefined"){bbLibManager=null
}if(typeof bbt=="undefined"){bbt={setting:{forbiddenElements:["A","H1","H2","H3","H4","SELECT","TEXTAREA","SCRIPT","NOSCRIPT","STYLE","COMMENT","IFRAME"],stopWords:"",elementClassToSkip:"not4bbtext",elementClassToAnalyze:"bbtext",elementIdsToAnalyze:[],htmlElementId:"bbtPage",minSentenceLength:2,wordsBlock:5,wordsDistance:2,disableCustomDesign:false,serverUrl:"http://"+bbMainDomain+"/core/selector",redirectUrl:"http://"+bbMainDomain+"/core/ad_transaction",contentUrl:"http://"+cdnPrefix+bbCodeDomain+"/bubbles/",displayUrl:"http://"+bbMainDomain+"/core/ad_transaction",highlightUrl:"http://"+bbMainDomain+"/core/ad_transaction",customDesignFilesUrl:"http://"+cdnPrefix+bbCodeDomain+"/bubbles/customDesignFiles/",clickUrlForTest:"http://"+bbMainDomain+"/click-test.jsp",overElementUrl:"http://"+cdnPrefix+bbCodeDomain+"/app/html/overWordLayer.html",sendWords:false,sendWordsUrl:"http://"+bbMainDomain+"/core/words",importantQueryStringParameters:"",maxSizeOfSentWords:51200,cssUrl:"http://"+cdnPrefix+bbCodeDomain+"/app/styles/bubble/bubble.css",cssUrlIE6:"http://"+cdnPrefix+bbCodeDomain+"/app/styles/bubble/bubble_ie6.css",highlightCssClassName:"bbtWord double",pageView:1,wordHighlight:2,wordClick:4,bubbleDisplay:3,bubbleClick:5,sendHighlightInfo:false,clickBeforeBubbleDisplay:false,defaultCharset:"windows-1250",bubbleHeader:'<table cellspacing="0" class="cz"><tbody><tr><td class="tl"></td><td class="tm"><h5>&nbsp;</h5><a class="closeButton" href="javascript:typeof bbt!=\'undefined\'?void(bbt.bubble.hide()):void(0);">close</a><a class="helpButton" href="http://www.billboard.cz/media-intext.php" target="_blank">help</a></td><td class="tr"></td></tr><tr><td class="ml"></td><td class="mm"><div class="intextAds">',bubbleFooter:'</div><div class="intextMics"><div class="intextBubbleArrow"></div><div class="intextSeeMoreLink"><a href="%redirectUrl%" target="_blank">&nbsp;</a></div></div></td><td class="mr"></td></tr><tr><td class="bl"></td><td class="bm"></td><td class="br"></td></tr></tbody></table>',bubbleIdPrefix:"bbtBubble",phraseIdPrefix:"Phr",margin:20,width:200,height:80,hoverWidth:250,hoverHeight:150,showDelay:500,hideDelay:1000,siteId:-1,highlightingEnabled:true,maxFilesOnDir:10000,size:{text:{width:220,height:85},logo:{width:340,height:90},flash:{width:260,height:308},video:{width:255,height:255}},bubleIframeId:"bubbleIfr",containerId:"bbtContainer",displayInfoDelay:2000,delayedDisplayInfo:{text:false,logo:false,flash:false,video:true},urlPatternsWherePageContentAnalysisIsDisabled:[new RegExp("^file://.*"),new RegExp("^http://[0-9]+.[0-9]+.[0-9]+.[0-9]+.*q=cache.*")],patch:{textNodeMaxTextLength:2000,textNodeMaxWordCount:400},sampleBubbleClass:"bbtSampleBubble",sampleBubbleOffset:1000000},regex:{nonWordRegExpObj:null,separateSentencesRegExpObj:null,redundantCharsRegExpObj:null,redundantWhiteCharsRegExpObj:null,wordSearchPart:null,nonWordConnection:null,wordsSeparatorRegExpObj:null,potencialWordPartReplacerRegExpObj:null,sentenceSeparator:function(){return"\\x21-\\x26\\x28-\\x2c\\x2f\\x3a-\\x40\\x5b-\\x5e\\x7b-\\x7f"
},potencialWordPart:function(){return"\\x27\\x2d\\x2e\\x5f\\x60"
},nonWord:function(){if(!this.nonWordConnection){this.nonWordConnection=this.sentenceSeparator()+this.potencialWordPart()+"\\s"
}return this.nonWordConnection
},potencialWordPartReplacerRegExp:function(){if(this.potencialWordPartReplacerRegExpObj){return this.potencialWordPartReplacerRegExpObj
}this.potencialWordPartReplacerRegExpObj=new RegExp("([^"+this.nonWord()+"])(["+this.potencialWordPart()+"])([^"+this.nonWord()+"])","g");
return this.potencialWordPartReplacerRegExpObj
},separateSentencesRegExp:function(){if(this.separateSentencesRegExpObj){return this.separateSentencesRegExpObj
}this.separateSentencesRegExpObj=new RegExp("\\s*["+this.sentenceSeparator()+"]+\\s*|\\s+["+this.potencialWordPart()+"]+\\s*|["+this.potencialWordPart()+"]+\\s+|\\s*["+this.potencialWordPart()+"]+$","g");
return this.separateSentencesRegExpObj
},wordsSeparatorRegExp:function(){if(!this.wordsSeparatorRegExpObj){this.wordsSeparatorRegExpObj=new RegExp("\\s+","g")
}return this.wordsSeparatorRegExpObj
},wordRegExp:function(offset,word){if(!this.wordSearchPart){this.wordSearchPart="["+this.nonWord()+"]*?([^"+this.nonWord()+"]+?["+this.nonWord()+"]+?)"
}var reStr="("+this.wordSearchPart+"{"+offset+"})("+word+")";
return new RegExp(reStr,"g")
},nonWordRegExp:function(){if(this.nonWordRegExpObj){return this.nonWordRegExpObj
}this.nonWordRegExpObj=new RegExp(this.separateSentences()+"|\\s+","g");
return this.nonWordRegExpObj
},redundantCharsRegExp:function(){if(this.redundantCharsRegExpObj){return this.redundantCharsRegExpObj
}this.redundantCharsRegExpObj=new RegExp("^\\s+|\\s+$|^["+this.nonWord()+"]+|["+this.nonWord()+"]+$","g");
return this.redundantCharsRegExpObj
},redundantWhiteCharsRegExp:function(){if(this.redundantWhiteCharsRegExpObj){return this.redundantWhiteCharsRegExpObj
}this.redundantWhiteCharsRegExpObj=new RegExp("\\s\\s+","g");
return this.redundantWhiteCharsRegExpObj
}},wordsPack:{phrases:{},words:{},lemmas:{},locked:false,addWord:function(id,wordlist){var args=this.addWord.arguments;
if(this.locked&&args.length<3&&!args[2]){return 
}var wordsInPhrase,firstWord,phrase,wordForms;
if(wordlist.indexOf(";")!=-1){wordsInPhrase=wordlist.split(";");
firstWord=wordsInPhrase.shift();
phrase={id:id,words:wordsInPhrase};
if(!this.phrases[firstWord]){this.phrases[firstWord]=[]
}this.phrases[firstWord].push(phrase)
}else{wordForms=wordlist.split(",");
this.lemmas[id]=wordForms[0];
for(var i=0;
i<wordForms.length;
i++){this.words[wordForms[i]]=id
}}},reset:function(){this.words={};
this.phrases={}
},lock:function(){this.locked=true
},unlock:function(){this.locked=false
}},pageParser:{textNodes:[],sentences:[],parse:function(){var toParse=[];
this.skipElements={};
for(var i=0;
i<this.parentObj.setting.forbiddenElements.length;
i++){this.skipElements[this.parentObj.setting.forbiddenElements[i]]=1
}toParse=toParse.concat(this.getElementsByClass(this.parentObj.setting.elementClassToAnalyze,document.body,"DIV"));
toParse=toParse.concat(this.getElementsByClass(this.parentObj.setting.elementClassToAnalyze,document,"SPAN"));
toParse=toParse.concat(this.getElementsById());
if(toParse.length==0){toParse=[document.body]
}for(var i=0;
i<toParse.length;
i++){this.findTextNodes(toParse[i])
}var wordsLength,globalOffset=0;
for(var i=0;
i<this.textNodes.length;
i++){this.textNodes[i].offset=globalOffset;
wordsLength=this.splitTextToWords(this.textNodes[i],i);
this.textNodes[i].length=wordsLength;
globalOffset+=wordsLength
}},getElementsByClass:function(searchClass,node,tag){var classElements=new Array();
if(node==null){node=document
}if(tag==null){tag="*"
}var els=node.getElementsByTagName(tag);
var elsLen=els.length;
var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
var i,j;
for(i=0,j=0;
i<elsLen;
i++){if(pattern.test(els[i].className)){classElements[j]=els[i];
j++
}}return classElements
},getElementsById:function(){var ids=this.parentObj.setting.elementIdsToAnalyze;
var elements=new Array();
var element;
for(var i=0;
i<ids.length;
i++){element=document.getElementById(ids[i]);
if(!element){continue
}elements.push(element)
}return elements
},findTextNodes:function(currentNode){if(currentNode.nodeType==3){this.textNodes.push({node:currentNode,offset:-1,length:-1})
}else{if((currentNode.nodeType==1&&!this.skipElements[currentNode.tagName]&&currentNode.className.indexOf(this.parentObj.setting.elementClassToSkip)==-1)||currentNode.nodeType==9){for(var n=currentNode.firstChild;
n!=null;
n=n.nextSibling){this.findTextNodes(n)
}}}},splitTextToWords:function(txtNode,nodeIndex){var regex=this.parentObj.regex;
var wordsCounter=0;
var nodeValue=txtNode.node.data.replace(regex.redundantWhiteCharsRegExp()," ");
nodeValue=nodeValue.replace(regex.redundantCharsRegExp(),"");
var sentences=nodeValue.split(regex.separateSentencesRegExp());
for(var i=0;
i<sentences.length;
i++){if(!sentences[i]||sentences[i].length<1){continue
}wordsFound=sentences[i].split(regex.wordsSeparatorRegExp());
if(wordsFound.length>0){this.sentences.push({node:nodeIndex,index:i,offset:txtNode.offset+wordsCounter,length:wordsFound.length,words:wordsFound,wordCandidates:[],phraseCandidates:[]});
wordsCounter+=wordsFound.length
}}return wordsCounter
},sendWords:function(){if(!this.parentObj.browser.isPageContentAnalysisEnabled()){return 
}var callParams={};
callParams.siteId=this.parentObj.setting.siteId;
callParams.siteDomain=bbSite;
callParams.words=this.joinAllWordsToString(this.sentences);
callParams.pageurl=this.parentObj.browser.getPageUrl();
this.parentObj.server.callPost(this.parentObj.setting.sendWordsUrl,callParams)
},joinAllWordsToString:function(sentences){var sentencesString=[];
var sentencesStringLength=0;
for(var i=0;
i<sentences.length;
i++){var sentenceJoin=sentences[i].words.join(" ");
if(sentencesString.length>0){sentencesString.push(",")
}sentencesString.push(sentenceJoin);
sentencesStringLength+=sentenceJoin.length+1;
if(sentencesStringLength>this.parentObj.setting.maxSizeOfSentWords){break
}}return sentencesString.join(" ")
}},wordsFinder:{maxDistance:1,openPhrases:[],words:{},phrases:{},phrasesWords:{},phrasesCounter:0,sentenceCandidates:{},findWords:function(){var wordId,currentWord,globalId=0;
var sentences=this.parentObj.pageParser.sentences;
stopWords={};
if(this.parentObj.setting.stopWords.length>0){var stopWordsSplit=this.parentObj.setting.stopWords.split(",");
for(var i=0;
i<stopWordsSplit.length;
i++){stopWords[stopWordsSplit[i]]=1
}}for(var i=0;
i<sentences.length;
i++){var sentenceLength=sentences[i].words.length;
if(sentenceLength<this.parentObj.setting.minSentenceLength){globalId+=sentenceLength;
continue
}for(var j=0;
j<sentenceLength;
j++){currentWord=sentences[i].words[j];
if(stopWords[currentWord.toUpperCase()]){return false
}wordId=this.parentObj.wordsPack.words[currentWord.toUpperCase()];
this.checkPhrases(wordId,currentWord,sentences[i],j);
if(wordId){if(this.parentObj.wordsPack.phrases[wordId]){this.addNewPhrases(globalId,wordId,currentWord,this.parentObj.wordsPack.phrases[wordId],sentences[i],j)
}if(wordId>0){this.words[globalId]={id:wordId,node:sentences[i].node,sentence:i,offset:j,value:currentWord,collisions:{words:[],phrases:[]}};
this.parentObj.pageParser.sentences[i].wordCandidates.push(globalId);
this.sentenceCandidates[i]=i
}}globalId++
}this.openPhrases=[]
}return true
},addNewPhrases:function(globalId,firstWordId,firstWord,phrases,sentence,sentenceOffset){var phrase;
for(var i=0;
i<phrases.length;
i++){phrase={};
phrase.id=phrases[i].id;
phrase.words=phrases[i].words;
phrase.misses=0;
phrase.pointer=0;
phrase.globalId=globalId;
phrase.wholePhrase=firstWord;
phrase.sentence=sentence;
phrase.sentenceOffset=sentenceOffset;
phrase.length=1;
this.openPhrases.push(phrase)
}},checkPhrases:function(wordId,word,sentence,sentenceOffset){var phrase;
var wordInPhrase=false;
for(var i=0;
i<this.openPhrases.length;
i++){phrase=this.openPhrases[i];
phrase.wholePhrase+="\\s"+word;
phrase.length++;
if(phrase.words[phrase.pointer]==wordId){phrase.pointer++;
phrase.misses=0;
if(phrase.pointer>=phrase.words.length){this.phrases[this.phrasesCounter]={id:phrase.id,length:phrase.length,firstWord:phrase.globalId,node:sentence.node,sentence:sentence.index,offset:phrase.sentenceOffset,value:phrase.wholePhrase,collisions:{words:[],phrases:[]}};
this.parentObj.pageParser.sentences[sentence.index].phraseCandidates.push(this.phrasesCounter);
this.sentenceCandidates[sentence.index]=sentence.index;
var maxWordId=phrase.globalId+phrase.length;
for(var j=phrase.globalId;
j<maxWordId;
j++){if(!this.phrasesWords[j]){this.phrasesWords[j]=[]
}this.phrasesWords[j].push(this.phrasesCounter)
}this.phrasesCounter++;
this.openPhrases.splice(i,1);
i--
}}else{phrase.misses++;
if(phrase.misses>this.maxDistance){this.openPhrases.splice(i,1);
i--
}}}},getResultOfSearch:function(){var blocksSeparator="X";
var itemsSeparator=";";
var itemsPartSeparator=":";
var indexSeparator=",";
var phraseIndexAndFirstWordIndexSeparator="-";
var words=this.words;
var phrases=this.phrases;
var sentences=this.parentObj.pageParser.sentences;
var actualResult=previousResult="";
var usedWords={};
var usedPhrases={};
var partWords,partPhrase;
var partWordsCollisions=[];
var partPhraseCollisions=[];
var partSentencies=[];
for(var sentenceIndex in this.sentenceCandidates){var sentence=sentences[sentenceIndex];
for(var wordCandidateIndex=0;
wordCandidateIndex<sentence.wordCandidates.length;
wordCandidateIndex++){var wordIndex=sentence.wordCandidates[wordCandidateIndex];
var word=words[wordIndex];
if(!usedWords[word.id]){usedWords[word.id]=[]
}usedWords[word.id].push(wordIndex);
if(words[wordIndex].collisions.words.length>0||words[wordIndex].collisions.phrases.length>0){if(partWordsCollisions.length>0){partWordsCollisions.push(itemsSeparator)
}partWordsCollisions.push(wordIndex);
partWordsCollisions.push(itemsPartSeparator);
partWordsCollisions.push(words[wordIndex].collisions.words.toString());
partWordsCollisions.push(itemsPartSeparator+words[wordIndex].collisions.phrases.toString())
}}for(var phraseCandidateIndex=0;
phraseCandidateIndex<sentence.phraseCandidates.length;
phraseCandidateIndex++){var phraseIndex=sentence.phraseCandidates[phraseCandidateIndex];
if(!phrases[phraseIndex]){continue
}if(!usedPhrases[phrases[phraseIndex].id]){usedPhrases[phrases[phraseIndex].id]=[]
}usedPhrases[phrases[phraseIndex].id].push(phraseIndex+phraseIndexAndFirstWordIndexSeparator+phrases[phraseIndex].firstWord);
if(phrases[phraseIndex].collisions.phrases.length>0){if(partPhraseCollisions.length>0){partPhraseCollisions.push(itemsSeparator)
}partPhraseCollisions.push(phraseIndex);
partPhraseCollisions.push(itemsPartSeparator);
partPhraseCollisions.push(phrases[phraseIndex].collisions.phrases.toString())
}}if(sentence.colliding){if(partSentencies.length>0){partSentencies.push(itemsSeparator)
}partSentencies.push(sentence.offset);
partSentencies.push(indexSeparator);
partSentencies.push(sentence.offset+sentence.length-1)
}partWords=[];
for(var wordId in usedWords){if(partWords.length>0){partWords.push(itemsSeparator)
}partWords.push(wordId);
partWords.push(itemsPartSeparator);
partWords.push(usedWords[wordId].toString())
}partPhrase=[];
for(var phraseId in usedPhrases){if(partPhrase.length>0){partPhrase.push(itemsSeparator)
}partPhrase.push(phraseId);
partPhrase.push(itemsPartSeparator);
partPhrase.push(usedPhrases[phraseId].toString())
}actualResult=partWords.join("")+blocksSeparator+partWordsCollisions.join("")+blocksSeparator+partPhrase.join("")+blocksSeparator+partPhraseCollisions.join("")+blocksSeparator+partSentencies.join("");
if(actualResult.length<this.parentObj.browser.maxQueryStringLength){previousResult=actualResult
}else{return previousResult
}}return actualResult
},getArrayOfItemsById:function(items){var iById={};
for(var i in items){if(!iById[items[i].id]){iById[items[i].id]=[]
}iById[items[i].id].push(i)
}return iById
}},collisionsDetector:{wordsById:{},phrasesById:{},recurseMax:600,init:function(){var words=this.parentObj.wordsFinder.words;
var phrases=this.parentObj.wordsFinder.phrases;
var sentences=this.parentObj.pageParser.sentences;
this.wordsById=this.parentObj.wordsFinder.getArrayOfItemsById(words);
this.phrasesById=this.parentObj.wordsFinder.getArrayOfItemsById(phrases);
for(var si in sentences){if(!sentences[si].maxHiglights){sentences[si].maxHiglights=parseInt(sentences[si].length/this.parentObj.setting.wordsBlock)+1
}this.setSentenceColliding(sentences[si])
}},setSentenceColliding:function(sentence){var detector=bbt.collisionsDetector;
if(detector.getCountOfWordsAndPhrasesInSentence(sentence)>sentence.maxHiglights){sentence.colliding=true
}else{sentence.colliding=false
}},getCountOfWordsAndPhrasesInSentence:function(sentence){var phrasesWords=this.parentObj.wordsFinder.phrasesWords;
var words=this.parentObj.wordsFinder.words;
var phrases=this.parentObj.wordsFinder.phrases;
if(!sentence){return 0
}if(!sentence.wordCandidates||!sentence.phraseCandidates||(sentence.wordCandidates.length<1&&sentence.phraseCandidates.length<1)){return 0
}var wordsCount=getWordsCount(sentence);
if(sentence.phraseCandidates.length<1){return wordsCount
}var max=sentence.offset+sentence.length;
var phrasesCount=0;
var shouldCount;
var j;
var phrase,phraseBegining,phraseEnd,phraseLength;
var currentMinPhraseEnd=max;
for(var i=sentence.offset;
i<max;
i++){if(phrasesWords[i]){shouldCount=false;
for(j=0;
j<phrasesWords[i].length;
j++){phrase=phrases[phrasesWords[i][j]];
if(!phrase){continue
}phraseBegining=parseInt(phrase.offset);
phraseLength=parseInt(phrase.length);
phraseEnd=phraseBegining+phraseLength;
if(phraseBegining==i&&phraseEnd<currentMinPhraseEnd){shouldCount=true;
currentMinPhraseEnd=phraseEnd
}}if(shouldCount){phrasesCount++;
i=phraseEnd
}}}return wordsCount+phrasesCount;
function getWordsCount(sentence){var checkedWords={};
var wordsCount=0;
var wordCandidateId,wordIndexInText;
for(var i=0;
i<sentence.wordCandidates.length;
i++){wordCandidateId=words[sentence.wordCandidates[i]].id;
wordIndexInText=sentence.wordCandidates[i];
if(!phrasesWords[wordIndexInText]&&words[wordIndexInText]&&!checkedWords[wordCandidateId]){checkedWords[wordCandidateId]=true;
wordsCount++
}}return wordsCount
}},detection:function(){this.init();
var wordsCollisionWithPhrase={};
var prasesCollisionWithWord={};
var phrasesCollisionWithPhrase={};
var sentences=this.parentObj.pageParser.sentences;
var words=this.parentObj.wordsFinder.words;
var phrases=this.parentObj.wordsFinder.phrases;
var phrasesWords=this.parentObj.wordsFinder.phrasesWords;
var wordsById=this.wordsById;
var phrasesById=this.phrasesById;
var setting=this.parentObj.setting;
var setSentenceColliding=this.setSentenceColliding;
var wordsRecurseCounter=0;
var phrasesRecurseCounter=0;
var recurseMax=this.recurseMax;
for(var wordIndex in words){detectCollidingNeighbours(wordIndex);
sortOutCollisions(wordIndex)
}for(var phraseIndex in phrases){detectPhraseCollidingNeighbours(phraseIndex);
sortOutPhrasesCollisions(phraseIndex)
}function sortOutCollisions(wordIndex){wordsRecurseCounter++;
wordIndex=parseInt(wordIndex);
var sameWordsI;
if(!isColliding(wordIndex)){var sameWords=wordsById[words[wordIndex].id];
for(var i=0;
i<sameWords.length;
i++){sameWordsI=parseInt(sameWords[i]);
if(sameWordsI!=wordIndex){if(sameWordsI<wordIndex){if(words[sameWordsI]&&words[sameWordsI].collisions&&words[sameWordsI].collisions.words){for(var j=0;
words[sameWordsI]&&words[sameWordsI].collisions&&j<words[sameWordsI].collisions.words.length;
j++){if(!words[words[sameWordsI].collisions.words[j]]){continue
}removeCollision(words[words[sameWordsI].collisions.words[j]].collisions.words,sameWordsI);
if(wordsRecurseCounter<recurseMax){sortOutCollisions(words[sameWordsI].collisions.words[j])
}}}}removeNonCollidingWordCopy(sameWordsI)
}}}wordsRecurseCounter--
}function sortOutPhrasesCollisions(phraseIndex){phrasesRecurseCounter++;
phraseIndex=parseInt(phraseIndex);
var samePhraseI;
if(!isPhraseColliding(phraseIndex)){var samePhrases=phrasesById[phrases[phraseIndex].id];
for(var i=0;
i<samePhrases.length;
i++){samePhraseI=parseInt(samePhrases[i]);
if(samePhraseI!=phraseIndex){if(samePhraseI<phraseIndex){if(phrases[samePhraseI]&&phrases[samePhraseI].collisions&&phrases[samePhraseI].collisions.words){for(var j=0;
j<phrases[samePhraseI].collisions.words.length;
j++){if(!words[phrases[samePhraseI].collisions.words[j]]){continue
}removeCollision(words[phrases[samePhraseI].collisions.words[j]].collisions.phrases,samePhraseI);
if(wordsRecurseCounter<recurseMax){sortOutCollisions(phrases[samePhraseI].collisions.words[j])
}}}if(phrases[samePhraseI]&&phrases[samePhraseI].collisions&&phrases[samePhraseI].collisions.phrases){for(var j=0;
j<phrases[samePhraseI].collisions.phrases.length;
j++){if(!phrases[phrases[samePhraseI].collisions.phrases[j]]){continue
}removeCollision(phrases[phrases[samePhraseI].collisions.phrases[j]].collisions.phrases,samePhraseI);
if(phrasesRecurseCounter<recurseMax){sortOutPhrasesCollisions(phrases[samePhraseI].collisions.phrases[j])
}}}}removeNonCollidingPhraseCopy(samePhraseI)
}}}phrasesRecurseCounter--
}function detectCollidingNeighbours(wordIndex){var wIndex=parseInt(wordIndex);
var phraseOnWordIndex={};
if(phrasesWords[wordIndex]){for(var i=0;
i<phrasesWords[wordIndex].length;
i++){phraseOnWordIndex[phrasesWords[wordIndex][i]]=true
}}for(var i=wIndex+1;
i<=wIndex+setting.wordsDistance;
i++){if(words[i]){words[wIndex].collisions.words.push(i);
words[i].collisions.words.push(wIndex)
}if(phrasesWords[i]){for(var j=0;
j<phrasesWords[i].length;
j++){if(!phraseOnWordIndex[phrasesWords[i][j]]){pushCollisionWordToPhraseCollisions(phrasesWords[i][j],wordIndex)
}pushCollisionPhraseToWordCollisions(wordIndex,phrasesWords[i][j])
}}}var min=wIndex-setting.wordsDistance;
if(min<0){min=0
}for(var i=min;
i<=wIndex;
i++){if(words[i]&&phrasesWords[i]){for(var j=0;
j<phrasesWords[i].length;
j++){if(!phraseOnWordIndex[phrasesWords[i][j]]){pushCollisionWordToPhraseCollisions(phrasesWords[i][j],wordIndex)
}pushCollisionPhraseToWordCollisions(wordIndex,phrasesWords[i][j])
}}}}function detectPhraseCollidingNeighbours(phraseIndex){var min=phrases[phraseIndex].firstWord-setting.wordsDistance;
var max=phrases[phraseIndex].firstWord+phrases[phraseIndex].length+setting.wordsDistance;
if(min<0){min=0
}for(var i=min;
i<max;
i++){if(phrasesWords[i]){for(var j=0;
j<phrasesWords[i].length;
j++){if(phrasesWords[i][j]!=phraseIndex){pushCollisionPhraseToPhraseCollisions(phraseIndex,phrasesWords[i][j]);
pushCollisionPhraseToPhraseCollisions(phrasesWords[i][j],phraseIndex)
}}}}}function pushCollisionPhraseToWordCollisions(wordIndex,phraseIndex){if(!wordsCollisionWithPhrase[wordIndex]){wordsCollisionWithPhrase[wordIndex]={}
}if(!wordsCollisionWithPhrase[wordIndex][phraseIndex]){wordsCollisionWithPhrase[wordIndex][phraseIndex]=true;
words[wordIndex].collisions.phrases.push(phraseIndex)
}}function pushCollisionWordToPhraseCollisions(phraseIndex,wordIndex){if(!prasesCollisionWithWord[phraseIndex]){prasesCollisionWithWord[phraseIndex]={}
}if(!prasesCollisionWithWord[phraseIndex][wordIndex]){prasesCollisionWithWord[phraseIndex][wordIndex]=true;
phrases[phraseIndex].collisions.words.push(wordIndex)
}}function pushCollisionPhraseToPhraseCollisions(targetPhraseIndex,phraseIndex){if(!phrasesCollisionWithPhrase[targetPhraseIndex]){phrasesCollisionWithPhrase[targetPhraseIndex]={}
}if(!phrasesCollisionWithPhrase[targetPhraseIndex][phraseIndex]&&phrases[targetPhraseIndex]){phrasesCollisionWithPhrase[targetPhraseIndex][phraseIndex]=true;
phrases[targetPhraseIndex].collisions.phrases.push(phraseIndex)
}}function isColliding(wordIndex){return(sentences[words[wordIndex].sentence].colliding||words[wordIndex].collisions.words.length>0||words[wordIndex].collisions.phrases.length>0)
}function isPhraseColliding(phraseIndex){return(sentences[phrases[phraseIndex].sentence].colliding||phrases[phraseIndex].collisions.words.length>0||phrases[phraseIndex].collisions.phrases.length>0)
}function removeCollision(removeTarget,removeSubject){var subject=parseInt(removeSubject);
removeMemberFromArrayByValue(removeTarget,removeSubject)
}function removeNonCollidingWordCopy(wordIndex){if(!words[wordIndex]||!words[wordIndex].sentence){return 
}removeCandidateFromSentence(sentences[words[wordIndex].sentence],wordIndex);
var sentence=words[wordIndex].sentence;
delete words[wordIndex];
setSentenceColliding(sentences[sentence])
}function removeNonCollidingPhraseCopy(phraseIndex){removeCandidateFromSentence(sentences[phrases[phraseIndex].sentence],phraseIndex);
var sentence=phrases[phraseIndex].sentence;
delete phrases[phraseIndex];
setSentenceColliding(sentences[sentence])
}function removeCandidateFromSentence(sentence,wordIndex){removeMemberFromArrayByValue(sentence.wordCandidates,wordIndex);
setSentenceColliding(sentence);
if(sentence.colliding){for(var i=0;
i<sentence.wordCandidates.length;
i++){sortOutCollisions(sentence.wordCandidates[i])
}}}function removePraseCandidateFromSentence(sentence,phraseIndex){removeMemberFromArrayByValue(sentence.phraseCandidates,phraseIndex);
setSentenceColliding(sentence);
if(sentence.colliding){for(var i=0;
i<sentence.phraseCandidates.length;
i++){sortOutPhrasesCollisions(sentence.phraseCandidates[i])
}}}function removeMemberFromArrayByValue(a,value){for(var i=0;
i<a.length;
i++){if(a[i]==value){a.splice(i,1);
break
}}}}},highlighter:{visibleOverElement:null,searchSelectedItems:function(wordItems,phraseItems){var items={};
var nodes=this.parentObj.pageParser.textNodes;
this.searchWords(wordItems,items);
this.searchPhrases(phraseItems,items);
for(var node in items){this.highlight(nodes[node].node,items[node])
}},searchWords:function(wordItems,items){var words=this.parentObj.wordsFinder.words;
var nodes=this.parentObj.pageParser.textNodes;
var regex=this.parentObj.regex;
var setting=this.parentObj.setting;
var patch=setting.patch;
var offset,re,result,itemStart,itemEnd;
var shortNodeText={};
var wordsCountForTextNode={};
var nodeId;
for(var i=0;
i<wordItems.length;
i++){offset=wordItems[i].id-nodes[words[wordItems[i].id].node].offset;
nodeId=words[wordItems[i].id].node;
if(!shortNodeText[nodeId]){shortNodeText[nodeId]=nodes[nodeId].node.data.substr(0,patch.textNodeMaxTextLength).replace(regex.potencialWordPartReplacerRegExp(),"$1X$3")
}if(!wordsCountForTextNode[nodeId]){try{wordsCountForTextNode[nodeId]=shortNodeText[nodeId].replace(/\s+/g," ").split(" ").length
}catch(e){wordsCountForTextNode[nodeId]=0
}if(wordsCountForTextNode[nodeId]>patch.textNodeMaxWordCount){wordsCountForTextNode[nodeId]=patch.textNodeMaxWordCount
}}if(offset>wordsCountForTextNode[nodeId]){continue
}re=regex.wordRegExp(offset,words[wordItems[i].id].value);
result=re.exec(shortNodeText[nodeId]);
if(!result){continue
}itemStart=result.index+result[1].length;
itemEnd=itemStart+result[3].length;
if(!items[words[wordItems[i].id].node]){items[words[wordItems[i].id].node]=[]
}items[words[wordItems[i].id].node].push({start:itemStart,end:itemEnd,id:setting.bubbleIdPrefix+wordItems[i].id,hash:wordItems[i].hash,clickUrl:wordItems[i].clickUrl})
}},searchPhrases:function(phraseItems,items){var phrases=this.parentObj.wordsFinder.phrases;
var nodes=this.parentObj.pageParser.textNodes;
var regex=this.parentObj.regex;
var setting=this.parentObj.setting;
var patch=setting.patch;
var offset,re,result,itemStart,itemEnd;
var shortNodeText={};
var nodeId;
for(var i=0;
i<phraseItems.length;
i++){nodeId=phrases[phraseItems[i].id].node;
offset=phrases[phraseItems[i].id].firstWord-nodes[nodeId].offset;
if(!shortNodeText[nodeId]){shortNodeText[nodeId]=nodes[nodeId].node.data.substr(0,patch.textNodeMaxTextLength).replace(regex.potencialWordPartReplacerRegExp(),"$1X$3")
}re=regex.wordRegExp(offset,phrases[phraseItems[i].id].value);
result=re.exec(shortNodeText[nodeId]);
if(!result){continue
}itemStart=result.index+result[1].length;
itemEnd=itemStart+result[3].length;
if(!items[phrases[phraseItems[i].id].node]){items[phrases[phraseItems[i].id].node]=[]
}items[phrases[phraseItems[i].id].node].push({start:itemStart,end:itemEnd,id:setting.bubbleIdPrefix+setting.phraseIdPrefix+phraseItems[i].id,hash:phraseItems[i].hash,clickUrl:phraseItems[i].clickUrl})
}},getOverElement:function(id){return document.getElementById("over"+id+"ifr")
},showOverWordElement:function(id){var overIframe=this.getOverElement(id);
if(overIframe){var url=overIframe.getAttribute("url");
var externalBubble=bbt.bubble.externalBubbles[id];
if(externalBubble){url=bbt.utils.addParamToHashString(url,"bdid",externalBubble)
}overIframe.src=url;
overIframe.style.display="block"
}var tid=setTimeout("bbt.highlighter.enableWordClick('"+id+"')",1000)
},hideOverWordElement:function(id){var overIframe=this.getOverElement(id);
if(overIframe){overIframe.style.display="none"
}},bindOnMouseOverEvent:function(element,id){element.onmouseover=function(e){if(!e){e=window.event
}bbt.bubble.delayShow(element,id,e);
if(bbt.bubble.displayedBubbles[id]){bbt.highlighter.showOverWordElement(id)
}}
},bindOnMouseOutEvent:function(element,id){element.onmouseout=function(){bbt.bubble.delayHide(id);
bbt.highlighter.hideOverWordElement(id)
}
},bindOnMouseClick:function(element,id){element.onclick=function(e){if(!e){e=window.event
}bbt.bubble.showOnClick=true;
bbt.bubble.delayShow(element,id,e);
var tid=setTimeout("bbt.highlighter.enableWordClick('"+id+"')",1000)
}
},enableWordClick:function(id){var anchor=document.getElementById("anchor"+id);
if(anchor){anchor.setAttribute("href",anchor.getAttribute("redirect"));
anchor.setAttribute("target","_blank")
}},createHighlightElement:function(node,content,id,url,clickUrl,hash,sendInfo){var newTextNode,newBlock,textPart,textPartEnd;
var setting=this.parentObj.setting;
var browser=this.parentObj.browser;
var parentNode=node.parentNode;
if(clickUrl.indexOf("%")<0){clickUrl=encodeURIComponent(clickUrl)
}var externalBubble=bbt.bubble.externalBubbles[id];
if(externalBubble){url=bbt.utils.addParamToQueryString(url,"bdid",externalBubble)
}newTextNode=document.createTextNode(content);
newBlock=document.createElement("A");
newBlock.onmouseover=newBlock.onmouseout=null;
newBlock.setAttribute("id","anchor"+id);
newBlock.setAttribute("href","javascript:void(0)");
newBlock.setAttribute("redirect",url);
newBlock.className=setting.highlightCssClassName;
this.bindOnMouseClick(newBlock,id);
this.bindOnMouseOverEvent(newBlock,id);
this.bindOnMouseOutEvent(newBlock,id);
if(sendInfo){sendInfo[sendInfo.length]=hash
}newBlock.insertBefore(newTextNode,newBlock.lastChild);
parentNode.insertBefore(newBlock,node);
if(setting.clickBeforeBubbleDisplay){this.parentObj.highlighter.enableWordClick(id)
}if(this.parentObj.browser.name!="opera"){var overDiv=document.createElement("div");
overDiv.setAttribute("id","over"+id);
overDiv.style.position="absolute";
overDiv.style.left="0px";
overDiv.style.top="0px";
overDiv.style.width="100%";
overDiv.style.height="100%";
overDiv.style.overflow="hidden";
overDiv.style.border="none";
var overIframeUrl=setting.overElementUrl+"#att="+setting.wordClick+"&atd="+hash+"&bbMainDomain="+bbMainDomain+"&curl="+clickUrl;
var overIframe="<iframe id='over"+id+"ifr' name='over"+id+"ifr' url='"+overIframeUrl+"' src='"+overIframeUrl+"' allowtransparency='true' frameborder='0' scrolling='no' marginwidth='0' marginheight='0' style='display:none'></iframe>";
overDiv.innerHTML=overIframe;
newBlock.appendChild(overDiv);
var newBlockSize=this.parentObj.bubble.getElementSize(newBlock);
overDiv.style.width=newBlockSize.width+"px";
overDiv.style.height=newBlockSize.height+"px"
}if(browser.name=="firefox"){var overIframeName="over"+id+"ifr";
if(window.frames[overIframeName]){window.frames[overIframeName].location.href=overIframeUrl
}}},highlight:function(node,items){if(items.length<1){return 
}var textPart,textPartEnd;
var parentNode=node.parentNode;
var itemsLength=items.length;
items=items.sort(function(a,b){if(a.start>b.start){return 1
}if(a.start<b.start){return -1
}return 0
});
var sendInfo=[];
if(items[0].start>0){newTextNode=document.createTextNode(node.data.substring(0,items[0].start));
parentNode.insertBefore(newTextNode,node)
}for(var i=0;
i<itemsLength;
i++){var externalBubble=bbt.bubble.externalBubbles[items[i].id];
var clickUrl=items[i].clickUrl;
var url=this.parentObj.setting.redirectUrl+"?att="+this.parentObj.setting.wordClick+"&atd="+items[i].hash+"&curl="+clickUrl;
this.createHighlightElement(node,node.data.substring(items[i].start,items[i].end),items[i].id,url,clickUrl,items[i].hash,sendInfo);
if(i<itemsLength-1){textPart=node.data.substring(items[i].end,items[i+1].start)
}else{textPart=node.data.substring(items[i].end)
}if(textPart){newTextNode=document.createTextNode(textPart);
parentNode.insertBefore(newTextNode,node)
}}parentNode.removeChild(node);
if(this.parentObj.setting.sendHighlightInfo){var callParams={};
callParams.att=this.parentObj.setting.wordHighlight;
callParams.pageurl=encodeURIComponent(window.location);
for(var i=0;
i<sendInfo.length;
i++){callParams.atd=sendInfo[i];
this.parentObj.server.callGet(this.parentObj.setting.highlightUrl,callParams)
}}}},server:{frameCounter:1,imgCounter:1,removeElement:function(id){var element=document.getElementById(id);
if(element){var container=document.getElementById(bbt.setting.containerId);
if(container){container.removeChild(element)
}}},backcall:function(urlParams){var url=this.parentObj.setting.serverUrl+urlParams;
var newScript=document.createElement("script");
newScript.setAttribute("src",url);
newScript.setAttribute("type","text/javascript");
newScript.setAttribute("charset",this.parentObj.browser.getPageCharset());
var heads=document.getElementsByTagName("head");
if((typeof heads!="object"&&typeof heads!="function")||typeof heads[0]!="object"){return 
}heads[0].appendChild(newScript)
},callGet:function(url,params){var queryString="?";
var paramSeparator=false;
for(var param in params){if(paramSeparator){queryString+="&"
}queryString+=param+"="+encodeURI(params[param]);
paramSeparator=true
}var imgName="bbtGetImg"+this.imgCounter;
this.imgCounter++;
var img=document.createElement("img");
img.setAttribute("id",imgName);
img.setAttribute("src",url+queryString);
with(img.style){position="absolute";
top="-1000px";
left="-1000px"
}var container=document.getElementById(bbt.setting.containerId);
if(!container){return 
}var imgRef=container.appendChild(img);
imgRef.onload=function(){bbt.server.removeElement(imgName)
}
},callPost:function(url,params){var ifrName="bbtPostFrame"+this.frameCounter;
this.frameCounter++;
var iframe=document.createElement("iframe");
iframe.setAttribute("id",ifrName);
iframe.setAttribute("name",ifrName);
iframe.setAttribute("style","position:absolute, left: -1000px, top: -1000px, visibility: hidden");
var container=document.getElementById(bbt.setting.containerId);
if(!container){return 
}var ifrRef=container.appendChild(iframe);
ifrRef.style.position="absolute";
ifrRef.style.border="0px";
ifrRef.style.width="0px";
ifrRef.style.height="0px";
ifrRef.style.left="-1000px";
ifrRef.style.top="-1000px";
ifrRef.style.visibility="hidden";
var ifrWin=self.frames[ifrName];
var ifrDoc=ifrWin.document;
var tid=setTimeout("bbt.server.removeElement('"+ifrName+"')",5000);
var form=ifrDoc.createElement("form");
form.setAttribute("name","bbtPostForm");
form.setAttribute("action",url);
form.setAttribute("method","post");
for(var param in params){var input=ifrDoc.createElement("input");
input.setAttribute("name",param);
input.setAttribute("type","hidden");
input.setAttribute("value",params[param]);
form.appendChild(input)
}if(!ifrDoc.body){var body=ifrDoc.createElement("body");
ifrDoc.appendChild(body)
}var postForm=ifrDoc.body.appendChild(form);
postForm.submit()
},replaceUrlInParametr:function(value){if(!value){return""
}return value.replace(/\%/g,"_esc_")
}},browser:{charset:"",name:"",version:"",maxQueryStringLength:3000,urlPatternsWherePageContentAnalysisIsDisabled:null,parsedImportantQueryStringParameterList:null,detect:function(){if(/chrome\/(\d+\.\d+)/.test(navigator.userAgent.toLowerCase())){this.name="chrome";
this.maxQueryStringLength=2000;
var version=new Number(RegExp.$1)
}else{if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){this.name="firefox";
this.maxQueryStringLength=7000;
var version=new Number(RegExp.$1);
if(version>=3){this.version=3
}else{if(version>=2){this.version=2
}else{if(version>=1){this.version=1
}}}}else{if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){this.name="ie";
this.maxQueryStringLength=1800;
var version=new Number(RegExp.$1);
if(version>=8){this.version=8
}else{if(version>=7){this.version=7
}else{if(version>=6){this.version=6
}else{if(ieversion>=5){this.version=5
}}}}}else{if(/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){this.name="opera";
this.maxQueryStringLength=7000;
var version=new Number(RegExp.$1);
if(version>=10){}else{if(version>=9){this.version=9
}else{if(version>=8){this.version=8
}else{if(version>=7){this.version=7
}}}}}}}}},getPageCharset:function(){if(this.charset){return this.charset
}var metaTags=document.getElementsByTagName("meta");
var re=/charset=([^ ;]+)[ ;]?/i;
var reResult;
for(var i=0;
i<metaTags.length;
i++){reResult=re.exec(metaTags[i].content);
if(reResult){this.charset=reResult[1];
return this.charset
}}this.charset=this.parentObj.setting.defaultCharset;
return this.charset
},getDocumentSize:function(){if(self.innerWidth){return{width:parseInt(self.innerWidth),height:parseInt(self.innerHeight)}
}else{if(document.documentElement&&document.documentElement.clientWidth){return{width:parseInt(document.documentElement.clientWidth),height:parseInt(document.documentElement.clientHeight)}
}else{if(document.body){return{width:parseInt(document.body.clientWidth),height:parseInt(document.body.clientHeight)}
}}}},offset:function(){var x,y;
if(self.pageYOffset){x=self.pageXOffset;
y=self.pageYOffset
}else{if(document.documentElement&&document.documentElement.scrollTop){x=document.documentElement.scrollLeft;
y=document.documentElement.scrollTop
}else{if(document.body){x=document.body.scrollLeft;
y=document.body.scrollTop
}}}return{x:parseInt(x),y:parseInt(y)}
},loadCss:function(href){var link=document.createElement("link");
link.setAttribute("rel","stylesheet");
link.setAttribute("type","text/css");
link.setAttribute("href",href||this.parentObj.setting.cssUrl);
link.setAttribute("id","bbtBubbleStyle");
if(typeof link!="undefined"){document.getElementsByTagName("head")[0].appendChild(link);
return true
}return false
},getMousePosition:function(e){var x,y;
if(document.layers){x=e.pageX;
y=e.pageY
}else{if(document.all){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){x=window.event.clientX+document.body.scrollLeft;
y=window.event.clientY+document.body.scrollTop
}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){x=window.event.clientX+document.documentElement.scrollLeft;
y=window.event.clientY+document.documentElement.scrollTop
}else{x=window.event.clientX;
y=window.event.clientY
}}}else{if(document.getElementById){x=e.pageX;
y=e.pageY
}}}return{x:x,y:y}
},getPageUrl:function(){if(this.parsedImportantQueryStringParameterList==null){this.parseImportantQueryStringParameterList()
}var urlParts=window.location.href.split("?");
var uniqueUrl=urlParts[0];
var queryString=urlParts[1];
if(!queryString){queryString=""
}var queryParams=queryString.split("&");
var newQueryString="";
for(var i=0;
i<queryParams.length;
i++){var paramItems=queryParams[i].split("=");
if(this.parsedImportantQueryStringParameterList[paramItems[0]]){newQueryString+=(newQueryString.length>0?"&":"")+queryParams[i]
}}uniqueUrl+=newQueryString.length>0?"?"+newQueryString:"";
return uniqueUrl
},parseImportantQueryStringParameterList:function(){this.parsedImportantQueryStringParameterList={};
var importantParams=this.parentObj.setting.importantQueryStringParameters.split(",");
for(var i=0;
i<importantParams.length;
i++){this.parsedImportantQueryStringParameterList[importantParams[i]]=true
}},isPageContentAnalysisEnabled:function(){var regExps=this.parentObj.setting.urlPatternsWherePageContentAnalysisIsDisabled;
for(var i=0;
i<regExps.length;
i++){if(window.location.href.match(regExps[i])){return false
}}return true
}},bubble:{bubbles:[],displayedBubbles:[],externalBubbles:[],externalBubblesLoaded:[],visibleBubble:null,waitingBubble:null,overElement:null,showOnClick:false,mousePosition:{x:0,y:0},activeShowTimeId:null,activeHideTimeId:null,wordItems:[],phraseItems:[],sendedDisplayInfo:{},bubblesData:{},bubbleUrls:{},customBubbles:{},addExternalBubble:function(bubbleId,type){if(type.toLowerCase().indexOf("external")<0){return 
}this.externalBubbles[bubbleId]=bbt.utils.uniqueId()
},addWordContent:function(wordId,systemBubbleId,type,hash,clickUrl){var bubble;
var bubbleId=this.parentObj.setting.bubbleIdPrefix+wordId;
this.addExternalBubble(bubbleId,type);
var lema=this.parentObj.wordsPack.lemmas[this.parentObj.wordsFinder.words[wordId].id];
clickUrl=bbt.utils.clickUrl(systemBubbleId,clickUrl,lema,bubbleId);
this.wordItems.push({id:wordId,hash:hash,clickUrl:clickUrl});
var properties=this.createObjectFromProperties(bubbleId,systemBubbleId,hash,clickUrl,this.parentObj.wordsFinder.words[wordId].value,lema,type);
bubble=this.createHidden(properties);
this.bubbles[bubbleId]=bubble;
this.bubblesData[bubbleId]={hash:hash,clickUrl:clickUrl}
},addPhraseContent:function(phraseId,systemBubbleId,type,hash,clickUrl){var bubble;
var bubbleId=this.parentObj.setting.bubbleIdPrefix+this.parentObj.setting.phraseIdPrefix+phraseId;
this.addExternalBubble(bubbleId,type);
clickUrl=bbt.utils.clickUrl(systemBubbleId,clickUrl,"",bubbleId);
this.phraseItems.push({id:phraseId,hash:hash,clickUrl:clickUrl});
var properties=this.createObjectFromProperties(bubbleId,systemBubbleId,hash,clickUrl,this.parentObj.wordsFinder.phrases[phraseId].value,"",type);
bubble=this.createHidden(properties);
this.bubbles[bubbleId]=bubble;
this.bubblesData[bubbleId]={hash:hash,clickUrl:clickUrl}
},loadCss:function(){var setting=this.parentObj.setting;
var browser=this.parentObj.browser;
var main=document.getElementsByTagName("html");
if(main&&main[0]&&!main[0].id){main[0].id=setting.htmlElementId
}if(browser.loadCss()){if(setting.bubleIframeId!=""){var iframe=document.createElement("iframe");
iframe.setAttribute("id",setting.bubleIframeId);
iframe.setAttribute("style","position:absolute, left: -1000px, top: -1000px, width: 100px, height: 100px, background-color: White, border: 0px, z-index: 999, visibility: hidden");
var container=document.getElementById(setting.containerId);
if(!container){return 
}var ifrRef=container.appendChild(iframe);
ifrRef.style.position="absolute";
ifrRef.style.border="0px";
ifrRef.style.width="100px";
ifrRef.style.height="100px";
ifrRef.style.left="-1000px";
ifrRef.style.top="-1000px";
ifrRef.style.visibility="hidden";
ifrRef.style.zIndex="999"
}if(browser.name=="ie"&&browser.version=="6"){browser.loadCss(setting.cssUrlIE6)
}}},assign:function(){this.parentObj.highlighter.searchSelectedItems(this.wordItems,this.phraseItems)
},bindOnMouseOverEvent:function(element){element.onmouseover=function(){bbt.bubble.clearHideDelay()
}
},createBubbleWrapper:function(properties){var wrapper=document.createElement("div");
wrapper=setWrapperAttributes(wrapper,properties);
wrapper=hideWrapper(wrapper);
this.putBubbleCodeToWrapper(wrapper,properties);
return wrapper;
function hideWrapper(wrapper){bbt.html.setStyles(wrapper,{position:"absolute",left:"-1000px",top:"-1000px",display:"none"});
return wrapper
}function setWrapperAttributes(wrapper,properties){bbt.html.setAttributes(wrapper,{id:properties.pageId,bubbleType:properties.type,bubbleSize:properties.size,bubbleContentUrl:properties.contentUrl});
if(bbt.bubble.useStandardDesign(properties.bubbleId)){wrapper.className="intextAdBubble down center"
}if(!properties.external){bindClick(wrapper,properties.redirectUrl)
}return wrapper
}function bindClick(wrapper,redirectUrl){wrapper.onclick=function(e){var element=null;
if(!e){var e=window.event
}if(e.target){element=e.target
}else{if(e.srcElement){element=e.srcElement
}}if(element.nodeType==3){element=targ.parentNode
}e.cancelBubble=true;
if(e.stopPropagation){e.stopPropagation()
}if(element.tagName=="A"){return 
}window.open(redirectUrl,"_blank");
return false
}
}},putBubbleCodeToWrapper:function(wrapper,properties){var content="",iframe="";
var pageId=properties.pageId;
var bubbleId=properties.bubbleId;
var src=properties.contentUrl;
if(this.parentObj.browser.name=="firefox"||properties.external){src=""
}iframe="<iframe name='"+pageId+"ifr' id='"+pageId+"ifr' src='"+src+"' frameborder='0' border='0' cellspacing='0' scrolling='no' width='"+properties.width+"' height='"+properties.height+"' style='width: "+properties.width+"px !important; height: "+properties.height+"px !important'></iframe>";
content+=this.getHeader(bubbleId);
content+=iframe;
content+=this.getFooter(bubbleId);
content=this.replaceTemplateVariables(content,properties);
content=this.flashUrlPatch(content);
wrapper.innerHTML=content
},replaceTemplateVariables:function(content,properties){var bubbleId=properties.bubbleId;
if(!this.useStandardDesign(bubbleId)){var path=this.parentObj.setting.customDesignFilesUrl+bubbleId;
content=content.replace(/%path%/gi,path)
}content=content.replace(/%encodedRedirectUrl%/gi,encodeURIComponent(properties.redirectUrl));
return content.replace(/%redirectUrl%/gi,properties.redirectUrl)
},createHidden:function(properties){var wrapper=this.createBubbleWrapper(properties);
this.bindOnMouseOverEvent(wrapper);
this.parentObj.highlighter.bindOnMouseOutEvent(wrapper,properties.pageId);
var container=document.getElementById(this.parentObj.setting.containerId);
if(!container){return 
}newBubble=container.appendChild(wrapper);
this.applyPatchesToBubbleIframe(properties);
return newBubble
},applyPatchesToBubbleIframe:function(properties){var pageId=properties.pageId;
if(properties.external&&!properties.preview){return 
}if(this.parentObj.browser.name=="firefox"&&window.frames[pageId+"ifr"]){var iframe=document.getElementById(pageId+"ifr");
if(iframe){iframe.src=properties.contentUrl
}}this.parentObj.html.setStyles(pageId+"ifr",{width:properties.width+"px",height:properties.height+"px"})
},showInElement:function(target,id,type,clickUrl){if(typeof target=="string"){target=document.getElementById(target)
}if(!target){return 
}var properties=this.createObjectFromProperties("previewBubble"+id,id,"",clickUrl,"","",type,true);
var wrapper=this.createBubbleWrapper(properties);
target.innerHTML="<div class='intextAdBubble down center' style=''>"+wrapper.innerHTML+"</div>";
this.applyPatchesToBubbleIframe(properties)
},getExternalData:function(type){var items=type.split("|");
var size=items[1].split("x");
return{width:size[0],height:size[1],url:items[2]}
},useStandardDesign:function(bubbleId){if(this.parentObj.setting.disableCustomDesign||!this.customBubbles[bubbleId]){return true
}return false
},createObjectFromProperties:function(pageId,bubbleId,hash,clickUrl,keyword,keywordLemma,type){var width="",height="",contentUrl="",redirectUrl="";
var isPreview=false,isExternal=false,size;
var setting=this.parentObj.setting;
if(arguments.length>7){if(arguments[7]){isPreview=true
}}if(!type){type=""
}if(type.toLowerCase().indexOf("external")>-1){var externalData=this.getExternalData(type);
width=externalData.width;
height=externalData.height;
size=width+"x"+height;
setting.size[size]={width:width,height:height};
contentUrl=externalData.url;
contentUrl=bbt.utils.addParamToQueryString(contentUrl,"bdid",bbt.bubble.externalBubbles[pageId]);
isExternal=true
}else{type=type.toLowerCase();
var maxFilesOnDir=setting.maxFilesOnDir;
var max=(Math.floor((bubbleId-1)/(maxFilesOnDir))+1)*maxFilesOnDir;
var min=max-(maxFilesOnDir-1);
var url=setting.contentUrl+min+"-"+max+"/"+bubbleId+".html";
size=type;
var charPos=size.indexOf("|");
if(charPos>-1){size=size.substr(charPos+1);
var items=size.split("x");
setting.size[type]={width:items[0],height:items[1]}
}width=setting.size[type].width;
height=setting.size[type].height;
contentUrl=url+"?1"
}var queryString="",hashString="";
var wordParams="kwh="+encodeURIComponent(keyword)+"&kwl="+encodeURIComponent(keywordLemma)+"&kwc=";
if(typeof clickUrl=="undefined"){clickUrl=bbt.setting.clickUrlForTest
}if(clickUrl.indexOf("%")<0){clickUrl=encodeURIComponent(clickUrl)
}var curl="curl="+clickUrl;
var attatd="att="+this.parentObj.setting.bubbleClick+"&atd="+hash;
if(isExternal){var addAtUrl=(contentUrl.indexOf("aturl=")==-1?true:false);
if(contentUrl.indexOf("kwh=")==-1){queryString=wordParams
}if(addAtUrl){queryString+="&aturl="
}var aturl="";
if(isPreview){aturl+=this.parentObj.setting.clickUrlForTest;
aturl+=(aturl.indexOf("?")==-1?"?":"&")
}else{aturl+=this.parentObj.setting.redirectUrl;
aturl+=(aturl.indexOf("?")==-1?"?":"&");
aturl+=attatd+"&"
}aturl+=curl;
if(addAtUrl){queryString+=encodeURIComponent(aturl)
}}else{queryString="";
hashString=wordParams+"&curl="+this.parentObj.server.replaceUrlInParametr(clickUrl)+"&aturl=";
if(isPreview){hashString+=this.parentObj.server.replaceUrlInParametr(this.parentObj.setting.clickUrlForTest)
}else{hashString+=this.parentObj.server.replaceUrlInParametr(clickUrl)+"&hash="+hash
}hashString=encodeURIComponent(hashString)
}var querySeparator="?";
if(contentUrl.indexOf(querySeparator)>-1){querySeparator="&"
}contentUrl+=(queryString.length>0?querySeparator:"")+queryString+(hashString.length>0?"#":"")+hashString;
if(isPreview){redirectUrl=this.parentObj.setting.clickUrlForTest+"?"
}else{redirectUrl=this.parentObj.setting.redirectUrl+"?"+attatd+"&"
}if(contentUrl.indexOf("curl=")==-1){redirectUrl+="curl="+clickUrl
}if(hash=="SAMPLE"){redirectUrl=decodeURIComponent(clickUrl)
}return{pageId:pageId,bubbleId:bubbleId,type:type,size:size,width:width,height:height,contentUrl:contentUrl,redirectUrl:redirectUrl,keyword:keyword,keywordLemma:keywordLemma,external:isExternal,preview:isPreview}
},getHeader:function(bubbleId){if(this.useStandardDesign(bubbleId)){return this.parentObj.setting.bubbleHeader
}return this.customBubbles[bubbleId].header
},getFooter:function(bubbleId){if(this.useStandardDesign(bubbleId)){return this.parentObj.setting.bubbleFooter
}return this.customBubbles[bubbleId].footer
},getHtmlForPreviewHeader:function(bubbleId,type,clickUrl){var properties=this.createObjectFromProperties("previewBubble"+bubbleId,bubbleId,"",clickUrl,"","",type,true);
return"<div class='intextAdBubble down center'>"+this.replaceTemplateVariables(this.getHeader(bubbleId),properties)
},getHtmlForPreviewFooter:function(bubbleId,clickUrl){var properties=this.createObjectFromProperties("previewBubble",bubbleId,"",clickUrl,"","","text",true);
return this.replaceTemplateVariables(this.getFooter(bubbleId),properties)+"</div>"
},getElementPosition:function(element){var x=-1,y=-1;
if(element.offsetParent){do{x+=element.offsetLeft;
y+=element.offsetTop
}while(element=element.offsetParent)
}return{x:x,y:y}
},getElementSize:function(element){var width=-1,height=-1;
if(element.clientWidth||element.clientHeight){width=element.clientWidth;
height=element.clientHeight
}else{width=element.offsetWidth;
height=element.offsetHeight
}return{width:width,height:height}
},clearShowDelay:function(){if(this.activeShowTimeId){clearTimeout(this.activeShowTimeId)
}this.activeShowTimeId=null
},clearHideDelay:function(){if(this.activeHideTimeId){clearTimeout(this.activeHideTimeId)
}this.activeHideTimeId=null
},delayShow:function(element,bubbleId,event){var bubbleRef=this.bubbles[bubbleId];
if(!bubbleRef){return 
}this.clearShowDelay();
this.overElement=element;
this.waitingBubble=bubbleRef;
this.mousePosition=this.parentObj.browser.getMousePosition(event);
if(this.visibleBubble||this.showOnClick){bbt.bubble.show()
}else{this.activeShowTimeId=setTimeout(bbt.bubble.show,this.parentObj.setting.showDelay)
}},delayHide:function(bubbleId){var bubbleRef=this.bubbles[bubbleId];
if(!bubbleRef){return 
}this.overElement=null;
if(bubbleRef==this.waitingBubble){this.clearShowDelay();
return 
}this.clearHideDelay();
this.activeHideTimeId=setTimeout(this.parentObj.bubble.hide,this.parentObj.setting.hideDelay)
},show:function(){var bubble=bbt.bubble;
var cssClass,midPointX,className;
bubble.clearShowDelay();
var bubbleIframe=null;
if(bubble.parentObj.setting.bubbleIframeId!=""){bubbleIframe=document.getElementById(bubble.parentObj.setting.bubbleIframeId)
}bubble.hide();
if(bubble.waitingBubble){bubble.waitingBubble.style.display="block";
if(bubbleIframe){bubbleIframe.style.display="block"
}var elementPosition=bubble.mousePosition;
var elementSize=bubble.getElementSize(bubble.overElement);
var bubbleSize=bubble.getElementSize(bubble.waitingBubble);
var page=bubble.parentObj.browser.getDocumentSize();
var pageOffset=bubble.parentObj.browser.offset();
var setting=bubble.parentObj.setting;
var x,y;
y=elementPosition.y-setting.margin-bubbleSize.height;
cssClass="down";
if(y<pageOffset.y){y=elementPosition.y+elementSize.height+setting.margin;
if(bubble.parentObj.browser.name=="opera"){y+=20
}cssClass="up"
}midPointX=elementPosition.x+elementSize.width/2;
x=midPointX-bubbleSize.width/2;
if(x<pageOffset.x){x=pageOffset.x
}else{if(x+bubbleSize.width>pageOffset.x+page.width){x=pageOffset.x+page.width-bubbleSize.width
}}var xBubbleHalf=x+bubbleSize.width/2;
if(xBubbleHalf==midPointX){cssClass+=" center"
}else{if(xBubbleHalf<midPointX){cssClass+=" right"
}else{cssClass+=" left"
}}if(bubbleIframe){var bubbleSize=setting.size[bubble.waitingBubble.getAttribute("bubbleSize")];
bubbleIframe.style.left=x+"px";
bubbleIframe.style.top=y+"px";
bubbleIframe.style.width=bubbleSize.width+"px";
bubbleIframe.style.height=bubbleSize.height+"px";
bubbleIframe.style.zIndex=999
}className=bubble.waitingBubble.className;
className=className.replace(/down|up|left|right|center/gi,"");
className+=cssClass;
bubble.waitingBubble.className=className;
bubble.waitingBubble.style.left=x+"px";
bubble.waitingBubble.style.top=y+"px";
bubble.waitingBubble.style.zIndex=1000;
var bubbleId=bubble.waitingBubble.id;
if(bubble.externalBubbles[bubbleId]&&!bubble.externalBubblesLoaded[bubbleId]&&window.frames[bubbleId+"ifr"]){bubble.updateContentIframeUrl(bubble.waitingBubble);
bubble.externalBubblesLoaded[bubbleId]=true
}if(!bubble.externalBubbles[bubbleId]&&bubble.parentObj.browser.name=="firefox"&&window.frames[bubbleId+"ifr"]){bubble.updateContentIframeUrl(bubble.waitingBubble)
}bubble.visibleBubble=bubble.waitingBubble;
bubble.displayedBubbles[bubbleId]=true;
bbt.highlighter.showOverWordElement(bubbleId);
if(!bubble.sendedDisplayInfo[bubble.waitingBubble.id]){var callParams={};
callParams.att=setting.bubbleDisplay;
callParams.atd=bubble.bubblesData[bubble.waitingBubble.id].hash;
callParams.pageurl=encodeURIComponent(window.location);
if(setting.delayedDisplayInfo[bubble.waitingBubble.getAttribute("bubbleType")]){var bubbleId=bubble.waitingBubble.id;
setTimeout(function(){bubble.parentObj.server.callGet(setting.displayUrl,callParams);
bubble.sendedDisplayInfo[bubbleId]=true
},setting.displayInfoDelay)
}else{bubble.parentObj.server.callGet(setting.displayUrl,callParams);
bubble.sendedDisplayInfo[bubble.waitingBubble.id]=true
}}}bubble.showOnClick=false;
bbt.bubble.waitingBubble=null
},hide:function(){var bubbleObj=bbt.bubble;
bubbleObj.clearHideDelay();
if(bubbleObj.visibleBubble){var bubble=bubbleObj.visibleBubble;
if(bubble.getAttribute("bubbleType")=="video"){bubbleObj.updateContentIframeUrl(bubble,"#stop")
}bubble.style.display="none";
bubble.style.left="-1000px";
bubble.style.top="-1000px";
bbt.bubble.visibleBubble=null
}},updateContentIframeUrl:function(bubble){var bubbleObj=bbt.bubble;
var contentUrl=bubble.getAttribute("bubbleContentUrl");
var externalBubble=bubbleObj.externalBubbles[bubble.id];
if(externalBubble){contentUrl=bbt.utils.addParamToQueryString(contentUrl,"bdid",externalBubble)
}if(arguments.length>1){contentUrl=contentUrl.replace(/#.*/gi,arguments[1])
}var iframe=document.getElementById(bubble.id+"ifr");
if(iframe){iframe.src=contentUrl
}},flashUrlPatch:function(str){function applyRegExp(str,re){var match=re.exec(str);
if(match){var url=match[2].replace(/\&|\&amp;/gm,"%26");
str=str.replace(re,"$1"+url+"$3")
}return str
}var re1=new RegExp('(<object[^>]+data=")([^"]+)("[^>]*>)',"gm");
var re2=new RegExp('(<param[^>]+name="movie"[^>]+value=")([^"]+)("[^>]*>)',"gm");
var re3=new RegExp('(<param[^>]+name="flashvars"[^>]+value=")([^"]+)("[^>]*>)',"gm");
str=applyRegExp(str,re1);
str=applyRegExp(str,re2);
str=applyRegExp(str,re3);
return str
}},html:{getReference:function(element){if(typeof element=="string"){return document.getElementById(element)
}return element
},setStyles:function(element,styles){element=this.getReference(element);
if(!element){return 
}for(var cssAtribute in styles){element.style[cssAtribute]=styles[cssAtribute]
}},setAttributes:function(element,attributes){element=this.getReference(element);
if(!element){return 
}for(var attributeName in attributes){element.setAttribute(attributeName,attributes[attributeName])
}},addBubbleCss:function(){if(this.parentObj.browser.name=="ie"&&this.parentObj.browser.version=="6"){this.parentObj.browser.loadCss(this.parentObj.setting.cssUrlIE6)
}else{this.parentObj.browser.loadCss()
}}},utils:{clickUrl:function(bubbleId,url,lema,pageBubbleId){var clickUrl=url;
var externalBubble=bbt.bubble.externalBubbles[pageBubbleId];
if(clickUrl.indexOf("%")>-1){clickUrl=decodeURIComponent(clickUrl)
}if(externalBubble){clickUrl=this.addParamToQueryString(clickUrl,"bdid",externalBubble);
clickUrl=this.addParamToQueryString(clickUrl,"kwl",lema)
}clickUrl=encodeURIComponent(clickUrl);
return clickUrl
},addParamToQueryString:function(url,paramName,paramValue){var parts=url.split("?");
var queryStr="",hashStr="";
if(parts.length>1){queryStr=parts[1];
if(queryStr.indexOf("#")>-1){var queryParts=queryStr.split("#");
queryStr=queryParts[0];
hashStr=queryParts[1]
}}if(hashStr.length>0){hashStr="#"+hashStr
}return parts[0]+"?"+this.addParamToUrlString(queryStr,paramName,paramValue)+hashStr
},addParamToHashString:function(url,paramName,paramValue){var parts=url.split("#");
var hashStr="";
if(parts.length>1){hashStr=parts[1]
}return parts[0]+"#"+this.addParamToUrlString(hashStr,paramName,paramValue)
},addParamToUrlString:function(urlStr,paramName,paramValue){var newStr="";
if(urlStr.indexOf(paramName+"=")>-1){newStr=urlStr.replace(new RegExp("("+paramName+"=[^=]*)(&|$)"),paramName+"="+paramValue+"$2")
}else{newStr=paramName+"="+paramValue+(urlStr.length>0?"&":"")+urlStr
}return newStr
},uniqueId:function(){return this.sha1.hash(window.location+"_"+(new Date()).getTime())
},sha1:{hash:function(msg){var K=[1518500249,1859775393,2400959708,3395469782];
msg+=String.fromCharCode(128);
var l=Math.ceil(msg.length/4)+2;
var N=Math.ceil(l/16);
var M=new Array(N);
for(var i=0;
i<N;
i++){M[i]=new Array(16);
for(var j=0;
j<16;
j++){M[i][j]=(msg.charCodeAt(i*64+j*4)<<24)|(msg.charCodeAt(i*64+j*4+1)<<16)|(msg.charCodeAt(i*64+j*4+2)<<8)|(msg.charCodeAt(i*64+j*4+3))
}}M[N-1][14]=((msg.length-1)*8)/Math.pow(2,32);
M[N-1][14]=Math.floor(M[N-1][14]);
M[N-1][15]=((msg.length-1)*8)&4294967295;
var H0=1732584193;
var H1=4023233417;
var H2=2562383102;
var H3=271733878;
var H4=3285377520;
var W=new Array(80);
var a,b,c,d,e;
for(var i=0;
i<N;
i++){for(var t=0;
t<16;
t++){W[t]=M[i][t]
}for(var t=16;
t<80;
t++){W[t]=this.rotl(W[t-3]^W[t-8]^W[t-14]^W[t-16],1)
}a=H0;
b=H1;
c=H2;
d=H3;
e=H4;
for(var t=0;
t<80;
t++){var s=Math.floor(t/20);
var T=(this.rotl(a,5)+this.f(s,b,c,d)+e+K[s]+W[t])&4294967295;
e=d;
d=c;
c=this.rotl(b,30);
b=a;
a=T
}H0=(H0+a)&4294967295;
H1=(H1+b)&4294967295;
H2=(H2+c)&4294967295;
H3=(H3+d)&4294967295;
H4=(H4+e)&4294967295
}var hex=bbt.utils.hex;
return hex(H0)+hex(H1)+hex(H2)+hex(H3)+hex(H4)
},f:function(s,x,y,z){switch(s){case 0:return(x&y)^(~x&z);
case 1:return x^y^z;
case 2:return(x&y)^(x&z)^(y&z);
case 3:return x^y^z
}},rotl:function(x,n){return(x<<n)|(x>>>(32-n))
}},hex:function(num){var s="",v;
for(var i=7;
i>=0;
i--){v=(num>>>(i*4))&15;
s+=v.toString(16)
}return s
}},vip:{imgHeader:'<a href="%redirectUrl%" target="_blank"><img src="_F_" height="_H_" width="_W_" style="border:none;"></a>',flashHeader:'<!--[if !IE]> --><object type="application/x-shockwave-flash" data="_F_?clickthru=%redirectUrl%" height="_H_" width="_W_"><!-- <![endif]--><!--[if IE]><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" height="_H_" width="_W_"><param name="movie" value="_F_?clickthru=%redirectUrl%"><!--><!----><param name="flashvars" value="clickthru=%redirectUrl%" /><param name="wmode" value="transparent" /><param name="menu" value="false" /><param name="allowscriptaccess" value="always" /></object><!-- <![endif]-->',imgFlashHeader:'<div style="display:none">',imgFlashFooter:"</div>",htmlHeader:"",htmlFooter:"",getTemplate:function(file){var ext=file.replace(/.*\.(\w+)(\?.*|$)/i,"$1").toLowerCase();
var header,footer;
switch(ext){case"jpg":case"png":case"gif":header=this.imgHeader+this.imgFlashHeader;
footer=this.imgFlashFooter;
break;
case"htm":case"html":header=this.htmlHeader;
footer=this.htmlFooter;
break;
case"swf":header=this.flashHeader+this.imgFlashHeader;
footer=this.imgFlashFooter;
break
}return{header:header,footer:footer}
},getHtmlCode:function(file,w,h){var html=this.getTemplate(file);
html.header=this.replaceVars(html.header,file,w,h);
return html
},replaceVars:function(html,file,w,h){return html.replace(/_F_/g,file).replace(/_W_/g,w).replace(/_H_/g,h)
},add:function(id,type){var typeParts=type.split("|");
if(typeParts.length!=3){return""
}var file=typeParts[2];
var size=typeParts[1].split("x");
if(size.length!=2){return""
}var w=size[0],h=size[1];
var ext=file.replace(/.*\.(\w+)(\?.*|$)/i,"$1").toLowerCase();
var newType="text|"+w+"x"+h;
if(ext.search("htm")==0){newType="external|"+w+"x"+h+"|"+file
}bbt.bubble.customBubbles[id]=this.getHtmlCode(file,size[0],size[1]);
return newType
}},assignSampleBubble:function(){var b=this.bubble;
var h=this.highlighter;
var s=this.setting;
var sbc=s.sampleBubbleClass;
var spans=document.getElementsByTagName("span");
var id=s.sampleBubbleOffset;
var sampleSpans=[];
var span,bubbleId,bubbleType,clickUrl,elementId;
for(var i=0;
i<spans.length;
i++){if(spans[i].className!=sbc){continue
}sampleSpans.push(spans[i])
}while(sampleSpans.length>0){span=sampleSpans.shift();
elementId=s.bubbleIdPrefix+id;
bubbleId=span.getAttribute("bubbleId");
bubbleType=span.getAttribute("bubbleType");
clickUrl=span.getAttribute("clickUrl");
if(!bubbleId||!bubbleType||!clickUrl){continue
}if(bubbleType.search("vip")==0){bubbleType=bbt.vip.add(bubbleId,bubbleType);
if(bubbleType==""){continue
}}b.addExternalBubble(id,bubbleType);
createBubble(span,id,bubbleId,bubbleType,clickUrl);
higlightSampleText(span,id,clickUrl);
id++
}function createBubble(span,id,bubbleId,bubbleType,clickUrl){var content=span.innerHTML.toUpperCase();
var properties=b.createObjectFromProperties(id,bubbleId,"SAMPLE",clickUrl,content,content,bubbleType);
var bubble=b.createHidden(properties);
b.bubbles[id]=bubble;
b.bubblesData[id]={hash:"",clickUrl:clickUrl}
}function higlightSampleText(span,id,clickUrl){var content=span.innerHTML;
h.createHighlightElement(span,content,id,clickUrl,clickUrl,"SAMPLE",null);
span.parentNode.removeChild(span)
}},run:function(){if(this.setting.siteId<1||!this.setting.highlightingEnabled){return 
}this.bubble.loadCss();
this.assignSampleBubble();
this.pageParser.parse();
if(this.setting.sendWords){this.pageParser.sendWords()
}if(!this.wordsFinder.findWords()){return 
}this.collisionsDetector.detection();
var highlightsPerPageMaxCount=this.setting.highlightsPerPageMaxCount||"";
this.server.backcall("?result="+this.wordsFinder.getResultOfSearch()+"&siteId="+this.setting.siteId+"&highlightsPerPageMaxCount="+highlightsPerPageMaxCount+"&pageurl="+encodeURIComponent(window.location))
},init:function(){for(prop in this){if(typeof this[prop]=="object"){this[prop].parentObj=this
}}this.browser.detect();
if(document.embeds){for(var i=0;
i<document.embeds.length;
i++){var embedElement=document.embeds[i];
if(!embedElement.getAttribute("wmode")){embedElement.style.display="block";
embedElement.setAttribute("wmode","opaque");
setTimeout(function(){embedElement.style.display="inline"
},0)
}}}if(document.body){var div=document.createElement("div");
div.setAttribute("id",bbt.setting.containerId);
div.style.position="static";
document.body.appendChild(div)
}}};
bbt.init()
}if(bbLibManager){bbLibManager.ready("bbt3.js")
};