var a,Ca=Object,spotsformat,watchlist=[],i18n=[],shlotw=0,shwatchlist=0,lang,glife=0,shmap,last_spot=0,spotsr=0,fargs="d=1",fid=0,spotsinterval=1E4,i=0,shsetup=0,map,mapinit=0,rows=Array(),geo_data=Array(),g_b=Array(),newspottimeout=5E3,tagnewspot=10;g_b[3]=["ffe000","160m"];g_b[7]=["093F00","80m"];g_b[12]=["ffa500","40m"];g_b[17]=["ff0000","30m"];g_b[22]=["800080","20m"];g_b[27]=["0000ff","17m"];g_b[32]=["ff00ff","15m"];g_b[37]=["00ffff","12m"];g_b[42]=["aaaaaa","10m"];g_b[50]=["ffc0cb","6m"];
g_b[62]=["92FF7F","2m"];g_b[0]=["000000","&nbsp;"];
function startup(){function b(c){if(c==1){tagnewspot=$("form.tagnewspopt select").val();set_cookie("tagnewspot",tagnewspot,"9999")}else{tagnewspot=get_cookie("tagnewspot");if(tagnewspot==undefined)tagnewspot="0";$("form.tagnewspopt select").find("option[value="+tagnewspot+"]").attr({selected:"selected"})}}function d(c){if(fargs.search(/cdx=[A-Z|1-9^/]{1,10}[^\*]*$/i)>0){shwatchlist=0;$("form.watchlistopt select").find("option[value="+shwatchlist+"]").attr({selected:"selected"})}else{if(c==1){shwatchlist=
$("form.watchlistopt select").val();set_cookie("shwatchlist",shwatchlist,"9999")}else{shwatchlist=get_cookie("shwatchlist");if(shwatchlist==undefined)shwatchlist="0";$("form.watchlistopt select").find("option[value="+shwatchlist+"]").attr({selected:"selected"})}get_watchlist()}}shsetup!=1&&setTimeout('$("div#setup").hide("slow")',5E3);$("div#sendspot").hide();$("div#callsrch").hide();$("div#lastfil").hide();$("div#mapopt").hide();get_watchlist();if(spotsr==0){spotsr=get_cookie("spotsri");if(spotsr==
undefined)spotsr=15}$("table#spots form.rows select").find("option[value="+spotsr+"]").attr({selected:"selected"});$("table#spots form.rows select").change(function(){change_rows_qty("spots","spot","i")});if(mapinit<1&&(get_cookie("shmap")==0||!get_cookie("shmap"))){$("div#setup div.mapspots").hide("fast");$("div#mapwrapper").hide("fast");shmap=0}else{shmap=1;showmap()}$("span#setupopt").click(function(){$("div#setup").slideToggle()});spotsformat=get_cookie("splm");if(spotsformat==undefined)spotsformat=
"0";$("form.spotsfopt select").find("option[value="+spotsformat+"]").attr({selected:"selected"});spotsformat>0&&spots_format(spotsformat);$("form.spotsfopt select").change(function(){spotsformat=$("form.spotsfopt select").val();set_cookie("splm",spotsformat,"9999");spots_format(spotsformat)});$("form.tagnewspopt select").change(function(){b(1)});b(0);$("form.watchlistopt select").change(function(){d(1)});d(0);if(lang==undefined)lang="en";$("form.langopt select").find("option[value="+lang+"]").attr({selected:"selected"});
$("form.langopt select").change(function(){lang=$("form.langopt select").val();set_cookie("lang",lang,"9999");location.reload()});$("form.mapopt").find(":radio[value="+shmap+"]").attr({checked:"checked"});$("form.mapopt input").change(function(){shmap=$("form.mapopt input:checked").val();if(shmap==0){map.clearOverlays();$("div#mapwrapper").hide("slow");$("div#setup div.mapspots").hide("slow");set_cookie("shmap",0,"9999")}else{$("div#mapwrapper").show("slow");$("div#setup div.mapspots").show("slow");
showmap();get_json_spots("spots",1);set_cookie("shmap",1,"9999")}});if(shlotw==2){shlotw=get_cookie("shlotw");if(shlotw==undefined)shlotw=0}$("form.lotwopt").find(":radio[value="+shlotw+"]").attr({checked:"checked"});$("form.lotwopt input").change(function(){shlotw=$("form.lotwopt input:checked").val();set_cookie("shlotw",$("form.lotwopt input:checked").val(),"9999")});$("span#tgsrch").click(function(){$("div#callsrch").slideToggle()});$("div#msg")&&setTimeout(function(){$("div#msg").slideUp("slow")},
45E3);if(glife==0){glife=get_cookie("gl");if(glife==undefined)glife=0}$("form.glife select").find("option[value="+glife+"]").attr({selected:"selected"});$("select[name=glife]").change(function(){map.clearOverlays();glife=$("form.glife select").val();set_cookie("gl",glife,"9999")});gpath=get_cookie("gp");if(gpath==undefined)gpath=0;$("form.gpath").find(":radio[value="+gpath+"]").attr({checked:"checked"});$("form.gpath input").change(function(){map.clearOverlays();gpath=$("form.gpath input:checked").val();
set_cookie("gp",gpath,"9999")});$("span#tglf").click(function(){$("#lastfil").text().length<=1&&$("#lastfil").load("/spots/lastfil.php");$("div#lastfil").slideToggle()});if(!Array.prototype.indexOf)Array.prototype.indexOf=function(c,e){e=e||0;for(var f=this.length;e<f;e++)if(this[e]==c)return e;return-1}}
function get_watchlist(){jQuery.getJSON("http://www.dxwatch.com/dxsd1/wl.php?cb=?",function(b){watchlist=b});setTimeout(function(){if(i18n.wls){watchlist.length==0&&$("span#wl").empty().append(i18n.wl0);watchlist.length>0&&$("span#wl").empty().append(i18n.wls.replace(/\@\@\@/g,watchlist.length))}},5E3)}
function get_json_spots(b,d){var c="",e="";if(d)i=last_spot=0;if(shmap==0)c="&ng=1";if(shlotw==1)e="&l=1";d="/dxsd1/sk.php?s="+last_spot+"&r="+eval(b+"r")+(last_spot==0?"&fid="+fid:"")+"&"+fargs+c+e;$.ajax({url:d,type:"GET",dataType:"json",timeout:spotsinterval-1E4,success:function(f){process_json_spots(f,b)}})}
function process_json_spots(b,d){var c={},e="",f="";if(last_spot==0){$("table#"+d+" th."+d+"title span."+d+"title").empty().append(b.fname);$("table#"+d+" td.loading").remove()}b&&b.i18n&&jQuery.each(b.i18n,function(g){i18n[g]=b.i18n[g]});if(b&&b.ns){var k='<tr id="1" class="spots nospot"><td colspan="7">'+b.ns+"</td></tr>";last_spot=1;insert_row(d,1,"spot",k,0,null)}else{b&&b.geo&&jQuery.each(b.geo,function(g){c[g]=Array(b.geo[g][0],b.geo[g][1])});b.s&&$("table#"+d+" td.ns").removeClass("ns");b&&
b.s&&jQuery.each(b.s,function(g){i++;zebra=i%2==0?"a":"b";var l=b.s[g][8]==1?"CQ":"DX";b.s[g][9]==1?(e=" [LoTW] "):(e="");if(shwatchlist>0){calls=b.s[g][2].split("/",2);for(key in calls)calls[key].length<4||(watchlist.indexOf(calls[key])>0?(f="1"):(f="0"))}l='<tr class="spot spots '+zebra+'" id="'+g+'"><td class="de"><a title="'+b.ci[b.s[g][0]]+'" rel="fb" target="_blank" class="callsign" href="/qrz/'+b.s[g][0]+'">'+b.s[g][0]+'</a></td><td class="dx"><a title="'+b.ci[b.s[g][2]]+'" rel="fb" target="_blank" class="callsign" href="/qrz/'+
b.s[g][2]+'">'+b.s[g][2]+'</a></td><td class="qrg">'+b.s[g][1]+'</td><td class="obs">'+l+e+'</td><td class="db"><span>'+b.s[g][3]+' dB</span></td><td class="wpm"><span>'+b.s[g][4]+' wpm</span></td><td class="utc"><a href="#" title="'+i18n["new"]+'">'+b.s[g][5]+'</a> <span class="age"></span></td></tr>';var m=Math.round((new Date).getTime()/1E3)-b.s[g][6];last_spot=g;if(shmap==1)var h=[[c[b.s[g][0]][0],c[b.s[g][0]][1]],[c[b.s[g][2]][0],c[b.s[g][2]][1]],b.s[g][7],b.s[g][0],b.s[g][2]];insert_row(d,g,
"spot",l,m,h,f)});calc_age_spots(d)}}
function insert_row(b,d,c,e,f,k,g){if(rows.length>=eval(b+"r")){var l=rows.shift();$("table#"+b+" tr."+c+"#"+l[0]).remove();if($("#mapwrapper").is(":visible")&&typeof geo_data[$("table#"+b+" tr."+c+":last").attr("id")]!="undefined"){map.removeOverlay(geo_data[$("table#"+b+" tr."+c+":last").attr("id")][0]);map.removeOverlay(geo_data[$("table#"+b+" tr."+c+":last").attr("id")][1]);map.removeOverlay(geo_data[$("table#"+b+" tr."+c+":last").attr("id")][2])}}rows.push(Array(d,f));$("table#"+b+" tr.header:last").after(e).fadeIn();
if(i>eval(b+"r")&&tagnewspot>0){$("table#"+b+" tr#"+d+" td").addClass("ns");tagnewspot!=10&&setTimeout(function(){$("table#"+b+" tr#"+d+" td").removeClass("ns")},tagnewspot)}g==1&&$("table#"+b+" tr#"+d+" td").addClass("wl");if($("#mapwrapper").is(":visible")&&typeof k!="undefined"&&k)geo_data[d]=insert_geo_data(k)}function debug(b,d){d=="replace"&&$("div#debug").empty();$("div#debug").prepend(b+"<br><br>")}
function get_cookie(b){return(b=document.cookie.match("(^|;) ?"+b+"=([^;]*)(;|$)"))?unescape(b[2]):null}function set_cookie(b,d,c){var e=new Date,f=new Date;if(c==null||c==0)c=1;f.setTime(e.getTime()+864E5*c);document.cookie=b+"="+escape(d)+";expires="+f.toGMTString()}function change_rows_qty(b,d,c){var e=$("table#"+b+" form.rows select").val();window[b+"r"]=e;rows=[];set_cookie(b+"r"+c,e,"9999");map.clearOverlays();get_json_spots(b,1);$("table#"+b+" tr."+d).remove()}
function pre_showmap(){mapinit==1?showmap():$.getScript("http://maps.google.com/maps?file=api&amp;v=2&amp;key="+gmapkey,function(){})}
function showmap(){if(mapinit!=1){$("#maplegend").append("<b>"+gen_map_legend()+"</b>");dxIcon=new GIcon(G_DEFAULT_ICON,"/img/gmap/dx.png");dxIcon.shadow=null;dxIcon.iconSize=new GSize(6,6);dxIcon.iconAnchor=new GPoint(3,3);deIcon=new GIcon(G_DEFAULT_ICON,"/img/gmap/de.png");deIcon.shadow=null;deIcon.iconSize=new GSize(6,6);deIcon.iconAnchor=new GPoint(3,3);if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));map.setCenter(new GLatLng(8,0),1);map.addControl(new GLargeMapControl);
map.addControl(new GMapTypeControl);mapinit=1}}}function gen_map_legend(){var b="&nbsp;";for(key in g_b)b+="  <font color='#"+g_b[key][0]+"'>"+g_b[key][1]+"</font> /";return b=b.replace(/.$/g,"")}
function insert_geo_data(b){var d=gpath==1?{geodesic:true}:{geodesic:false};d=new GMarker(new GLatLng(b[1][0],b[1][1]),{icon:dxIcon,title:"DX: "+b[4]});map.removeOverlay(d);map.addOverlay(d);var c=new GMarker(new GLatLng(b[0][0],b[0][1]),{icon:deIcon,title:"DX: "+b[3]});map.removeOverlay(c);map.addOverlay(c);var e=[new GLatLng(b[0][0],b[0][1]),new GLatLng(b[1][0],b[1][1])];b=b[2];b=(new PolylineEncoder).dpEncodeToGPolyline(e,"#"+g_b[b][0],1,1);map.removeOverlay(b);map.addOverlay(b);if(glife>0){setTimeout(function(f){return function(){map.removeOverlay(f)}}(d),
glife*1E3);setTimeout(function(f){return function(){map.removeOverlay(f)}}(c),glife*1E3);setTimeout(function(f){return function(){map.removeOverlay(f)}}(b),glife*1E3)}return Array(c,d,b)}function calc_age_spots(b){for(idx in rows){b="0";b=calc_age(rows[idx][1]);b!="void"&&$("tr#"+rows[idx][0]+".spot td.utc a").attr({title:i18n.ago.replace(/\@\@\@/g,b)})}}
function calc_age(b){var d=Math.round((new Date).getTime()/1E3)-b;b=d/60%60|0;var c=d/3600%24|0;d=d/86400|0;if((b=="0"||b=="1")&&c=="0"&&d=="0")return"void";b=" "+b+" "+i18n.mms+",";if(c==1)c=" "+c+" "+i18n.hh+",";else if(c>1){c=" "+c+" "+i18n.hhs+",";b=" "}else if(c==0)c=" ";if(d==1)d=" "+d+" "+i18n.dd+",";else if(d>1){d=" "+d+" "+i18n.dds+",";c=" "}else if(d==0)d=" ";age=d+c+b;return age=age.replace(/,.*$/,"")}function update_data(b,d){$("div#"+b).load(d)}
jQuery.extend({getURLParam:function(b){var d="",c=window.location.href,e=false;b=b+"=";var f=b.length;if(c.indexOf("?")>-1){c=c.substr(c.indexOf("?")+1).split("&");for(var k=0;k<c.length;k++)if(c[k].substr(0,f)==b){d=c[k].split("=")[1];e=true;break}}if(e==false)return null;return d}});function spots_format(b){if(b==0)spf_css.attr("disabled",true);else spf_css=$('<link rel="stylesheet" href="/css/spf_classic.css" type="text/css" />').appendTo("head")}
PolylineEncoder=function(b,d,c,e){b||(b=18);d||(d=2);c||(c=1.0E-5);e||(e=true);this.numLevels=b;this.zoomFactor=d;this.verySmall=c;this.forceEndpoints=e;this.zoomLevelBreaks=new Array(b);for(e=0;e<b;e++)this.zoomLevelBreaks[e]=c*Math.pow(d,b-e-1)};a=PolylineEncoder.prototype;
a.dpEncode=function(b){var d=0,c=[],e=new Array(b.length),f,k,g,l,m,h;if(b.length>2)for(c.push([0,b.length-1]);c.length>0;){l=c.pop();f=0;h=Math.pow(b[l[1]].lat()-b[l[0]].lat(),2)+Math.pow(b[l[1]].lng()-b[l[0]].lng(),2);for(m=l[0]+1;m<l[1];m++){g=this.distance(b[m],b[l[0]],b[l[1]],h);if(g>f){f=g;k=m;if(f>d)d=f}}if(f>this.verySmall){e[k]=f;c.push([l[0],k]);c.push([k,l[1]])}}c=this.createEncodings(b,e);b=this.encodeLevels(b,e,d);return{encodedPoints:c,encodedLevels:b,encodedPointsLiteral:c.replace(/\\/g,
"\\\\")}};a.dpEncodeToJSON=function(b,d,c,e){e||(e=0.9);c||(c=3);d||(d="#0000ff");b=this.dpEncode(b);return{color:d,weight:c,opacity:e,points:b.encodedPoints,levels:b.encodedLevels,numLevels:this.numLevels,zoomFactor:this.zoomFactor}};a.dpEncodeToGPolyline=function(b,d,c,e){e||(e=0.9);c||(c=3);d||(d="#0000ff");return new GPolyline.fromEncoded(this.dpEncodeToJSON(b,d,c,e))};
a.dpEncodeToGPolygon=function(b,d,c,e,f,k,g,l){var m,h;d||(d="#0000ff");c||(c=3);e||(e=0.9);f||(f=d);k||(k=e/3);if(g==undefined)g=true;if(l==undefined)l=true;h=new Array(0);for(m=0;m<b.length;m++)h.push(this.dpEncodeToJSON(b[m],d,c,e));return new GPolygon.fromEncoded({polylines:h,color:f,opacity:k,fill:g,outline:l})};
a.distance=function(b,d,c,e){var f;if(d.lat()===c.lat()&&d.lng()===c.lng())f=Math.sqrt(Math.pow(c.lat()-b.lat(),2)+Math.pow(c.lng()-b.lng(),2));else{e=((b.lat()-d.lat())*(c.lat()-d.lat())+(b.lng()-d.lng())*(c.lng()-d.lng()))/e;if(e<=0)f=Math.sqrt(Math.pow(b.lat()-d.lat(),2)+Math.pow(b.lng()-d.lng(),2));if(e>=1)f=Math.sqrt(Math.pow(b.lat()-c.lat(),2)+Math.pow(b.lng()-c.lng(),2));if(0<e&&e<1)f=Math.sqrt(Math.pow(b.lat()-d.lat()-e*(c.lat()-d.lat()),2)+Math.pow(b.lng()-d.lng()-e*(c.lng()-d.lng()),2))}return f};
a.createEncodings=function(b,d){var c,e,f,k=0,g=0,l="";for(c=0;c<b.length;c++)if(d[c]!=undefined||c==0||c==b.length-1){e=b[c];var m=e.lat();e=e.lng();m=Math.floor(m*1E5);var h=Math.floor(e*1E5);e=m-k;f=h-g;k=m;g=h;l+=this.encodeSignedNumber(e)+this.encodeSignedNumber(f)}return l};a.computeLevel=function(b){var d;if(b>this.verySmall){for(d=0;b<this.zoomLevelBreaks[d];)d++;return d}};
a.encodeLevels=function(b,d,c){var e,f="";f+=this.forceEndpoints?this.encodeNumber(this.numLevels-1):this.encodeNumber(this.numLevels-this.computeLevel(c)-1);for(e=1;e<b.length-1;e++)if(d[e]!=undefined)f+=this.encodeNumber(this.numLevels-this.computeLevel(d[e])-1);f+=this.forceEndpoints?this.encodeNumber(this.numLevels-1):this.encodeNumber(this.numLevels-this.computeLevel(c)-1);return f};
a.encodeNumber=function(b){for(var d="",c;b>=32;){c=(32|b&31)+63;d+=String.fromCharCode(c);b>>=5}d+=String.fromCharCode(b+63);return d};a.encodeSignedNumber=function(b){var d=b<<1;if(b<0)d=~d;return this.encodeNumber(d)};PolylineEncoder.latLng=function(b,d){this.y=b;this.x=d};PolylineEncoder.latLng.prototype.lat=function(){return this.y};PolylineEncoder.latLng.prototype.lng=function(){return this.x};
PolylineEncoder.pointsToLatLngs=function(b){var d,c;c=new Array(0);for(d=0;d<b.length;d++)c.push(new PolylineEncoder.latLng(b[d][0],b[d][1]));return c};PolylineEncoder.pointsToGLatLngs=function(b){var d,c;c=new Array(0);for(d=0;d<b.length;d++)c.push(new GLatLng(b[d][0],b[d][1]));return c};
eval(function(b,d,c,e,f,k){f=function(g){return(g<d?"":f(parseInt(g/d)))+((g%=d)>35?String.fromCharCode(g+29):g.toString(36))};if(!"".replace(/^/,String)){for(;c--;)k[f(c)]=e[c]||f(c);e=[function(g){return k[g]}];f=function(){return"\\w+"};c=1}for(;c--;)if(e[c])b=b.replace(new RegExp("\\b"+f(c)+"\\b","g"),e[c]);return b}("(5($){$.19={P:'1.2'};$.u(['j','w'],5(i,d){$.q['O'+d]=5(){p(!3[0])6;g a=d=='j'?'s':'m',e=d=='j'?'D':'C';6 3.B(':y')?3[0]['L'+d]:4(3,d.x())+4(3,'n'+a)+4(3,'n'+e)};$.q['I'+d]=5(b){p(!3[0])6;g c=d=='j'?'s':'m',e=d=='j'?'D':'C';b=$.F({t:Z},b||{});g a=3.B(':y')?3[0]['8'+d]:4(3,d.x())+4(3,'E'+c+'w')+4(3,'E'+e+'w')+4(3,'n'+c)+4(3,'n'+e);6 a+(b.t?(4(3,'t'+c)+4(3,'t'+e)):0)}});$.u(['m','s'],5(i,b){$.q['l'+b]=5(a){p(!3[0])6;6 a!=W?3.u(5(){3==h||3==r?h.V(b=='m'?a:$(h)['U'](),b=='s'?a:$(h)['T']()):3['l'+b]=a}):3[0]==h||3[0]==r?S[(b=='m'?'R':'Q')]||$.N&&r.M['l'+b]||r.A['l'+b]:3[0]['l'+b]}});$.q.F({z:5(){g a=0,f=0,o=3[0],8,9,7,v;p(o){7=3.7();8=3.8();9=7.8();8.f-=4(o,'K');8.k-=4(o,'J');9.f+=4(7,'H');9.k+=4(7,'Y');v={f:8.f-9.f,k:8.k-9.k}}6 v},7:5(){g a=3[0].7;G(a&&(!/^A|10$/i.16(a.15)&&$.14(a,'z')=='13'))a=a.7;6 $(a)}});5 4(a,b){6 12($.11(a.17?a[0]:a,b,18))||0}})(X);",
62,72,"|||this|num|function|return|offsetParent|offset|parentOffset|||||borr|top|var|window||Height|left|scroll|Left|padding|elem|if|fn|document|Top|margin|each|results|Width|toLowerCase|visible|position|body|is|Right|Bottom|border|extend|while|borderTopWidth|outer|marginLeft|marginTop|client|documentElement|boxModel|inner|version|pageYOffset|pageXOffset|self|scrollTop|scrollLeft|scrollTo|undefined|jQuery|borderLeftWidth|false|html|curCSS|parseInt|static|css|tagName|test|jquery|true|dimensions".split("|"),
0,{}));
(function(b){function d(j){if(!h.parent){h.parent=b('<div id="'+j.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();b.fn.bgiframe&&h.parent.bgiframe();h.title=b("h3",h.parent);h.body=b("div.body",h.parent);h.url=b("div.url",h.parent)}}function c(j){return b.data(j,"tooltip")}function e(j){if(c(this).delay)r=setTimeout(k,c(this).delay);else k();u=!!c(this).track;b(document.body).bind("mousemove",g);g(j)}function f(){if(!(b.tooltip.blocked||this==
o||!this.tooltipText&&!c(this).bodyHandler)){o=this;t=this.tooltipText;if(c(this).bodyHandler){h.title.hide();var j=c(this).bodyHandler.call(this);j.nodeType||j.jquery?h.body.empty().append(j):h.body.html(j);h.body.show()}else if(c(this).showBody){j=t.split(c(this).showBody);h.title.html(j.shift()).show();h.body.empty();for(var n=0,p;p=j[n];n++){n>0&&h.body.append("<br/>");h.body.append(p)}h.body.hideWhenEmpty()}else{h.title.html(t).show();h.body.hide()}c(this).showURL&&b(this).url()?h.url.html(b(this).url().replace("http://",
"")).show():h.url.hide();h.parent.addClass(c(this).extraClass);c(this).fixPNG&&h.parent.fixPNG();e.apply(this,arguments)}}function k(){r=null;if((!s||!b.fn.bgiframe)&&c(o).fade)if(h.parent.is(":animated"))h.parent.stop().show().fadeTo(c(o).fade,o.tOpacity);else h.parent.is(":visible")?h.parent.fadeTo(c(o).fade,o.tOpacity):h.parent.fadeIn(c(o).fade);else h.parent.show();g()}function g(j){if(!b.tooltip.blocked)if(!(j&&j.target.tagName=="OPTION")){!u&&h.parent.is(":visible")&&b(document.body).unbind("mousemove",
g);if(o==null)b(document.body).unbind("mousemove",g);else{h.parent.removeClass("viewport-right").removeClass("viewport-bottom");var n=h.parent[0].offsetLeft,p=h.parent[0].offsetTop;if(j){n=j.pageX+c(o).left;p=j.pageY+c(o).top;j="auto";if(c(o).positionLeft){j=b(window).width()-n;n="auto"}h.parent.css({left:n,right:j,top:p})}j=l();var q=h.parent[0];if(j.x+j.cx<q.offsetLeft+q.offsetWidth){n-=q.offsetWidth+20+c(o).left;h.parent.css({left:n+"px"}).addClass("viewport-right")}if(j.y+j.cy<q.offsetTop+q.offsetHeight){p-=
q.offsetHeight+20+c(o).top;h.parent.css({top:p+"px"}).addClass("viewport-bottom")}}}}function l(){return{x:b(window).scrollLeft(),y:b(window).scrollTop(),cx:b(window).width(),cy:b(window).height()}}function m(){function j(){h.parent.removeClass(n.extraClass).hide().css("opacity","")}if(!b.tooltip.blocked){r&&clearTimeout(r);o=null;var n=c(this);if((!s||!b.fn.bgiframe)&&n.fade)h.parent.is(":animated")?h.parent.stop().fadeTo(n.fade,0,j):h.parent.stop().fadeOut(n.fade,j);else j();c(this).fixPNG&&h.parent.unfixPNG()}}
var h={},o,t,r,s=b.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),u=false;b.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){b.tooltip.blocked=!b.tooltip.blocked}};b.fn.extend({tooltip:function(j){j=b.extend({},b.tooltip.defaults,j);d(j);return this.each(function(){b.data(this,"tooltip",j);this.tOpacity=h.parent.css("opacity");this.tooltipText=this.title;b(this).removeAttr("title");this.alt=""}).mouseover(f).mouseout(m).click(m)},
fixPNG:s?function(){return this.each(function(){var j=b(this).css("backgroundImage");if(j.match(/^url\(["']?(.*\.png)["']?\)$/i)){j=RegExp.$1;b(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+j+"')"}).each(function(){var n=b(this).css("position");n!="absolute"&&n!="relative"&&b(this).css("position","relative")})}})}:function(){return this},unfixPNG:s?function(){return this.each(function(){b(this).css({filter:"",backgroundImage:""})})}:
function(){return this},hideWhenEmpty:function(){return this.each(function(){b(this)[b(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}})})(jQuery);
(function(b){b.fn.bgIframe=b.fn.bgiframe=function(d){if(b.browser.msie&&/6.0/.test(navigator.userAgent)){d=b.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d||{});var c=function(f){return f&&f.constructor==Number?f+"px":f},e='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
c(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":c(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":c(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":c(d.height))+';"/>';return this.each(function(){b("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(e),this.firstChild)})}return this}})(jQuery);
