Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !function(a){
- if(a.fn.highlight=function(b,
- c,
- d,
- e){
- returnthis.each(function(){
- d=d||"mark",
- e=e||"hilite";varg,
- h,
- f=this.firstChild,
- i=[
- ],
- j=[
- "SCRIPT",
- "STYLE",
- "INPUT",
- "SELECT",
- "BUTTON",
- "OBJECT",
- "APPLET",
- "TEXTAREA",
- "PRE",
- "CODE",
- "EMBED",
- "IFRAME"
- ];if(b&&f&&-1==a.inArray(this.nodeName,
- j)){
- vark=newRegExp(b.replace(/([
- -.*+?^${
- }()|[
- \
- ]\/\\
- ])/g,
- "\\$1"),
- c?"ig": "g");do3===f.nodeType&&(g=f.nodeValue,
- h=g.replace(k,
- function(a){
- return"<"+d+' class="'+e+'">'+a+"</"+d+">"
- }),
- h!==g&&(a(f).before(h),
- i.push(f)));while(f=f.nextSibling)
- }i.length&&a(i).remove()
- })
- },
- "undefined"!=typeofhlst_query){
- if(0==hlst_query.length){
- varb=document.referrer.split("?");if("undefined"!=typeofb[
- 1
- ]){
- varc;c=document.referrer.indexOf(document.domain)<9?"s": document.referrer.indexOf("yahoo.com")>-1?"p": document.referrer.indexOf("goodsearch.com")>-1?"keywords": document.referrer.indexOf("mywebsearch.com")>-1?"searchfor": document.referrer.indexOf("baidu.")>-1?"wd": "q";for(vard=b[
- 1
- ].split("&"),
- e=0;e<d.length;e++){
- varf=d[
- e
- ].indexOf("=");if(f>0&&c==d[
- e
- ].substring(0,
- f)){
- qstr=decodeURIComponent((d[
- e
- ].substring(f+1)+"").replace(/\+/g,
- "%20")),
- qarr=qstr.match(/([
- ^\s"]+)|"([
- ^"]*)"/g)||[
- ];for(varg=0;g<qarr.length;g++)hlst_query[
- g
- ]=qarr[
- g
- ].replace(/"/g,"");break}}}}var h,e,i,j=jQuery.support.opacity?"mark":"span";if(0!=hlst_query.length)for(i in hlst_areas)if(h=a(hlst_areas[i]),0!=h.length){for(var k=0;k<h.length;k++)for(e in hlst_query)a(hlst_areas[i]+"*").highlight(hlst_query[e],!0,j,"hiliteterm-"+e);break}}"function"==typeof Cufon&&Cufon.refresh()}(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement