/**
 * Copyright (c) 2005 - 2009, James Auldridge
 * All rights reserved.
 *
 * Licensed under the BSD, MIT, and GPL (your choice!) Licenses:
 *  http://code.google.com/p/cookies/wiki/License
 *
 */
var jaaulde=window.jaaulde||{};jaaulde.utils=jaaulde.utils||{};jaaulde.utils.cookies=(function()
{var cookies=[];var defaultOptions={hoursToLive:null,path:'/',domain:null,secure:false};var resolveOptions=function(options)
{var returnValue;if(typeof options!=='object'||options===null)
{returnValue=defaultOptions;}
else
{returnValue={hoursToLive:(typeof options.hoursToLive==='number'&&options.hoursToLive!==0?options.hoursToLive:defaultOptions.hoursToLive),path:(typeof options.path==='string'&&options.path!==''?options.path:defaultOptions.path),domain:(typeof options.domain==='string'&&options.domain!==''?options.domain:defaultOptions.domain),secure:(typeof options.secure==='boolean'&&options.secure?options.secure:defaultOptions.secure)};}
return returnValue;};var expiresGMTString=function(hoursToLive)
{var dateObject=new Date();dateObject.setTime(dateObject.getTime()+(hoursToLive*60*60*1000));return dateObject.toGMTString();};var assembleOptionsString=function(options)
{options=resolveOptions(options);return((typeof options.hoursToLive==='number'?'; expires='+expiresGMTString(options.hoursToLive):'')+'; path='+options.path+
(typeof options.domain==='string'?'; domain='+options.domain:'')+
(options.secure===true?'; secure':''));};var splitCookies=function()
{cookies={};var pair,name,value,separated=document.cookie.split(';');for(var i=0;i<separated.length;i=i+1)
{pair=separated[i].split('=');name=pair[0].replace(/^\s*/,'').replace(/\s*$/,'');value=decodeURIComponent(pair[1]);cookies[name]=value;}
return cookies;};var constructor=function(){};constructor.prototype.get=function(cookieName)
{var returnValue;splitCookies();if(typeof cookieName==='string')
{returnValue=(typeof cookies[cookieName]!=='undefined')?cookies[cookieName]:null;}
else if(typeof cookieName==='object'&&cookieName!==null)
{returnValue={};for(var item in cookieName)
{if(typeof cookies[cookieName[item]]!=='undefined')
{returnValue[cookieName[item]]=cookies[cookieName[item]];}
else
{returnValue[cookieName[item]]=null;}}}
else
{returnValue=cookies;}
return returnValue;};constructor.prototype.filter=function(cookieNameRegExp)
{var returnValue={};splitCookies();if(typeof cookieNameRegExp==='string')
{cookieNameRegExp=new RegExp(cookieNameRegExp);}
for(var cookieName in cookies)
{if(cookieName.match(cookieNameRegExp))
{returnValue[cookieName]=cookies[cookieName];}}
return returnValue;};constructor.prototype.set=function(cookieName,value,options)
{if(typeof value==='undefined'||value===null)
{if(typeof options!=='object'||options===null)
{options={};}
value='';options.hoursToLive=-8760;}
var optionsString=assembleOptionsString(options);document.cookie=cookieName+'='+encodeURIComponent(value)+optionsString;};constructor.prototype.del=function(cookieName,options)
{var allCookies={};if(typeof options!=='object'||options===null)
{options={};}
if(typeof cookieName==='boolean'&&cookieName===true)
{allCookies=this.get();}
else if(typeof cookieName==='string')
{allCookies[cookieName]=true;}
for(var name in allCookies)
{if(typeof name==='string'&&name!=='')
{this.set(name,null,options);}}};constructor.prototype.test=function()
{var returnValue=false,testName='cT',testValue='data';this.set(testName,testValue);if(this.get(testName)===testValue)
{this.del(testName);returnValue=true;}
return returnValue;};constructor.prototype.setOptions=function(options)
{if(typeof options!=='object')
{options=null;}
defaultOptions=resolveOptions(options);};return new constructor();})();(function()
{if(window.jQuery)
{(function($)
{$.cookies=jaaulde.utils.cookies;var extensions={cookify:function(options)
{return this.each(function()
{var i,resolvedName=false,resolvedValue=false,name='',value='',nameAttrs=['name','id'],nodeName,inputType;for(i in nameAttrs)
{if(!isNaN(i))
{name=$(this).attr(nameAttrs[i]);if(typeof name==='string'&&name!=='')
{resolvedName=true;break;}}}
if(resolvedName)
{nodeName=this.nodeName.toLowerCase();if(nodeName!=='input'&&nodeName!=='textarea'&&nodeName!=='select'&&nodeName!=='img')
{value=$(this).html();resolvedValue=true;}
else
{inputType=$(this).attr('type');if(typeof inputType==='string'&&inputType!=='')
{inputType=inputType.toLowerCase();}
if(inputType!=='radio'&&inputType!=='checkbox')
{value=$(this).val();resolvedValue=true;}}
if(resolvedValue)
{if(typeof value!=='string'||value==='')
{value=null;}
$.cookies.set(name,value,options);}}});},cookieFill:function()
{return this.each(function()
{var i,resolvedName=false,name='',value,nameAttrs=['name','id'],iteration=0,nodeName;for(i in nameAttrs)
{if(!isNaN(i))
{name=$(this).attr(nameAttrs[i]);if(typeof name==='string'&&name!=='')
{resolvedName=true;break;}}}
if(resolvedName)
{value=$.cookies.get(name);if(value!==null)
{nodeName=this.nodeName.toLowerCase();if(nodeName==='input'||nodeName==='textarea'||nodeName==='select')
{$(this).val(value);}
else
{$(this).html(value);}}}
iteration=0;});},cookieBind:function(options)
{return this.each(function()
{$(this).cookieFill().change(function()
{$(this).cookify(options);});});}};$.each(extensions,function(i)
{$.fn[i]=this;});})(window.jQuery);}})();
if(!document.createElement('canvas').getContext){(function(){var m=Math;var y=m.round;var z=m.sin;var A=m.cos;var Z=10;var B=Z/2;function getContext(){if(this.context_){return this.context_}return this.context_=new CanvasRenderingContext2D_(this)}var C=Array.prototype.slice;function bind(f,b,c){var a=C.call(arguments,2);return function(){return f.apply(b,a.concat(C.call(arguments)))}}var D={init:function(a){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var b=a||document;b.createElement('canvas');b.attachEvent('onreadystatechange',bind(this.init_,this,b))}},init_:function(a){if(!a.namespaces['g_vml_']){a.namespaces.add('g_vml_','urn:schemas-microsoft-com:vml')}if(!a.styleSheets['ex_canvas_']){var b=a.createStyleSheet();b.owningElement.id='ex_canvas_';b.cssText='canvas{display:inline-block;overflow:hidden;'+'text-align:left;width:300px;height:150px}'+'g_vml_\\:*{behavior:url(#default#VML)}'}},i:function(a){if(!a.getContext){a.getContext=getContext;a.attachEvent('onpropertychange',onPropertyChange);a.attachEvent('onresize',onResize);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+'px'}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+'px'}else{a.height=a.clientHeight}}return a}};function onPropertyChange(e){var a=e.srcElement;switch(e.propertyName){case'width':a.style.width=a.attributes.width.nodeValue+'px';a.getContext().clearRect();break;case'height':a.style.height=a.attributes.height.nodeValue+'px';a.getContext().clearRect();break}}function onResize(e){var a=e.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+'px';a.firstChild.style.height=a.clientHeight+'px'}}D.init();var E=[];for(var i=0;i<16;i++){for(var j=0;j<16;j++){E[i*16+j]=i.toString(16)+j.toString(16)}}function createMatrixIdentity(){return[[1,0,0],[0,1,0],[0,0,1]]}function processStyle(a){var b,alpha=1;a=String(a);if(a.substring(0,3)=='rgb'){var c=a.indexOf('(',3);var d=a.indexOf(')',c+1);var e=a.substring(c+1,d).split(',');b='#';for(var i=0;i<3;i++){b+=E[Number(e[i])]}if(e.length==4&&a.substr(3,1)=='a'){alpha=e[3]}}else{b=a}return[b,alpha]}function processLineCap(a){switch(a){case'butt':return'flat';case'round':return'round';case'square':default:return'square'}}function CanvasRenderingContext2D_(a){this.m_=createMatrixIdentity();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle='#000';this.fillStyle='#000';this.lineWidth=1;this.lineJoin='miter';this.lineCap='butt';this.miterLimit=Z*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement('div');b.style.width=a.clientWidth+'px';b.style.height=a.clientHeight+'px';b.style.overflow='hidden';b.style.position='absolute';a.appendChild(b);this.element_=b;this.arcScaleX_=1;this.arcScaleY_=1}var F=CanvasRenderingContext2D_.prototype;F.clearRect=function(){this.element_.innerHTML='';this.currentPath_=[]};F.beginPath=function(){this.currentPath_=[]};F.moveTo=function(a,b){var p=this.getCoords_(a,b);this.currentPath_.push({type:'moveTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y};F.lineTo=function(a,b){var p=this.getCoords_(a,b);this.currentPath_.push({type:'lineTo',x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y};F.bezierCurveTo=function(a,b,c,d,e,f){var p=this.getCoords_(e,f);var g=this.getCoords_(a,b);var h=this.getCoords_(c,d);this.currentPath_.push({type:'bezierCurveTo',cp1x:g.x,cp1y:g.y,cp2x:h.x,cp2y:h.y,x:p.x,y:p.y});this.currentX_=p.x;this.currentY_=p.y};F.fillRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill();this.currentPath_=[]};F.createLinearGradient=function(a,b,c,d){return new CanvasGradient_('gradient')};F.createRadialGradient=function(a,b,c,d,e,f){var g=new CanvasGradient_('gradientradial');g.radius1_=c;g.radius2_=f;g.focus_.x=a;g.focus_.y=b;return g};F.stroke=function(d){var e=[];var f=false;var a=processStyle(d?this.fillStyle:this.strokeStyle);var g=a[0];var h=a[1]*this.globalAlpha;var W=10;var H=10;e.push('<g_vml_:shape',' fillcolor="',g,'"',' filled="',Boolean(d),'"',' style="position:absolute;width:',W,';height:',H,';"',' coordorigin="0 0" coordsize="',Z*W,' ',Z*H,'"',' stroked="',!d,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',g,'"',' path="');var j=false;var k={x:null,y:null};var l={x:null,y:null};for(var i=0;i<this.currentPath_.length;i++){var p=this.currentPath_[i];var c;switch(p.type){case'moveTo':e.push(' m ');c=p;e.push(y(p.x),',',y(p.y));break;case'lineTo':e.push(' l ');e.push(y(p.x),',',y(p.y));break;case'close':e.push(' x ');p=null;break;case'bezierCurveTo':e.push(' c ');e.push(y(p.cp1x),',',y(p.cp1y),',',y(p.cp2x),',',y(p.cp2y),',',y(p.x),',',y(p.y));break;case'at':case'wa':e.push(' ',p.type,' ');e.push(y(p.x-this.arcScaleX_*p.radius),',',y(p.y-this.arcScaleY_*p.radius),' ',y(p.x+this.arcScaleX_*p.radius),',',y(p.y+this.arcScaleY_*p.radius),' ',y(p.xStart),',',y(p.yStart),' ',y(p.xEnd),',',y(p.yEnd));break}if(p){if(k.x==null||p.x<k.x){k.x=p.x}if(l.x==null||p.x>l.x){l.x=p.x}if(k.y==null||p.y<k.y){k.y=p.y}if(l.y==null||p.y>l.y){l.y=p.y}}}e.push(' ">');if(typeof this.fillStyle=='object'){var m={x:'50%',y:'50%'};var n=l.x-k.x;var o=l.y-k.y;var q=n>o?n:o;m.x=y(this.fillStyle.focus_.x/n*100+50)+'%';m.y=y(this.fillStyle.focus_.y/o*100+50)+'%';var r=[];if(this.fillStyle.type_=='gradientradial'){var s=this.fillStyle.radius1_/q*100;var t=this.fillStyle.radius2_/q*100-s}else{var s=0;var t=100}var u={offset:null,color:null};var v={offset:null,color:null};this.fillStyle.colors_.sort(function(a,b){return a.offset-b.offset});for(var i=0;i<this.fillStyle.colors_.length;i++){var w=this.fillStyle.colors_[i];r.push(w.offset*t+s,'% ',w.color,',');if(w.offset>u.offset||u.offset==null){u.offset=w.offset;u.color=w.color}if(w.offset<v.offset||v.offset==null){v.offset=w.offset;v.color=w.color}}r.pop();e.push('<g_vml_:fill',' color="',v.color,'"',' color2="',u.color,'"',' type="',this.fillStyle.type_,'"',' focusposition="',m.x,', ',m.y,'"',' colors="',r.join(''),'"',' opacity="',h,'" />')}else if(d){e.push('<g_vml_:fill color="',g,'" opacity="',h,'" />')}else{var x=Math.max(this.arcScaleX_,this.arcScaleY_)*this.lineWidth;e.push('<g_vml_:stroke',' opacity="',h,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',processLineCap(this.lineCap),'"',' weight="',x,'px"',' color="',g,'" />')}e.push('</g_vml_:shape>');this.element_.insertAdjacentHTML('beforeEnd',e.join(''))};F.fill=function(){this.stroke(true)};F.closePath=function(){this.currentPath_.push({type:'close'})};F.getCoords_=function(a,b){return{x:Z*(a*this.m_[0][0]+b*this.m_[1][0]+this.m_[2][0])-B,y:Z*(a*this.m_[0][1]+b*this.m_[1][1]+this.m_[2][1])-B}};function CanvasPattern_(){}G_vmlCMjrc=D})()}if(jQuery.browser.msie){document.execCommand("BackgroundImageCache",false,true)}(function($){var N=$.browser.msie;var O=N&&!window.XMLHttpRequest;var P=$.browser.opera;var Q=typeof document.createElement('canvas').getContext=="function";var R=function(i){return parseInt(i,10)||0};var S=function(a,b,c){var x=a,y;if(x.currentStyle){y=x.currentStyle[b]}else if(window.getComputedStyle){if(typeof arguments[2]=="string")b=c;y=document.defaultView.getComputedStyle(x,null).getPropertyValue(b)}return y};var T=function(a,p){return S(a,'border'+p+'Color','border-'+p.toLowerCase()+'-color')};var U=function(a,p){if(a.currentStyle&&!P){w=a.currentStyle['border'+p+'Width'];if(w=='thin')w=2;if(w=='medium'&&!(a.currentStyle['border'+p+'Style']=='none'))w=4;if(w=='thick')w=6}else{p=p.toLowerCase();w=document.defaultView.getComputedStyle(a,null).getPropertyValue('border-'+p+'-width')}return R(w)};var V=function(a,i){return a.tagName.toLowerCase()==i};var W=function(e,a,b,c,d){if(e=='tl')return a;if(e=='tr')return b;if(e=='bl')return c;if(e=='br')return d};var X=function(a,b,c,d,e,f,g){var h,curve_to;if(d.indexOf('rgba')!=-1){var i=/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/;var j=i.exec(d);if(j){var k=[R(j[1]),R(j[2]),R(j[3])];d='rgb('+k[0]+', '+k[1]+', '+k[2]+')'}}var l=a.getContext('2d');if(b==1||g=='notch'){if(e>0&&b>1){l.fillStyle=f;l.fillRect(0,0,b,b);l.fillStyle=d;h=W(c,[0-e,0-e],[e,0-e],[0-e,e],[e,e]);l.fillRect(h[0],h[1],b,b)}else{l.fillStyle=d;l.fillRect(0,0,b,b)}return a}else if(g=='bevel'){h=W(c,[0,0,0,b,b,0,0,0],[0,0,b,b,b,0,0,0],[0,0,b,b,0,b,0,0],[b,b,b,0,0,b,b,b]);l.fillStyle=d;l.beginPath();l.moveTo(h[0],h[1]);l.lineTo(h[2],h[3]);l.lineTo(h[4],h[5]);l.lineTo(h[6],h[7]);l.fill();if(e>0&&e<b){l.strokeStyle=f;l.lineWidth=e;l.beginPath();h=W(c,[0,b,b,0],[0,0,b,b],[b,b,0,0],[0,b,b,0]);l.moveTo(h[0],h[1]);l.lineTo(h[2],h[3]);l.stroke()}return a}h=W(c,[0,0,b,0,b,0,0,b,0,0],[b,0,b,b,b,0,0,0,0,0],[0,b,b,b,0,b,0,0,0,b],[b,b,b,0,b,0,0,b,b,b]);l.fillStyle=d;l.beginPath();l.moveTo(h[0],h[1]);l.lineTo(h[2],h[3]);if(c=='br')l.bezierCurveTo(h[4],h[5],b,b,h[6],h[7]);else l.bezierCurveTo(h[4],h[5],0,0,h[6],h[7]);l.lineTo(h[8],h[9]);l.fill();if(e>0&&e<b){var m=e/2;var n=b-m;h=W(c,[n,m,n,m,m,n],[n,n,n,m,m,m],[n,n,m,n,m,m,m,n],[n,m,n,m,m,n,n,n]);curve_to=W(c,[0,0],[0,0],[0,0],[b,b]);l.strokeStyle=f;l.lineWidth=e;l.beginPath();l.moveTo(h[0],h[1]);l.bezierCurveTo(h[2],h[3],curve_to[0],curve_to[1],h[4],h[5]);l.stroke()}return a};var Y=function(p,a){var b=document.createElement('canvas');b.setAttribute("height",a);b.setAttribute("width",a);b.style.display="block";b.style.position="absolute";b.className="jrCorner";Z(p,b);if(!Q&&N){if(typeof G_vmlCanvasManager=="object"){b=G_vmlCanvasManager.initElement(b)}else if(typeof G_vmlCMjrc=="object"){b=G_vmlCMjrc.i(b)}else{throw Error('Could not find excanvas');}}return b};var Z=function(p,a){if(p.is("table")){p.children("tbody").children("tr:first").children("td:first").append(a);p.css('display','block')}else if(p.is("td")){if(p.children(".JrcTdContainer").length===0){p.html('<div class="JrcTdContainer" style="padding:0px;position:relative;margin:-1px;zoom:1;">'+p.html()+'</div>');p.css('zoom','1');if(O){p.children(".JrcTdContainer").get(0).style.setExpression("height","this.parentNode.offsetHeight")}}p.children(".JrcTdContainer").append(a)}else{p.append(a)}};if(N){var ba=document.createStyleSheet();ba.media='print';ba.cssText='.jrcIECanvasDiv { display:none !important; }'}var bb=function(D){if(this.length==0||!(Q||N)){return this}if(D=="destroy"){return this.each(function(){var p,elm=$(this);if(elm.is(".jrcRounded")){if(typeof elm.data("ie6tmr.jrc")=='number')window.clearInterval(elm.data("ie6tmr.jrc"));if(elm.is("table"))p=elm.children("tbody").children("tr:first").children("td:first");else if(elm.is("td"))p=elm.children(".JrcTdContainer");else p=elm;p.children(".jrCorner").remove();elm.unbind('mouseleave.jrc').unbind('mouseenter.jrc').removeClass('jrcRounded').removeData('ie6tmr.jrc');if(elm.is("td"))elm.html(elm.children(".JrcTdContainer").html())}})}var o=(D||"").toLowerCase();var E=R((o.match(/(\d+)px/)||[])[1])||"auto";var F=((o.match(/(#[0-9a-f]+)/)||[])[1])||"auto";var G=/round|bevel|notch/;var H=((o.match(G)||['round'])[0]);var I=/hover/.test(o);var J=/oversized/.test(o);var K=o.match("hiddenparent");if(N){var G=/ie6nofix|ie6fixinit|ie6fixexpr|ie6fixonload|ie6fixwidthint|ie6fixheightint|ie6fixbothint/;var L=((o.match(G)||['ie6fixinit'])[0])}var M={tl:/top|left|tl/.test(o),tr:/top|right|tr/.test(o),bl:/bottom|left|bl/.test(o),br:/bottom|right|br/.test(o)};if(!M.tl&&!M.tr&&!M.bl&&!M.br)M={tl:1,tr:1,bl:1,br:1};this.each(function(){var d=$(this),rbg=null,bg,s,b,pr;var a=this;var e=S(this,'display');var f=S(this,'position');var g=S(this,'lineHeight','line-height');if(F=="auto"){s=d.siblings(".jrcRounded:eq(0)");if(s.length>0){b=s.data("rbg.jrc");if(typeof b=="string"){rbg=b}}}if(K||rbg===null){var h=this.parentNode,hidden_parents=new Array(),a=0;while((typeof h=='object')&&!V(h,'html')){if(K&&S(h,'display')=='none'){hidden_parents.push({originalvisibility:S(h,'visibility'),elm:h});h.style.display='block';h.style.visibility='hidden'}var j=S(h,'backgroundColor','background-color');if(rbg===null&&j!="transparent"&&j!="rgba(0, 0, 0, 0)"){rbg=j}h=h.parentNode}if(rbg===null)rbg="#ffffff"}if(F=="auto"){bg=rbg;d.data("rbg.jrc",rbg)}else{bg=F}if(e=='none'){var k=S(this,'visibility');this.style.display='block';this.style.visibility='hidden';var l=true}else{var m=false}var n=d.height();var p=d.width();if(I){var q=o.replace(/hover|ie6nofix|ie6fixinit|ie6fixexpr|ie6fixonload|ie6fixwidthint|ie6fixheightint|ie6fixbothint/g,"");if(L!='ie6nofix')q="ie6fixinit "+q;d.bind("mouseenter.jrc",function(){d.addClass('jrcHover');d.corner(q)});d.bind("mouseleave.jrc",function(){d.removeClass('jrcHover');d.corner(q)})}if(O&&L!='ie6nofix'){this.style.zoom=1;if(L!='ie6fixexpr'){if(d.width()%2!=0)d.width(d.width()+1);if(d.height()%2!=0)d.height(d.height()+1)}$(window).load(function(){if(L=='ie6fixonload'){if(d.css('height')=='auto')d.height(d.css('height'));if(d.width()%2!=0)d.width(d.width()+1);if(d.height()%2!=0)d.height(d.height()+1)}else if(L=='ie6fixwidthint'||L=='ie6fixheightint'||L=='ie6fixbothint'){var c,ie6FixFunction;if(L=='ie6fixheightint'){ie6FixFunction=function(){d.height('auto');var a=d.height();if(a%2!=0)a=a+1;d.css({height:a})}}else if(L=='ie6fixwidthint'){ie6FixFunction=function(){d.width('auto');var a=d.width();if(a%2!=0)a=a+1;d.css({width:a});d.data('lastWidth.jrc',d.get(0).offsetWidth)}}else if(L=='ie6fixbothint'){ie6FixFunction=function(){d.width('auto');d.height('auto');var a=d.width();var b=d.height();if(b%2!=0)b=b+1;if(a%2!=0)a=a+1;d.css({width:a,height:b})}}c=window.setInterval(ie6FixFunction,100);d.data("ie6tmr.jrc",c)}})}var r=n<p?this.offsetHeight:this.offsetWidth;if(E=="auto"){E=r/2;if(E>10)E=r/4}if(E>r/2&&!J){E=r/2}E=Math.floor(E);var t=U(this,'Top');var u=U(this,'Right');var v=U(this,'Bottom');var w=U(this,'Left');if(f=='static'&&!V(this,'td')){this.style.position='relative'}else if(f=='fixed'&&N&&!(document.compatMode=='CSS1Compat'&&!O)){this.style.position='absolute'}if(t+u+v+w>0){this.style.overflow='visible'}if(l)d.css({display:'none',visibility:k});if(typeof hidden_parents!="undefined"){for(var i=0;i<hidden_parents.length;i++){hidden_parents[i].elm.style.display='none';hidden_parents[i].elm.style.visibility=hidden_parents[i].originalvisibility}}var x=0-t,p_right=0-u,p_bottom=0-v,p_left=0-w;var y=(d.find("canvas").length>0);if(y){if(V(this,'table'))pr=d.children("tbody").children("tr:first").children("td:first");else if(V(this,'td'))pr=d.children(".JrcTdContainer");else pr=d}if(M.tl){bordersWidth=t<w?t:w;if(y)pr.children("canvas.jrcTL").remove();var z=X(Y(d,E),E,'tl',bg,bordersWidth,T(this,'Top'),H);$(z).css({left:p_left,top:x}).addClass('jrcTL')}if(M.tr){bordersWidth=t<u?t:u;if(y)pr.children("canvas.jrcTR").remove();var A=X(Y(d,E),E,'tr',bg,bordersWidth,T(this,'Top'),H);$(A).css({right:p_right,top:x}).addClass('jrcTR')}if(M.bl){bordersWidth=v<w?v:w;if(y)pr.children("canvas.jrcBL").remove();var B=X(Y(d,E),E,'bl',bg,bordersWidth,T(this,'Bottom'),H);$(B).css({left:p_left,bottom:p_bottom}).addClass('jrcBL')}if(M.br){bordersWidth=v<u?v:u;if(y)pr.children("canvas.jrcBR").remove();var C=X(Y(d,E),E,'br',bg,bordersWidth,T(this,'Bottom'),H);$(C).css({right:p_right,bottom:p_bottom}).addClass('jrcBR')}if(N)d.children('canvas.jrCorner').children('div').addClass('jrcIECanvasDiv');if(O&&L=='ie6fixexpr'){if(M.bl){B.style.setExpression("bottom","this.parentNode.offsetHeight % 2 == 0 || this.parentNode.offsetWidth % 2 == 0 ? 0-(parseInt(this.parentNode.currentStyle['borderBottomWidth'])) : 0-(parseInt(this.parentNode.currentStyle['borderBottomWidth'])+1)")}if(M.br){C.style.setExpression("right","this.parentNode.offsetWidth  % 2 == 0 || this.parentNode.offsetWidth % 2 == 0 ? 0-(parseInt(this.parentNode.currentStyle['borderRightWidth']))  : 0-(parseInt(this.parentNode.currentStyle['borderRightWidth'])+1)");C.style.setExpression("bottom","this.parentNode.offsetHeight % 2 == 0 || this.parentNode.offsetWidth % 2 == 0 ? 0-(parseInt(this.parentNode.currentStyle['borderBottomWidth'])) : 0-(parseInt(this.parentNode.currentStyle['borderBottomWidth'])+1)")}if(M.tr){A.style.setExpression("right","this.parentNode.offsetWidth   % 2 == 0 || this.parentNode.offsetWidth % 2 == 0 ? 0-(parseInt(this.parentNode.currentStyle['borderRightWidth']))  : 0-(parseInt(this.parentNode.currentStyle['borderRightWidth'])+1)")}}d.addClass('jrcRounded')});if(typeof arguments[1]=="function")arguments[1](this);return this};$.fn.corner=bb})(jQuery);
// jquery.jsonp 1.0.4 (c) 2009 Julian Aubourg | MIT License
// http://code.google.com/p/jquery-jsonp/
(function($){var x=function(o){return o!==undefined&&o!==null;},H=$("head"),Z={},K={callback:"C",url:location.href};$.jsonp=function(d){d=$.extend({},K,d);if(x(d.beforeSend)){var t=0;d.abort=function(){t=1;};if(d.beforeSend(d,d)===false||t)return d;}
var _="",y="success",n="error",u=x(d.url)?d.url:_,p=x(d.data)?d.data:_,s=(typeof p)=="string",k=function(f){setTimeout(f,1);},S,P,i,j,U;p=s?p:$.param(p);x(d.callbackParameter)&&(p+=(p==_?_:"&")+escape(d.callbackParameter)+"=?");!d.cache&&!d.pageCache&&(p+=[(p==_?_:"&"),"_xx",(new Date()).getTime(),"=",1].join(_));S=u.split("?");if(p!=_){P=p.split("?");j=S.length-1;j&&(S[j]+="&"+P.shift());S=S.concat(P);}
i=S.length-2;i&&(S[i]+=d.callback+S.pop());U=S.join("?");if(d.pageCache&&x(Z[U])){k(function(){if(x(Z[U].e)){x(d.error)&&d.error(d,n);x(d.complete)&&d.complete(d,n);}else{var v=Z[U].s;x(d.dataFilter)&&(v=d.dataFilter(v));x(d.success)&&d.success(v,y);x(d.complete)&&d.complete(d,y);}});return d;}
var f=$("<iframe />");H.append(f);var F=f[0],W=F.contentWindow||F.contentDocument,D=W.document;if(!x(D)){D=W;W=D.getParentNode();}
var w,e=function(_,m){d.pageCache&&!x(m)&&(Z[U]={e:1});w();m=x(m)?m:n;x(d.error)&&d.error(d,m);x(d.complete)&&d.complete(d,m);},t=0,C=d.callback,E=C=="E"?"X":"E";D.open();W[C]=function(v){t=1;d.pageCache&&(Z[U]={s:v});k(function(){w();x(d.dataFilter)&&(v=d.dataFilter(v));x(d.success)&&d.success(v,y);x(d.complete)&&d.complete(d,y);});};W[E]=function(s){(!s||s=="complete")&&!t++&&k(e);};w=function(){W[E]=undefined;W[C]=undefined;try{delete W[E];}catch(_){}
try{delete W[C];}catch(_){}
D.open()
D.write(_);D.close();f.remove();}
k(function(){D.write(unescape(['%3Chtml%3E%3Chead%3E%3Cscript src="',U,'" onload="',E,'()" onreadystatechange="',E,'(this.readyState)"%3E%3C/script%3E%3C/head%3E%3Cbody onload="',E,'()"%3E%3C/body%3E%3C/html%3E'].join(_)));D.close();});d.timeout>0&&setTimeout(function(){!t&&e(_,"timeout");},d.timeout);d.abort=w;return d;}
$.jsonp.setup=function(o){$.extend(K,o);};})(jQuery);
(function(a2){var aq="none";try{var t=a2('<canvas width="10" height="10"></canvas>'),u=t.get(0),aL=u?u.getContext("2d"):false;
if(aL){if(typeof aL.fillText!="undefined"){aq="native"}else{if(typeof aL.mozDrawText!="undefined"){aq="moz"}}}}catch(ai){}try{if(aq!="moz"&&aq!="native"){var V=document.createElement("SCRIPT");
V.setAttribute("type","text/javascript");V.setAttribute("id","canvastextscript");V.setAttribute("src","/javascripts/canvas.text.js");
a2("head").append(V)}}catch(ai){}var I=function(e){var bp=[];for(var bo=0,bq=e.length;bo<bq;++bo){if(e[bo]&&e[bo].klass){if((typeof e[bo].getId)!="undefined"){bp.push("<"+e[bo].klass+":"+e[bo].getId()+">")
}else{bp.push("<"+e[bo].klass+">")}}else{bp.push(""+e[bo]+"")}}return"["+bp.join(", ")+"]"};var bl=48,a7=bl,l=10,aZ=1,z=1,aw=1,ba=12,ah=16,aS=30,a9=60,y=4,bb=2,aP=3,ad=200,a6=1000,bn=5,aV=40,T=19,aX={friends:"You &amp; Friends",followers:"Your Followers",mentions:"Your Mentions",everyone:"Everyone's Tweets"},g="rgb(0,0,0)",R=(aq=="none")?"normal 10px 'helvetiker'":"normal 9px Lucida Grande, Arial, sans-serif",J="tweetbricks_name",aj="tweetbricks_uid",aU="tweetbricks_image",av=a2.cookies,bj="http://static.twitter.com/images/default_profile_normal.png",H=new Image(),M=false,aN=0,G=0,j=0,ae=1,S=1,bf="-",aB={},o=false,bk=false,aJ=false,K=false,d=false,aO=false,bg=false,h=false,f=false,i=false,E=false,bc=false,ap=false,aK=false,Y=false,ak=false,x=false,bd=false,al=null,au=null,bi={},ar=(new Date()).getTime(),ao=0,a0=[],af=0,O=0,ay=1,F=0;
H.src=bj;var bh=function(br,bp){var bt=parseInt((br.length==3)?br.substring(0,1)+br.substring(0,1):br.substring(0,2),16),bs=parseInt((br.length==3)?br.substring(1,2)+br.substring(1,2):br.substring(2,4),16),bo=parseInt((br.length==3)?br.substring(2)+br.substring(2):br.substring(4,6),16),e=[],bu;
if(typeof bp=="function"){bu=bp(bt,bs,bo)}else{if(bp instanceof Array){bu=[(bt*bp[0]),(bs*bp[1]),(bo*bp[2])]}else{if(typeof bp=="object"){bu=[(bt*bp.r),(bs*bp.g),(bo*bp.b)]
}else{bu=[(bt*bp),(bs*bp),(bo*bp)]}}}for(var bq=0;bq<3;++bq){e.push(Math.max(Math.min(Math.round(bu[bq]),255),0).toString(16));
if(e[bq].length==1){e[bq]+=e[bq]}}return e.join("")};window.tweakColor=bh;function n(bo,e){this._a=a2.extend({},bo||{});this._b=z++;
this._c(e||{})}n.prototype={avatar_url:function(){return(this._a.user?this._a.user.profile_image_url:this._a.profile_image_url)
},avatar_image:function(e){if(!this._d){if(!this._e){this._f(e)}else{}return false}else{if(e){e()}return this._e}},_f:function(bo){var e=this;
this._e=new Image();this._e.onload=function(){e._d=true;if(bo){bo()}};this._e.onerror=function(){e._d=true;e._e.src=H.src;
if(bo){bo()}};this._e.src=this.avatar_url()},created_at:function(){return Date.parse(this._a.created_at)},user_screen_name:function(){return(this._a.user?this._a.user.screen_name:this._a.from_user)
},user_id:function(){return(this._a.user?this._a.user.id:this._a.from_user_id)},isFavorite:function(){return !!this._a.favorited
},id:function(){return this._a.id},text:function(){return this._a.text},mintext:function(){if(this._a.mintext){return this._a.mintext
}var e=this._a.text.replace(/http:\/\/\S+/,"");return(e.match(/[a-zA-Z0-9]+/)?e:this._a.text)},data:function(){return a2.extend({},data)
},tweet_url:function(){return this.user_url()+"/status/"+this._a.id},user_url:function(){return"http://twitter.com/"+this.user_screen_name()
},load:function(e){this._g(e)},_c:function(e){this._h=!!(this._a.text&&this._a.from_user)},_g:function(e){if(this._h){return true
}var bo=this;return a2.getJSON(this._i("json")+"?callback=?",function(bp){bo._j(bp,e)})},_j:function(bo,e){a2.extend(this._a,bo);
this._h=true;if(e){e(this)}},_i:function(e){e=(e?"."+e:"");return"http://twitter.com/statuses/show/"+this._a.id+e},_e:null,_d:false,_h:false,klass:"Tweet"};
function w(bo,e){this._b(e||{})}w.prototype={_b:function(e){},klass:"Twitter"};var a3=(aq=="moz");window.useMozContext=a3;
function aA(bo,bp,e){this._a=aZ++;this._b=bo;this._c=bp;this._d(e)}aA.prototype={activate:function(){if(this._b.isOpen(this._e,this._f,this._g)){this._h(this._e,this._f);
this._b.showBrick(this._i);return true}else{return false}},cropRow:function(bp){var e=this._g,br,bt,bs,bq,bo;if(bp==this._f){br=e.shift();
this._i.css("height",(e.length*a7)+"px");this._f++;return(e.length>0)}else{if(bp==(this._f+e.length-1)){br=e.pop();this._i.css("height",(e.length*a7)+"px");
this._j.css("top","-"+(a7)+"px");this._h(this._e,this._f);return(e.length>0)}else{bt=e.length;bs=e.reverse().slice(bp-this._f+1).reverse();
bq=(bp+1);bo=new aA(this._b,this._c,[this,bq,bs]);this._g=e.reverse().slice(0,(bp-this._f)).reverse();this._i.css("height",(this._g.length*a7)+"px");
this._j.css("top","-"+((bt-(bp-this._f))*a7)+"px");this._h(this._e,this._f);return bo}}},deactivate:function(){this._k="inactive"
},destroy:function(){if(this._l){this._i.remove()}this._l=false},drop:function(){var e=0;while((e<30)&&this.move(0,-1)){e++
}},getId:function(){return this._a},getLocation:function(){return[this._e,this._f,this._g]},getTweet:function(){return this._c
},getType:function(){return this._m},isClone:function(){return !!this._n},isReady:function(){return !!this._o},isSpecial:function(){if(typeof this._p=="undefined"){this._p=!!(((this._a%50)==0)||(this._c&&this._c.isFavorite()))
}return this._p},move:function(bo,e,bp){if(bp||this._b.isOpen((this._e+bo),(this._f+e),this._g)){this._h((this._e+bo),(this._f+e));
return true}else{return false}},resize:function(){this._j.html("");this._q();if(this._k=="inactive"){this._r(true)}else{this._r()
}this._h(this._e,this._f)},rotate:function(bs){var bu=this._s,bt=this._g,br=[];switch(bs){case"left":this._s=((bu-1)<0)?3:(bu-1);
for(var bq=0,e=bt[0].length;bq<e;++bq){var bv=[];for(var bp=0,bo=bt.length;bp<bo;++bp){bv.push(bt[bp][(e-bq-1)])}br.push(bv)
}break;case"right":this._s=(bu+1)%4;for(var bq=0,e=bt[0].length;bq<e;++bq){var bv=[];for(var bp=0,bo=bt.length;bp<bo;++bp){bv.push(bt[(bo-bp-1)][bq])
}br.push(bv)}break;default:throw new Error("Bad direction: "+bs);break}this._g=br;this._q();this._h(this._e,this._f);if(this._b.isOpen(this._e,this._f,this._g)){this._t()
}else{this._g=bt;this._s=bu;this._q();this._h(this._e,this._f)}},_u:function(bq){var bo=bq[0],bp=bq[1],e=bq[2];this._m=bo._m;
this._e=bo._e;this._s=bo._s;this._k=bo._k;this._n=bo._a;this._v=bo._v;this._w=bo._w;this._p=bo._p;this._x();this._f=bo._f;
this._g=bo._g;this._q();this._r(true);this._f=bp;this._g=e;this._q();this._b.showBrick(this._i)},_d:function(bp){if(bp){return this._u(bp)
}this._m=Math.floor(Math.random()*4);this._x();switch(this._m){case 0:this._g=[[true,false,false],[true,true,true]];break;
case 1:this._g=[[false,false,true],[true,true,true]];break;case 2:this._g=[[false,true,false],[true,true,true]];break;case 3:this._g=[[true,true,true,true]];
break;case 4:this._g=[[true,true],[true,true]];break;default:break}var e=Math.floor((ba-this._g[0].length)/2),bq=ah-this._g.length;
this._q();this._e=e;this._f=bq;var bo=this;this._c.avatar_image(function(){bo._r()})},_h:function(e,bo){this._e=e;this._f=bo;
this._i.css({top:((ah-bo-this._g.length)*a7)+"px",left:(e*a7)+"px"})},_t:function(){a2(".canvas_wrap",this._j).hide();a2(".brickOrnt"+this._s,this._j).show()
},_q:function(){this._i.css({width:(this._g[0].length*a7)+"px",height:(this._g.length*a7)+"px"})},_z:function(){var bp,bo,bq,e;
if(!this._v){bp=(Math.floor(Math.random()*3+1)*51);bo=Math.floor(bp*0.75);if(this.isSpecial()){bq="rgb(255,204,0)";e="rgb(208,163,0)"
}else{switch(this._m){case 0:bq="rgb("+bp+",0,0)";e="rgb("+bo+",0,0)";break;case 1:bq="rgb(0,"+bp+",0)";e="rgb(0,"+bo+",0)";
break;case 2:bq="rgb(0,0,"+bp+")";e="rgb(0,0,"+bo+")";break;case 3:bq="rgb("+bp+",0,"+bp+")";e="rgb("+bo+",0,"+bp+")";break;
case 4:bq="rgb(0,"+bp+","+bp+")";e="rgb(0,"+bo+","+bp+")";break;default:bq="rgb(102,102,102)";e="rgb(51,51,51)";break}}this._v=bq;
this._w=e}},_x:function(){this._i=a2('<div class="brick brick'+this._m+'" id="brickId'+this._a+'"></div>');this._j=a2('<div class="brick_wrap"></div>');
this._i.append(this._j)},_r:function(e){if(e){this._B(this._s)}else{for(var bo=0;bo<4;++bo){this._B(bo)}}this._t();this._o=true
},_B:function(e){var bu,bv,bt,bs,bx,bo=4,by=this._g,bw=by[0].length*a7,br=by.length*a7,bq=a2('<div class="canvas_wrap brickOrnt'+e+'"></div>');
this._j.append(bq);if((e%2)!=(this._s%2)){bv=bw;bw=br;br=bv}bs=document.createElement("CANVAS");bs.setAttribute("width",bw);
bs.setAttribute("height",br);bq.append(bs);try{if(typeof G_vmlCanvasManager!="undefined"){bu=G_vmlCanvasManager.initElement(bs).getContext("2d")
}else{bu=bs.getContext("2d")}}catch(bp){}bu.save();bu.rotate((Math.PI/2)*e);if(e==1){bu.translate(0,-1*bw)}else{if(e==2){bu.translate(-1*bw,-1*br)
}else{if(e==3){bu.translate(-1*br,0)}}}switch(this._m){case 0:this._C(bu,bw,br,e);break;case 1:this._D(bu,bw,br,e);break;
case 2:this._E(bu,bw,br,e);break;case 3:this._F(bu,bw,br,e);break;case 4:this._G(bu,bw,br,e);break}},_C:function(bv,by,bs,e){var bo=4,bu=by,bq=bs,bt,bw,bz,bx;
this._z();bt=this._v;bw=this._w;if((e%2)>0){bu=bs;bq=by}bv.fillStyle=bt;bv.fillRect(0,0,a7,a7);bv.fillStyle=bw;bv.fillRect((bo-1),(bo-1),(a7-(bo*2)+2),(a7-(bo*2)+2));
bv.drawImage(this._c.avatar_image(),bo,bo,(a7-(bo*2)),(a7-(bo*2)));bv.fillStyle=bt;bv.fillRect(0,a7,bu,a7);bv.fillStyle="rgb(255,255,255)";
bv.fillRect(bo,(a7+bo),(bu-(bo*2)),(a7-(bo*2)));bx=(bu-(bo*2)-2);bv.save();bv.translate(Math.floor(a7/2),(a7-(bo*2)+2));bv.rotate((Math.PI/4));
bv.fillRect(3,3,(bo*2*3),(bo*2*3));bv.restore();bv.save();bv.translate((bo+2),(a7+(bo)+10));bv.fillStyle=g;if(a3){bv.mozTextStyle=R
}else{bv.font=R}bz=this._H(bv,this._c.text(),bx);bv.translate(0,2);for(var br=0,bp=Math.min(3,bz.length);br<bp;++br){if(a3){bv.mozDrawText(bz[br].join(" ")+((br==2&&bp>2)?"...":""))
}else{bv.fillText(bz[br].join(" ")+((br==2&&bp>2)?"...":""),0,0)}bv.translate(0,11)}bv.restore()},_D:function(bv,by,bs,e){var bw,bt,bo=4,bu=by,bq=bs,bz,bx;
this._z();bt=this._v;bw=this._w;if((e%2)>0){bu=bs;bq=by}bv.fillStyle=bt;bv.fillRect((bu-a7),0,a7,a7);bv.fillStyle=bw;bv.fillRect(((bu-a7)+bo-1),(bo-1),(a7-(bo*2)+2),(a7-(bo*2)+2));
bv.drawImage(this._c.avatar_image(),((bu-a7)+bo),bo,(a7-(bo*2)),(a7-(bo*2)));bv.fillStyle=bt;bv.fillRect(0,a7,bu,a7);bv.fillStyle="rgb(255,255,255)";
bv.fillRect(bo,(a7+bo),(bu-(bo*2)),(a7-(bo*2)));bx=(bu-(bo*2)-2);bv.save();bv.translate(((bu-a7)+Math.floor(a7/2)),(a7-(bo*2)+2));
bv.rotate((Math.PI/4));bv.fillRect(3,3,(bo*2*3),(bo*2*3));bv.restore();bv.save();bv.translate((bo+2),(a7+(bo)+10));bv.fillStyle=g;
if(a3){bv.mozTextStyle=R}else{bv.font=R}bz=this._H(bv,this._c.text(),bx);bv.translate(0,2);for(var br=0,bp=Math.min(3,bz.length);
br<bp;++br){if(a3){bv.mozDrawText(bz[br].join(" ")+((br==2&&bp>2)?"...":""))}else{bv.fillText(bz[br].join(" ")+((br==2&&bp>2)?"...":""),0,0)
}bv.translate(0,11)}bv.restore()},_E:function(bv,by,bs,e){var bw,bt,bo=4,bu=by,bq=bs,bz,bx;this._z();bt=this._v;bw=this._w;
if((e%2)>0){bu=bs;bq=by}bv.fillStyle=bt;bv.fillRect(a7,0,a7,a7);bv.fillStyle=bw;bv.fillRect((a7+bo-1),(bo-1),(a7-(bo*2)+2),(a7-(bo*2)+2));
bv.drawImage(this._c.avatar_image(),(a7+bo),bo,(a7-(bo*2)),(a7-(bo*2)));bv.fillStyle=bt;bv.fillRect(0,a7,bu,a7);bv.fillStyle="rgb(255,255,255)";
bv.fillRect(bo,(a7+bo),(bu-(bo*2)),(a7-(bo*2)));bx=(bu-(bo*2)-2);bv.save();bv.translate((a7+Math.floor(a7/2)),(a7-(bo*2)+2));
bv.rotate((Math.PI/4));bv.fillRect(3,3,(bo*2*3),(bo*2*3));bv.restore();bv.save();bv.translate((bo+2),(a7+(bo)+10));bv.fillStyle=g;
if(a3){bv.mozTextStyle=R}else{bv.font=R}bz=this._H(bv,this._c.text(),bx);bv.translate(0,2);for(var br=0,bp=Math.min(3,bz.length);
br<bp;++br){if(a3){bv.mozDrawText(bz[br].join(" ")+((br==2&&bp>2)?"...":""))}else{bv.fillText(bz[br].join(" ")+((br==2&&bp>2)?"...":""),0,0)
}bv.translate(0,11)}bv.restore()},_F:function(bv,by,bs,e){var bw,bt,bo=4,bu=by,bq=bs,bz,bx;this._z();bt=this._v;bw=this._w;
if((e%2)>0){bu=bs;bq=by}bv.fillStyle=bt;bv.fillRect(0,0,bu,bq);bv.fillStyle=bw;bv.fillRect((bo-1),(bo-1),(a7-(bo*2)+2),(a7-(bo*2)+2));
bv.drawImage(this._c.avatar_image(),bo,bo,(a7-(bo*2)),(a7-(bo*2)));bv.fillStyle="rgb(255,255,255)";bv.fillRect((a7+bo),bo,(bu-a7-(bo*2)),(bq-(bo*2)));
bx=(bu-a7-(bo*2)-4);bv.save();bv.translate((a7-(bo*2)+2),Math.floor(a7/2));bv.rotate(-1*(Math.PI/4));bv.fillRect(3,3,(bo*2*3),(bo*2*3));
bv.restore();bv.save();bv.translate((a7+(bo)+2),(bo+8));bv.fillStyle=g;if(a3){bv.mozTextStyle=R}else{bv.font=R}bz=this._H(bv,this._c.text(),bx);
bv.translate(0,2);for(var br=0,bp=Math.min(3,bz.length);br<bp;++br){if(a3){bv.mozDrawText(bz[br].join(" ")+((br==2&&bp>2)?"...":""))
}else{bv.fillText(bz[br].join(" ")+((br==2&&bp>2)?"...":""),0,0)}bv.translate(0,11)}bv.restore()},_H:function(bo,bu,bs){var bv=[[]],br=bu.split(/\s+/),bw,e,bt;
for(var bq=0,bp=br.length;bq<bp;++bq){bw=bv[(bv.length-1)];e=br[bq];bt=a3?bo.mozMeasureText(bw.join(" ")+" "+e):bo.measureText(bw.join(" ")+" "+e).width;
if(bt<bs){bw.push(e)}else{bv.push([e])}}return bv},_c:false,_k:false,_s:0,_l:true,_o:false,_n:false,_v:null,_y:false,klass:"Brick"};
var L={t:[[0,0],[1,0],[2,0],[1,1],[1,2],[1,3],[1,4]],w:[[0,0],[0,1],[0,2],[0,3],[1,4],[2,2],[2,3],[3,4],[4,0],[4,1],[4,2],[4,3]],e:[[0,0],[0,1],[0,2],[0,3],[0,4],[1,0],[2,0],[1,2],[1,4],[2,4]],b:[[0,0],[1,0],[0,1],[2,1],[0,2],[1,2],[0,3],[2,3],[0,4],[1,4]],r:[[0,0],[1,0],[0,1],[2,1],[0,2],[1,2],[0,3],[2,3],[0,4],[2,4]],i:[[0,0],[0,1],[0,2],[0,3],[0,4]],c:[[0,0],[1,0],[2,0],[0,1],[0,2],[0,3],[0,4],[1,4],[2,4]],k:[[0,0],[3,0],[0,1],[2,1],[0,2],[1,2],[0,3],[2,3],[0,4],[3,4]],s:[[1,0],[2,0],[0,1],[1,2],[2,3],[0,4],[1,4]]};
function ac(e){this._a=e;this._b=aw++;this._c()}ac.prototype={getLastBrick:function(){return(this._d?this._d:this._e)},handleKeyEvent:function(e){var bo=e.keyCode||e.which;
if(this._f){return false}switch(bo){case 37:case 65:case 97:this.moveBrick("left");break;case 39:case 68:case 100:this.moveBrick("right");
break;case 38:case 87:case 119:this.rotateBrick("left");break;case 40:case 83:case 115:this.rotateBrick("right");break;case 32:this.moveBrick("drop");
break}return true},isOpen:function(bt,bs,bv){if(bt<0||bt>(ba-bv[0].length)||bs<0||bs>(ah-1)){return false}var br=this._h,bu;
for(var bq=0,e=bv.length;bq<e;++bq){bu=bv[(e-bq-1)];for(var bp=0,bo=bu.length;bp<bo;++bp){if(bu[bp]&&br[(bs+bq)]&&br[(bs+bq)][(bt+bp)]){return false
}}}return true},moveBrick:function(bp){switch(bp){case"left":if(!this._i){this._d.move(-1,0)}break;case"right":if(!this._i){this._d.move(1,0)
}break;case"drop":this._i=true;try{this._d.drop();this._j()}catch(bo){}this._i=false;break}},pauseGame:function(){this._k.show()
},resized:function(bo,bq){this._l=true;try{a7=Math.min(Math.floor(bo/ba),Math.floor(bq/ah));this._m.css({width:(ba*a7)+"px",height:(ah*a7)+"px",top:Math.floor((bq-(ah*a7))/2+2)+"px",left:Math.floor((bo-(ba*a7))/2+4)+"px"});
this._k.css({width:(ba*a7)+"px",height:(ah*a7)+"px"});this._n.css({width:(ba*a7)+"px",height:a7+"px"});a2("#mask_logo_tweet").css("left",Math.floor((ba*a7-420)/2)+"px");
a2("#mask_logo_bricks").css("left",Math.floor((ba*a7-440)/2)+"px");if(this._d){this._d.resize()}if(this._o){this._o.resize()
}for(var bp=0,bs=this._p.length;bp<bs;++bp){this._p[bp].resize()}this._q()}catch(br){}this._l=false},_q:function(){var bo={},bq,bp;
for(var br=0;br<ah;++br){bp=this._h[br];if(bp){for(var e=0;e<ba;++e){if(bp[e]){bq=bp[e].getId();if(!bo[bq]){bo[bq]=true;bp[e].resize()
}}}}}},resumeGame:function(){this._k.hide()},resetGame:function(){this._h=[];for(var e=0;e<ah;++e){this._h.push(this._r())
}this._p=[];this._s=false;this._f=false;this._d=false;this._o=false;a2(".brick",this._m).remove();this._t.html(" ");this._u.hide()
},rotateBrick:function(e){this._d.rotate(e)},showBrick:function(e){this._m.append(e)},startGame:function(){this._k.hide();
this._v(true)},step:function(){if(this._f){return false}aN=0;if(!this._d){this._w()}else{if(this._d.move(0,-1)){}else{this._j()
}}},_s:false,_w:function(e){if(this._s&&!e){return false}this._s=true;if(this._o){this._e=this._d;this._d=this._o;if(this._d.activate()){this._y()
}else{a2.TweetBricks.gameOver()}this._s=false}else{this._y();if(this._o){this._w(true)}else{this._s=false}}},_j:function(){this._d.deactivate();
this._z(this._d);this._w()},_A:function(bs){var e=bs[0],bu=bs[1],bq=bs[2],bt=this._h,bp;for(var bo=0,br=bq.length;bo<br;++bo){bp=bq[(br-bo-1)];
for(dx=0,dxMax=bq[bo].length;dx<dxMax;++dx){if(bp[dx]){bt[(bu+bo)][(e+dx)]=false}}}},_B:function(bo){bo=bo||0;var bw,bq,br=[];
this._f=true;try{for(var bu=0;bu<ah;++bu){bw=this._h[bu];bq=true;for(var bv=0;bq&&(bv<ba);++bv){if(!bw[bv]){bq=false}}if(bq){var bs=[];
for(var bp=0;bp<bw.length;bp++){bs.push(bw[bp]?bw[bp].getId():"-")}br.push(bu)}}if(br.length>0){this._n.css({left:"0",right:"0",height:(br.length*a7)+"px",bottom:(br[0]*a7)+"px"}).show().fadeOut(250);
bo+=br.length;j+=bo;this._D(br,bo);this._E(br,bo);this._f=false;return true}this._f=false}catch(bt){this._f=false;return false
}},_F:function(bv,e){var bq=this._h,by=bq[bv],bp={},bs=false,bw=[],bx,bo,bu;if(bv>0&&this.isOpen(0,(bv-1),[bq[bv]])){for(var br=0;
br<ah;++br){if(br<(bv-1)){bw.push(bq[br])}else{if(bq[(br+1)]){bx=(br==(bv-1))?bq[br]:this._r();for(var bt=0;bt<ba;++bt){if(!bx[bt]){if(bq[(br+1)][bt]){bx[bt]=bq[(br+1)][bt];
bu=bq[(br+1)][bt].getId();if(!bp[bu]){bp[bu]=true;bq[(br+1)][bt].move(0,-1,true)}}}}bw.push(bx)}else{bw.push(this._r())}}}this._h=bw;
this._F((bv-1),e)}else{this._B(e)}},_G:function(bp){var bs=bp.getTweet(),bo=(bs?bs.avatar_image():false),e=(bo?bo.src:bj),bq=bs.text().replace(/[^-,\.'\:;\?\!\@\$\%\=\(\)\#\[\]\{\}\w]+/g," ").replace(/\s+/g," "),br;
if(e){br=a2('<a target="_blank" title="@'+bs.user_screen_name()+": "+bq.substr(0,40)+(bq.length>40?"...":"")+'" href="'+bs.tweet_url()+'" style="display:none;"><img src="'+e+'" /></a>');
this._t.prepend(br);br.fadeIn(800);a2("a:gt(60)",this._t).remove()}bp.destroy()},_c:function(){this._H();this._h=[];for(var e=0;
e<ah;++e){this._h.push(this._r())}this._p=[]},_r:function(){var bo=[];for(var e=0;e<ba;++e){bo.push(false)}return bo},_z:function(bt,bx,bo){bt=bt||this._d;
var bu=bt.getLocation(),bw=bu[0],bv=bu[1],by=bu[2],e;if(bo){this._A(bo)}for(var bs=0,bp=by.length;bs<bp;++bs){e=by[(bp-bs-1)];
for(var br=0,bq=e.length;br<bq;++br){if(this._h[(bv+bs)]){this._h[(bv+bs)][(bw+br)]=e[br]?bt:this._h[(bv+bs)][(bw+br)]}}}if(!bx){this._B()
}},_E:function(bx,e){var bw,bv,bs,bo;for(var bt=0,br=bx.length;bt<br;++bt){bs={};bw=this._h[bx[bt]];for(var bu=0;bu<ba;++bu){bv=bw[bu].getId();
if(!bs[bv]){bs[bv]=true;bo=bw[bu].cropRow(bx[bt]);if(bo&&(typeof bo=="object")&&bo.klass=="Brick"){this._z(bo,true)}else{if(!bo){this._G(bw[bu])
}}}bw[bu]=false}}for(var bq=0,bp=bx.length;bq<bp;++bq){this._F(bx[(bp-1-bq)]+1,e)}},_y:function(){this._o=this._I();if(this._o){this._J()
}else{}this._v()},_I:function(){var bq,bs,bo,e=false,br=this._p;for(var bp=0,bt=br.length;bp<bt;++bp){if(br[bp]&&br[bp].isReady()){e=br[bp];
br[bp]=false;return e}}return false},_J:function(){var e=this._o,bt=e.getType(),bs=e.getTweet(),br='<a target="_blank" title="View tweet at Twitter" href="'+bs.tweet_url()+'">',bo=bs.text(),bq=bs.avatar_image(),bp="77%";
this._u.hide();if(ae>T){a2("#nxbp_brick .nxbp_brick_type").hide();a2("#nxbp_brick_none").show()}else{a2("#nxbp_brick .nxbp_brick_type").hide();
a2("#nxbp_brick_type"+bt).show()}if(bo.length<50){bp="92%"}else{if(bo.length<100){bp="85%"}}a2("#nxbp_tweet_text").html("<p>"+bs.text()+"</p>").css("fontSize",bp);
a2("#nxbp_tweet_avatar").html(br+'<img src="'+(bq?bq.src:bs.avatar_url())+'" /></a>');a2("#nxbp_tweet_name").html(br+"@"+bs.user_screen_name()+"</a>");
this._u.show()},_v:function(bp){var bw=this,bv=this._p,bu=0,e=0,bt=[],bs,br;if(!bp){return window.setTimeout(function(){bw._v(true)
},10)}for(var bq=0,bo=bv.length;bq<bo;++bq){if(bv[bq]){if(bv[bq].isReady()){bu++;bt.unshift(bv[bq])}else{e++;bt.push(bv[bq])
}}}this._p=bt;if(((e+bu)<y)||(bu<bb)){for(var bq=0;bq<aP;++bq){br=a2.TweetBricks.getTweet();if(br){bs=new aA(this,br);this._p.push(bs)
}else{}}}},_H:function(){this._m=a2('<div class="board" id="board'+this._b+'"></div>');this._a.append(this._m);this._m.css({width:(ba*a7)+"px",height:(ah*a7)+"px"});
this._t=a2('<div id="stacked_tweets"></div>');a2("#pp .side_area").append(this._t);this._K();this._k=a2('<div id="board_mask" style="display:none;"></div>');
this._k.css({position:"absolute",zIndex:"9999",backgroundColor:"#000000",display:"block",top:"0",left:"0",width:(this._m.width())+"px",height:(this._m.height())+"px"}).appendTo(this._m);
this._n=a2('<div id="board_row_hightlighter" style="display:none;"></div>');this._n.css({position:"absolute",zIndex:"888",backgroundColor:"#ffff00",display:"none",height:a7+"px",left:"0",right:"0",bottom:"0"}).appendTo(this._m);
this._L()},_K:function(){this._u=a2('<div id="brick_preview"><div id="nxbp_brick"><div class="nxbp_brick_type" id="nxbp_brick_none"><h1>?</h1></div><div class="nxbp_brick_type" id="nxbp_brick_type0"></div><div class="nxbp_brick_type" id="nxbp_brick_type1"></div><div class="nxbp_brick_type" id="nxbp_brick_type2"></div><div class="nxbp_brick_type" id="nxbp_brick_type3"></div><div class="nxbp_brick_type" id="nxbp_brick_type4"></div></div><div id="nxbp_tweet"><div id="nxbp_tweet_stem"></div><div id="nxbp_tweet_text"></div><div id="nxbp_tweet_avatar"></div><div id="nxbp_tweet_name"></div></div></div>');
a2("#nx .side_area").append(this._u);this._u.hide();if(a2.browser.msie){a2("#nxbp_tweet_stem").css("top","60px")}var e=[[[0,0],[0,1],[1,1],[2,1]],[[2,0],[0,1],[1,1],[2,1]],[[0,1],[1,1],[2,1],[1,0]],[[0,0],[1,0],[2,0],[3,0]]],bw,bo,bu,bt,by,bx,bv;
for(var bs=0,bp=e.length;bs<bp;++bs){bw=e[bs];bo=a2("#nxbp_brick_type"+bs);bu=Math.floor((150-((bs==3?4:3)*20))/2);bt=(bs==3)?20:10;
for(var br=0,bq=bw.length;br<bq;++br){bx=bw[br][0];bv=bw[br][1];by=a2('<div class="emptybrick"></div>');by.css({left:(bu+(bx*20))+"px",top:(bt+(bv*20))+"px"});
bo.append(by)}}},_L:function(){var br=(ba*a7),bz=0,by=20,bB=0,e="",bA=a2('<div id="mask_logo_tweet"></div>').css({width:"420px",height:"120px",position:"absolute",top:"0",left:"0"}),bu=a2('<div id="mask_logo_bricks"></div>').css({width:"440px",height:"120px",position:"absolute",bottom:"0",left:"0"}),bx,bD,bw,bp,bE;
this._k.append(bA).append(bu);words=[["top",["t","w","e","e","t"]],["bottom",["b","r","i","c","k","s"]]];for(var bC=0,bo=words.length;
bC<bo;++bC){bp=words[bC][0];bx=words[bC][1];bz=0;e=(bC==0)?"":"2";for(var bv=0,bq=bx.length;bv<bq;++bv){bB=0;bD=L[bx[bv]];
for(var bt=0,bs=bD.length;bt<bs;++bt){if(bD[bt][0]>bB){bB=bD[bt][0]}bE=a2('<div class="emptybrick'+e+'"></div>');bw={left:(bz+(bD[bt][0]*20))+"px"};
if(bp=="bottom"){bw[bp]=(by+((4-bD[bt][1])*20))+"px"}else{bw[bp]=(by+(bD[bt][1]*20))+"px"}bE.css(bw);if(bC==0){bA.append(bE)
}else{bu.append(bE)}}bz+=((bB+2)*20)}}},_D:function(bp,e){var bo=this._d.isSpecial()?2:1;G+=(Math.pow(5,bp.length)*bo*l*ae);
a2.TweetBricks.updateScoreboard()},_C:function(bp){if(!bp){return false}var br=this._h,bu,bv,bq;for(var bo=0,e=br.length;
bo<e;++bo){bu=br[(e-bo-1)];bv=[];for(var bs=0,bt=bu.length;bs<bt;++bs){bq=bu[bs]?""+bu[bs].getId()+"":"-";bv.push(((bq.length==1)?"  ":((bq.length==2)?" ":""))+bq)
}}},_g:function(e){return I(e)},_m:null,_d:null,_o:null,_p:null,_h:null,klass:"Board"};var aH=function(){o=false;if(bk){bk();
bk=false}else{N()}};var aW=function(bo,e){bo=bo||bd;a2("#screens #screen_"+bo).fadeOut("fast",function(){if(a2.browser.msie){a2("#screens #screen_"+bo).css({display:"none",visibility:"hidden"})
}});a2("#screen_shadow").fadeOut("fast");bd=false;if(!e){x.resumeGame();a2("#screens").hide()}};var aC=function(){ap=a2("#sb",f);
ap.html('<ul><li><h4>Score</h4><h3>0</h3></li><li><h4>Level</h4><h3>0</h3></li><li><h4>Time</h4><h3>0:00</h3></li><li><h4>Game</h4><h3 class="longer">-</h3></li><li class="player"><h4>Player</h4><table><tbody><tr><td style="width:24px;"><a class="sb_player_image" href="#" target="_blank" title="Player One"><img src="/images/box-24px.png" width="24" height="24" /></a></td><td><a class="sb_player_name" href="#" target="_blank" title="Player One">Player One</a></td></tr></tbody></table></li></ul>');
var e=a2("li h3",ap);aK=e.eq(0);Y=e.eq(1);bc=e.eq(2);ak=e.eq(3);a2("ul",ap).corner("#33ccff 8px")};var an=function(){var br=a2(window),bo=br.width(),bq=br.height(),e,bp;
if(bq>Math.floor(bo*4/5)){e=bo;bp=Math.floor(bo*4/5)}else{e=Math.floor(bq*5/4);bp=bq}if(!al||!au||(al!=e)||(au!=bp)){aF(e,bp)
}};var W=function(){q();aJ=window.open("/login","twitterSignIn","location=0,status=0,menubar=0,toolbar=0,width=500,height=400,directories=0");
K=window.setInterval(function(){if(!aJ||aJ.closed){aJ=false;window.clearInterval(K);az()}},500)};var aT=function(){if(_tweetFetcher){_tweetFetcher()
}else{}};var az=function(){bm();bk=false;if(o){o();o=false}};var C=function(bp){bp=bp||G;var e=[],bo=0;while(bp>0){bo=(bp%1000);
bp=Math.floor(bp/1000);e.unshift(((bp>0&&bo<100)?(bo<10?"00":"0"):"")+bo)}if(e.length==0){e.push("0")}return e.join(",")};
var r=function(){a5();if(bg){x.step()}if((af>O)&&((new Date()).getTime()-F)>(a9*ay*1000)){aT()}};var a8=function(){return"I just scored "+C()+" playing @TweetBricks: http://TweetBricks.com"
};var a=function(e){var bo=++S;window.setTimeout(function(){if(bo==S){an()}else{}},100)};var v=function(bo){var bq=a2(bo.target.parentNode).attr("id");
if(!bq){bq=a2(bo.target).attr("id")}switch(bq){case"ss_new_game":N();break;case"ss_high_scores":break;case"sn_friends":P();
break;case"sn_hashtag":aI();break;case"sn_followers":b();break;case"sn_pickuser":p();break;case"sn_mentions":m();break;case"sn_everyone":Z();
break;case"sh_start":A();break;case"sh_cancel":N();break;case"su_start":am();break;case"su_cancel":N();break;case"si_sign_in":W();
break;case"si_cancel":aH();break;case"sa_continue":az();break;case"sa_cancel":try{if(aJ||!aJ.closed){aJ.close()}}catch(bp){}if(K){window.clearInterval(K)
}ax();break;case"sr_play":ag();break;case"sp_resume_game":ag();break;case"sp_new_game":aM(function(e){if(e){aR();N()}else{aa()
}},false,"Do you really want to quit your game?");break;case"sg_tweet_score":be(a8(),function(e,bs,br){a2("#sg_score_info").hide();
a2("#sg_score_info_msg").show();aD(true)});break;case"sg_tweet_button":case"sg_tweet_blame":be("@"+aB.lastTweet.user_screen_name()+": Your tweet ended my game of @TweetBricks! http://TweetBricks.com",function(e,bs,br){a2("#sg_tweet_info").hide();
a2("#sg_tweet_info_msg").show();aD(true)},aB.lastTweet.id());break;case"sg_play_again":aR();ag();break;case"sg_new_game":aR();
N();break;case"st_post":B();break;case"st_cancel":B();break;case"sc_yes":_confirmCallback(true);break;case"sc_no":_confirmCallback(false);
break}};var a4=function(e){var bo=e.keyCode||e.which;if(bg){if(bo==27){aE();return false}else{return x.handleKeyEvent(e)}}else{if(bd){if(bo==27){aE();
return false}else{}}else{}}};var aQ=function(){G=0;bg=false;a1();bm();x=new ac(i);c();aO=true};var aY=function(){return(bi.name&&bi.name.length>0)
};var b=function(e){if(!aY()){return ax(function(){b(e)})}if(!e){Q("Please wait while your followers are loaded&hellip;");
a0=[];aB.page=1;ay=2;_tweetFetcher=function(){b(true)}}d=false;a2.ajax({type:"post",url:"/twitter/followers.json",data:{page:aB.page++},dataType:"json",success:function(bs){if((!bs||bs.length==0)&&!e){d="No tweets could be loaded";
N()}else{for(var br=0,bt=bs.length;br<bt;++br){var bo={},bq=bs[br]["status"];if(bq){for(var bp in bs[br]){if(bp!="status"){bo[bp]=bs[br][bp]
}}bq.user=bo;a0.push(new n(bq))}}at(bs.length);ag("followers")}},error:function(bo,bp){d="Couldn't get tweets from Twitter";
N()},timeout:aS*1000})};var P=function(e){if(!aY()){return ax(function(){P(e)})}if(!e){Q("Please wait while the tweets are loaded&hellip;");
a0=[];ay=2;_tweetFetcher=function(){P(true)}}d=false;a2.ajax({type:"post",url:"/twitter/friends.json",dataType:"json",data:{page:1},success:function(bp){if((!bp||bp.length==0)&&!e){d="No tweets could be loaded";
N()}else{for(var bo=0,bq=bp.length;bo<bq;++bo){a0.push(new n(bp[bo]))}at(bp.length);ag("friends")}},error:function(bo,bp){d="Couldn't get tweets from Twitter";
N()},timeout:aS*1000})};var aG=function(e){if(!e){Q("Please wait while the tweets are loaded&hellip;");a0=[];ay=1;_tweetFetcher=function(){aG(true)
}}d=false;a2.jsonp({url:"http://search.twitter.com/search.json",callbackParameter:"callback",data:{q:encodeURIComponent(aB.hashTags.join(" OR ")),rpp:100},success:function(bp){if((!bp||!bp.results||bp.results.length==0)&&!e){d="No tweets could be loaded";
aI()}else{for(var bo=0,bq=bp.results.length;bo<bq;++bo){a0.push(new n(bp.results[bo]))}aB.htNextPage=bp.next_page;aB.htRefreshURL=bp.refresh_url;
at(bp.results.length);ag("hashtag")}},error:function(bo,bp){d="Couldn't get tweets from Twitter";aI()}})};var m=function(e){var bo={q:encodeURIComponent("@"+bi.name),rpp:100};
if(!aY()){return ax(function(){m(e)})}if(!e){Q("Please wait while your mentions are loaded&hellip;");a0=[];aB.nextPage=false;
aB.nextPageURL=false;aB.refreshURL=false;ay=1;_tweetFetcher=function(){m(true)}}else{if(aB.nextPage){bo.page=aB.nextPage}else{return false
}}d=false;a2.jsonp({url:"http://search.twitter.com/search.json",callbackParameter:"callback",data:bo,success:function(bq){if((!bq||!bq.results||bq.results.length==0)&&!e){d="No tweets could be loaded";
N()}else{for(var bp=0,br=bq.results.length;bp<br;++bp){a0.push(new n(bq.results[bp]))}aB.nextPageURL=bq.next_page;aB.refreshURL=bq.refresh_url;
if(bq.next_page&&bq.next_page.length>1){aB.nextPage=aB.nextPage?(aB.nextPage+1):2}at(bq.results.length);ag("mentions")}},error:function(bp,bq){d="Couldn't get tweets from Twitter";
N()}});return true};var Z=function(e){if(!e){Q("Please wait while the public tweets are loaded&hellip;");a0=[];ay=1;_tweetFetcher=function(){Z(true)
}}d=false;a2.jsonp({url:"http://twitter.com/statuses/public_timeline.json",callbackParameter:"callback",success:function(bp){if((!bp||bp.length==0)&&!e){d="No tweets could be loaded";
N()}else{for(var bo=0,bq=bp.length;bo<bq;++bo){a0.push(new n(bp[bo]))}at(bp.length);ag("everyone")}},error:function(bo,bp){d="Couldn't get tweets from Twitter";
N()}})};var D=function(e){var bo={q:encodeURIComponent("from:"+aB.userName),rpp:100};if(!e){Q("Please wait while @"+aB.userName+"'s tweets are loaded&hellip;");
a0=[];aB.nextPage=false;aB.nextPageURL=false;aB.refreshURL=false;ay=1;_tweetFetcher=function(){D(true)}}else{if(aB.nextPage){bo.page=aB.nextPage
}else{return false}}d=false;a2.jsonp({url:"http://search.twitter.com/search.json",callbackParameter:"callback",data:bo,success:function(bq){if((!bq||!bq.results||bq.results.length==0)&&!e){d="No tweets could be loaded for that user";
p()}else{for(var bp=0,br=bq.results.length;bp<br;++bp){a0.push(new n(bq.results[bp]))}aB.nextPageURL=bq.next_page;aB.refreshURL=bq.refresh_url;
if(bq.next_page&&bq.next_page.length>1){aB.nextPage=aB.nextPage?(aB.nextPage+1):2}at(bq.results.length);ag("pickuser")}},error:function(bp,bq){d="Error loading tweets. That may not be a valid user, their tweets might be protected or Twitter might be down";
p()}});return true};var ab=function(bu,bt,e){if(bd){aW(bd,true)}else{if(!e){x.pauseGame()}a2("#screens").show()}var bp=a2("#screens #screen_"+bu),br=a2(".error_message",bp),bo=bp.width(),bs=bp.height(),bq=a2("#mc").width(),bv=a2("#mc").height();
if(d&&br.length>0){br.html(d)}d=false;bp.css({top:Math.floor((bv-bs)/2)+"px",left:Math.floor((bq-bo)/2)+"px"});if(a2.browser.msie){bp.css({display:"block",visibility:"visible"})
}else{bp.show()}bp.fadeIn("fast",function(){if(bt){bt()}});a2("#screen_shadow").css({width:(bo+20)+"px",height:(bs+20)+"px",top:Math.floor((bv-bs)/2-10)+"px",left:Math.floor((bq-bo)/2-10)+"px"}).corner("#000000 10px").stop().fadeIn("fast");
bd=bu};var aE=function(){if(bg){U();aa()}else{ag()}};var B=function(bp,e){var bo;if(!aY()){return ax(function(){B(bp,e)})
}bp=bp||a2("#st_text").val();e=e||a2("#st_in_reply_to_id").val();bo={status:bp};if(e&&e!=0&&e!="0"){bo.in_reply_to_status_id=e
}d=false;a2.ajax({type:"post",url:"/twitter/tweet.json",dataType:"json",data:bo,success:function(bq){if(_tweetPostedCallback){_tweetPostedCallback(true,bq)
}else{N()}},error:function(bq,br){if(_tweetPostedCallback){_tweetPostedCallback(false,bq,br)}},timeout:aS*1000})};var aR=function(){G=0;
j=0;ae=1;ao=0,af=0,x.resetGame()};var aF=function(bt,bp){var bq=a2(window),bs=bq.width(),bo=bq.height(),br=Math.floor((bs-bt)/2),e=Math.floor((bo-bp)/2),bv=(bd?a2("#screens #screen_"+bd):false);
al=bt;au=bp;a2("#tb").width(bt).height(bp).css({top:e+"px",left:br+"px"});var bu=Math.floor(bt/5);a2("#lc").width(bu-4).height(bp-12);
a2("#mc").width((bu*3)+8).height(bp).css("left",(bu-4)+"px");a2("#rc").width(bu-4).height(bp-12).css("left",(4*bu+4)+"px");
a2("#ta").height(Math.min(240,(bp-6-10-256-256-10-6)));a2("#ta .side_area").height(Math.min(220,(bp-6-10-256-10-10-256-10-6)));
if(bv){bv.css({top:Math.floor((bp-bv.height())/2)+"px",left:Math.floor(((bu*3)-bv.width())/2)+"px"});a2("#screen_shadow").css({top:Math.floor((bp-bv.height())/2-10)+"px",left:Math.floor(((bu*3)-bv.width())/2-10)+"px"})
}if(bt<800||bp<600){a2("#small_screen_warning").show()}else{a2("#small_screen_warning").hide()}x.resized((bu*3),(bp-4))};
var c=function(){try{var bp=window.location.hash,bo=bp.match(/\#?(\w+)(?:\=(.+))?/),br;if(bo){br=bo[1].toLowerCase();if(bo[2]){switch(br){case"hashtag":bf=br;
aB.autoLoad=true;A(bo[2]);break;case"user":bf="pickuser";aB.autoLoad=true;am(bo[2]);break}}else{switch(br){case"friends":case"mentions":case"followers":case"everyone":bf=br;
break}}}}catch(bq){}};var A=function(bq){var bp=bq||a2("#sh_hashtag").val(),br=bp.split(/\s+/),bt=[],e;for(var bo=0,bs=br.length;
bo<bs;++bo){e=br[bo].replace(/\s+/g,"");if(e.length>0){bt.push("#"+(e.substring(0,1)=="#"?e.substring(1):e))}}aB.hashTags=bt;
if(aB.hashTags.length>0){aG()}};var a1=function(){var e=a2("#screens");h=a2("#tb");f=a2('<div id="lc"><div id="hd"></div><div id="sb"></div><div id="hlp"></div><div id="ft"></div></div>');
h.append(f);i=a2('<div id="mc"></div>');h.append(i);e.appendTo(i);E=a2('<div id="rc"><div id="nx"></div><div id="ta"></div><div id="pp"></div></div>');
h.append(E);a2("#hd").html('<h1><em>T</em><em>W</em><em>E</em><em>E</em><em>T</em></h1><h2><em>B</em><em>R</em><em>I</em><em>C</em><em>K</em><em>S</em></h2><h3><a target="_blank" href="http://9Astronauts.com/">by <em>9Astronauts</em></a></h3>');
a2("#hlp").html("<ul><li><h1>Game Controls</h1></li><li><h3><em>&larr;</em> or A</h3><h4>Move Left</h4></li><li><h3><em>&rarr;</em> or D</h3><h4>Move Right</h4></li><li><h3><em>&uarr;</em> or W</h3><h4>Rotate CCW</h4></li><li><h3><em>&darr;</em> or S</h3><h4>Rotate CW</h4></li><li><h3>&lt;Space&gt;</h3><h4>Drop Brick</h4></li><li><h3>&lt;Esc&gt;</h3><h4>Pause Game</h4></li></ul>");
a2("#hlp ul").css("backgroundColor","#"+bh("33ccff",0.33)).corner("#33ccff 8px");a2("#ft").append('<div id="old_browser_warning" style="display:none;"><h2><a href="#">Warning!<em>X</em></a></h2><p>Your browser doesn\'t have the features needed by this game. We\'ve tried our best to support older browsers but if you notice problems or slowness we recommend using a newer browser such as <a target="_blank" href="http://www.firefox.com/">Firefox 3</a>, <a target="_blank" href="http://www.apple.com/safari/">Safari 4</a> or <a target="_blank" href="http://www.google.com/chrome">Chrome</a>.</p></div><div id="small_screen_warning" style="display:none;"><h2><a href="#">Warning!<em>X</em></a></h2><p>Your browser screen is too small.  We recommend a minimum of 1024 x 768.</p></div>');
a2("#small_screen_warning h2 a").click(function(){if(a2("#small_screen_warning").data("isCollapsed")){a2("#small_screen_warning").data("isCollapsed",false);
a2("#small_screen_warning h2 a em").show();a2("#small_screen_warning p").show()}else{a2("#small_screen_warning").data("isCollapsed",true);
a2("#small_screen_warning h2 a em").hide();a2("#small_screen_warning p").hide()}});a2("#old_browser_warning h2 a").click(function(){if(a2("#old_browser_warning").data("isCollapsed")){a2("#old_browser_warning").data("isCollapsed",false);
a2("#old_browser_warning h2 a em").show();a2("#old_browser_warning p").show()}else{a2("#old_browser_warning").data("isCollapsed",true);
a2("#old_browser_warning h2 a em").hide();a2("#old_browser_warning p").hide()}});if(aq=="none"){a2("#old_browser_warning").show()
}a2("#nx").html('<div class="side_area"><h3>Next Brick</h3></div>');a2("#nx .side_area").css({backgroundColor:"#000000",color:"#ffffff",height:"220px"}).corner("#33ccff 8px");
a2("#ta").html('<div class="side_area"><h3></h3></div>');a2("#ta .side_area").css({backgroundColor:"#ffffff",color:"#000000",height:"200px"}).corner("#33ccff 8px");
a2("#pp").html('<div class="side_area"><h3>Stacked Tweets</h3></div>');a2("#pp .side_area").css({backgroundColor:"#000000",color:"#ffffff",height:"220px"}).corner("#33ccff 8px");
a2(".screen",e).corner("#33ccff 7px hiddenParent");a2("#screens .screen a.button, #screens .screen .choices a").click(function(bo){v(bo);
a2(bo.target).blur();bo.preventDefault();bo.stopPropagation();return false});if(!a2.browser.msie){a2("#screens .screen a.button").corner("#08586F 10px hiddenParent");
a2("#screens .screen .choices a").corner("#08586F 5px hiddenParent")}a2("#screens .screen input[type=text]").css({border:"0",margin:"0",padding:"0"}).wrap("<span>").parent().css({backgroundColor:"#fff",border:"1px solid #3cf",margin:"0",padding:"0.2em 0.4em"}).corner("#08586F 5px hiddenParent");
a2("#screens .screen").hide();a2("#screen_shadow").hide();if(a2.browser.msie){a2("#screens .screen").css({display:"none",visibility:"hidden"})
}aC();a();a2(window).resize(function(bo){a(bo)});a2(document).keydown(function(bo){a4(bo)});a2("#screen_pick_user form").submit(function(bo){am();
bo.preventDefault();bo.stopPropagation();return false});a2("#screen_hash_tag form").submit(function(bo){A();bo.preventDefault();
bo.stopPropagation();return false});a2("#screen_tweet form").submit(function(bo){B();bo.preventDefault();bo.stopPropagation();
return false})};var bm=function(){var e=av.get(J);if(e&&e.length>0){k(e,av.get(aj),av.get(aU))}};var am=function(e){e=e||a2("#su_username").val();
if(e&&e.length>1){aB.userName=(e.substring(0,1)=="@")?e.substring(1):e;D()}else{}};var q=function(){ab("authenticating")};
var aM=function(bp,bo,e){_confirmCallback=bp;a2("#screen_confirm h1").html(bo||"Are you sure?");a2("#screen_confirm p").html(e||"&nbsp;");
ab("confirm")};var aD=function(bp){var bo=aB.lastTweet,e=bo.avatar_image();if(!bp){a2("#sg_tweet_info_msg,#sg_score_info_msg").hide();
a2("#sg_tweet_info,#sg_score_info").show();a2("#sg_tweet_info_msg h2 em").html("@"+bo.user_screen_name());a2("#sg_your_score").html(C());
a2("#sg_tweet_avatar").html('<img src="'+(e?e.src:bo.avatar_url())+'" />');a2("#sg_tweet_text").html("<div><strong>@"+bo.user_screen_name()+":</strong><br />"+bo.text()+"</div>")
}ab("game_over",false,true)};var aI=function(){ab("hash_tag",function(){a2("#sh_hashtag").focus()})};var Q=function(e){if(e){a2("#sl_loading_msg").html(e)
}ab("loading")};var N=function(){ab("new_game")};var aa=function(){ab("paused")};var p=function(){ab("pick_user",function(){a2("#su_username").focus()
})};var X=function(){ab("ready")};var ax=function(e){if(e){o=e}ab("sign_in")};var s=function(){ab("start")};var be=function(bo,bp,e){if(bp){_tweetPostedCallback=bp
}if(bo){a2("#st_text").val(bo)}a2("#st_in_reply_to_id").val(e?e:"0");ab("tweet",function(){a2("#st_text").focus()})};var ag=function(e){var bo;
if(bg){return true}aW();if(e){bf=e}if(aB.autoLoad){aB.autoLoad=false;return X()}if(!M){bo=Math.max(ad,a6-(ae*aV));M=window.setInterval(function(){r()
},bo)}ar=(new Date()).getTime();x.startGame();bg=true;a2.TweetBricks.updateScoreboard()};var U=function(){if(M){window.clearInterval(M);
M=false}ao+=((new Date()).getTime()-ar);bg=false};var k=function(bo,bq,e){bi.name=bo;bi.id=bq;bi.imageUrl=e;var bp="http://twitter.com/"+bo;
a2("a.sb_player_image, a.sb_player_name",ap).attr("href",bp).attr("title","View @"+bo+"at Twitter");a2("a.sb_player_image img",ap).attr("src",e).attr("title","View @"+bo+"at Twitter");
a2("a.sb_player_name",ap).html("@"+bo)};var a5=function(){var bq=(((new Date()).getTime()-ar+ao)/1000),bp=Math.floor(bq/3600),e=Math.floor((bq%3600)/60),bo=Math.floor(bq%60);
bc.html(((bp>0)?bp+":":"")+((bp>0&&e<10)?"0":"")+e+":"+((bo<10)?"0":"")+bo)};var at=function(e){F=(new Date()).getTime();
O=(af+e-3)};a2.TweetBricks={play:function(){if(!aO){aQ()}if(!bf||(bf.length==0)||(bf=="-")){N()}},getTweet:function(){var e=a0.pop();
a0.unshift(e);af++;return e},gameOver:function(){U();var e=x.getLastBrick();if(e){aB.lastTweet=e.getTweet()}aD()},updateScoreboard:function(){var bp=(aX[bf]||"-"),bo,e;
if(j>0){e=ae;ae=Math.ceil(j/bn);if(ae>e){if(M){bo=Math.max(ad,a6-(ae*aV));window.newIntervalTime=bo;window.clearInterval(M);
M=window.setInterval(function(){r()},bo)}}}aK.html(C());Y.html(""+ae+"");switch(bf){case"pickuser":bp="@"+aB.userName;break;
case"hashtag":bp=aB.hashTags[0];break}ak.html(bp)},klass:"TweetBricks"}})(jQuery);
(function($) { if ($.browser.msie) { $(window).load(function() { $.TweetBricks.play(); }); } else { $(document).ready(function() { $.TweetBricks.play(); }); } })(jQuery);