var www=0;Itb={f:'ISHARE_TB_',fh:'',il:'',init:function(){this.fh='#'+this.f;this.il=new Image();this.il.src='http://ishare.ibibo.com/l.gif';},Fs:function(c,u){f=this.f;fh='#'+f;Fi=this.Fi;Fd=this.Fd;Fis=this.Fis;try{$=jQuery;if('undefined'===typeof document.body.style.maxHeight){$('body','html').css({height:'100%',width:'100%'});$('html').css('overflow','hidden');if(null===document.getElementById(f+'h')){$('body').append("<iframe id='"+f+"h'></iframe>"+Fd('o')+Fd('w'));$(fh+'o').click(this.Fr);}}else if(null===document.getElementById(f+'o')){$('body').append(Fd('o')+Fd('w'));$(fh+'o').click(this.Fr);}if(this.Fdmx())$(fh+'o').addClass(f+'om');else $(fh+'o').addClass(f+'ob');$('body').append(Fd('l',"<img src='"+this.il.src+"'/>"));$(fh+'l').show();qs=u.replace(/^[^\?]+\??/,'');var p=this.Fpq(qs);W=(p['width']*1)+30||630;H=(p['height']*1)+40||440;acw=W-30;ach=H-45;if(u.indexOf(f+'iframe')!=-1){unq=u.split(f);$(fh+'i').remove();if(p['modal']=='hack'){if(p['hackstyle']=='ishare')$(fh+'w').append("<a href='javascript:void(0);' id='"+f+"cWB' class='"+f+"x'></a>"+Fi()).css('border',0);else if(p['hackstyle']=='custom'){hcoo=('undefined'==typeof p['hackcloseonoff'])?false:p['hackcloseonoff'];hcc=('undefined'==typeof p['hackcloseclick'])?'Itb.Fr();':p['hackcloseclick'];hcl=('undefined'==typeof p['hackcloseclass'])?'':"class='"+p['hackcloseclass']+"'";hcs=('undefined'==typeof p['hackclosestyle'])?Fis(1):"style='"+p['hackclosestyle']+"'";hct=('undefined'==typeof p['hackclosetitle'])?'':p['hackclosetitle'];hia=('undefined'==typeof p['hackiframeattr'])?"":p['hackiframeattr'];hil=('undefined'==typeof p['hackiframeclass'])?'':"class='"+p['hackiframeclass']+"'";his=('undefined'==typeof p['hackiframestyle'])?Fis(1):"style='"+p['hackiframestyle']+"'";hb=('undefined'==typeof p['hackborder'])?0:p['hackborder'];$(fh+'w').append((hcoo?"<a href='javascript:void(0)' onclick='"+hcc+"' "+hcl+" "+hcs+">"+hct+"</a>":"")+Fi(hia+" "+hil+" "+his)).css('border',hb);}else $(fh+'w').append(Fi());}else if(p['modal']!='true')$(fh+'w').append(Fd('t',Fd('aWT',c)+Fd('cAW', "<a href='javascript:void(0);' id='"+f+"cWB' title='Close'>close</a> or Esc Key"))+Fi());else{$(fh+'o').unbind();$(fh+'w').append(""+Fi());}}else{if($(fh+'w').css('display')!='block'){if(p['modal']!='true')$(fh+'w').append(Fd('t',Fd('aWT',c)+Fd('cAW', "<a href='javascript:void(0);' id='"+f+"cWB'>close</a> or Esc Key"))+Fd('aC','',Fis(0)));else{$(fh+'o').unbind();$(fh+'w').append(Fd('aC','',"class='"+f+"modal' "+Fis(0)));}}else{$(fh+'aC')[0].style.width=acw+'px';$(fh+'aC')[0].style.height=ach+'px';$(fh+'aC')[0].scrollTop=0;$(fh+'aWT').html(c);}}$(fh+'cWB').click(this.Fr);if(u.indexOf(f+'inline')!=-1){$(fh+'aC').append($('#'+p['inlineId']).children());$(fh+'w').unload(function(){$('#'+p['inlineId']).append($(fh+'aC').children());});this.Fp();$(fh+'l').remove();$(fh+'w').css({display:'block'});}else if(u.indexOf(f+'iframe')!=-1){this.Fp();if($.browser.safari){$(fh+'l').remove();$(fh+'w').css({display:'block'});}}else{$(fh+'aC').load(u+='&random='+(new Date().getTime()),function(){this.Fp();$(fh+'l').remove();$(fh+'w').css({display:'block'});});}if(!p['modal']||p['hackescunload']){document.onkeyup=function(e){if(e==null)keycode=event.keyCode;else keycode=e.which;if(keycode==27)Itb.Fr();};}}catch(e){}},Fsi:function(){$(fh+'l').remove();$(fh+'w').css({display:'block'});},Fr:function(){$(fh+'cWB').unbind('click');$(fh+'w').fadeOut('fast',function(){$(fh+'w, '+fh+'o, '+fh+'h').trigger('unload').unbind().remove();});$(fh+'l').remove();if('undefined'===typeof document.body.style.maxHeight){$('body','html').css({height:'auto',width:'auto'});$('html').css('overflow','');}document.onkeydown='';document.onkeyup='';return false;},Fp:function(){$(fh+'w').css({marginLeft:'-'+parseInt((W/2),10)+'px',width:W+'px'});if(!($.browser.msie&&$.browser.version<7))$(fh+'w').css({marginTop:'-'+parseInt((H/2),10)+'px'});},Fpq:function(q){P={};if(!q)return P;r=q.split(/[;&]/);for(i=0;i<r.length;i++){l=r[i].split('=');if(!l||l.length!=2)continue;k=unescape(l[0]);v=unescape(l[1]);v=v.replace(/\+/g,' ');P[k]=v;};return P;},Fdmx:function(){userAgent=navigator.userAgent.toLowerCase();return(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1)?true:false;},Fi:function(p){if(!p)p=Fis(1);setTimeout('Itb.Fsi()',1000);return"<iframe src='"+unq[0]+"' id='"+f+"i' name='"+f+"i"+Math.round(Math.random()*1000)+"' nload='Itb.Fsi()' frameborder='0' hspace='0' scrolling='no' marginheight='0' marginwidth='0' "+p+"></iframe>"},Fd:function(i,c,p){if(!c)c='';return"<div id='"+f+i+"' "+p+">"+c+"</div>"},Fis:function(w){if(w){acw+=29;ach+=17}return"style='width:"+acw+"px;height:"+ach+"px'"},Foc:function(l){f=this.f;t=l.title;a=l.href;if(a.indexOf(f+'iframe')==-1){Q='ishare_surl='+encodeURIComponent(parent.parent.location)+'&'+f+'iframe=true&modal=hack&height=420&width=620&hackescunload=1&hackstyle=ishare';if(a.indexOf('?')==-1)a+='?';else a+='&';a+=Q;}this.Fs(t,a);l.blur();return false}};Itb.init();