(function($){var timeout=500;var closetimer=0;var ddmenuitem=0;function jsddm_open()
{jsddm_canceltimer();jsddm_close();ddmenuitem=$(this).find('ul').css('visibility','visible');}
function jsddm_close()
{if(ddmenuitem)ddmenuitem.css('visibility','hidden');}
function jsddm_timer()
{closetimer=window.setTimeout(jsddm_close,timeout);}
function jsddm_canceltimer()
{if(closetimer)
{window.clearTimeout(closetimer);closetimer=null;}}
$(document).ready(function()
{$('.jsddm > li').bind('mouseover',jsddm_open)
$('.jsddm > li').bind('mouseout',jsddm_timer)});document.onclick=jsddm_close;})(jQuery);function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return'';}
function eraseCookie(name){createCookie(name,"",-1);}
function encode_utf8(s)
{return unescape(encodeURIComponent(s));}
function decode_utf8(s)
{return decodeURIComponent(escape(s));}
(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,pauseOnHover:false,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var running=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var div=$(this),ul=$("ul",div),tLi=$("li",ul),tl=tLi.size(),v=o.visible,paused=0;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}o.pauseOnHover?ul.hover(function(){paused=1},function(){paused=0}):"";var li=$("li",ul),itemLength=li.size(),curr=o.start;div.css("visibility","visible");li.css({overflow:"hidden","float":o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});div.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var liSize=o.vertical?height(li):width(li);var ulSize=liSize*itemLength;var divSize=liSize*v;li.css({width:li.width(),height:li.height()});ul.css(sizeCss,ulSize+"px").css(animCss,-(curr*liSize));div.css(sizeCss,divSize+"px");if(o.btnPrev){$(o.btnPrev).click(function(){return go(curr-o.scroll)})}if(o.btnNext){$(o.btnNext).click(function(){return go(curr+o.scroll)})}if(o.btnGo){$.each(o.btnGo,function(i,val){$(val).click(function(){return go(o.circular?o.visible+i:i)})})}if(o.mouseWheel&&div.mousewheel){div.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)})}if(o.auto){setInterval(function(){go(curr+o.scroll)},o.auto+o.speed)}function vis(){return li.slice(curr).slice(0,v)}function go(to){if(!running&&!paused){if(o.beforeStart){o.beforeStart.call(this,vis())}if(o.circular){if(to<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*liSize)+"px");curr=to==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else{if(to>=itemLength-v+1){ul.css(animCss,-((v)*liSize)+"px");curr=to==itemLength-v+1?v+1:v+o.scroll}else{curr=to}}}else{if(to<0||to>itemLength-v){return}else{curr=to}}running=true;ul.animate(animCss=="left"?{left:-(curr*liSize)}:{top:-(curr*liSize)},o.speed,o.easing,function(){if(o.afterEnd){o.afterEnd.call(this,vis())}running=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(el,prop){return parseInt($.css(el[0],prop))||0}function width(el){return el[0].offsetWidth+css(el,"marginLeft")+css(el,"marginRight")}function height(el){return el[0].offsetHeight+css(el,"marginTop")+css(el,"marginBottom")}})(jQuery);(function($){$.bbmActiveAd={}
$.bbmActiveAd.startTime=0;$.bbmActiveAd.mypath='';$.bbmActiveAd.refreshTime=90;$(document).bind('mousemove keydown DOMMouseScroll mousewheel mousedown scroll',function(){if($.bbmActiveAd.startTime==0)
{$.bbmActiveAd.startDate=new Date();$.bbmActiveAd.startTime=$.bbmActiveAd.startDate.getTime();}
else
{$.bbmActiveAd.date_now=new Date();$.bbmActiveAd.time_now=$.bbmActiveAd.date_now.getTime();$.bbmActiveAd.time_diff=$.bbmActiveAd.time_now-$.bbmActiveAd.startTime;$.bbmActiveAd.seconds_elapsed=Math.floor($.bbmActiveAd.time_diff/1000);$("#elapsed").html('elapsed: '+$.bbmActiveAd.seconds_elapsed);if($.bbmActiveAd.seconds_elapsed>$.bbmActiveAd.refreshTime)
{$.bbmActiveAd.startDate=new Date();$.bbmActiveAd.startTime=$.bbmActiveAd.startDate.getTime();$.each($('.activead'),function(index,val){$(this).html($(this).html());});}}});})(jQuery);(function(c){var d=[];c.tools=c.tools||{};c.tools.tooltip={version:"1.1.2",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(e,g,f){b[e]=[g,f]}};var b={toggle:[function(e){var f=this.getConf(),g=this.getTip(),h=f.opacity;if(h<1){g.css({opacity:h})}g.show();e.call()},function(e){this.getTip().hide();e.call()}],fade:[function(e){this.getTip().fadeIn(this.getConf().fadeInSpeed,e)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};function a(f,g){var p=this,k=c(this);f.data("tooltip",p);var l=f.next();if(g.tip){l=c(g.tip);if(l.length>1){l=f.nextAll(g.tip).eq(0);if(!l.length){l=f.parent().nextAll(g.tip).eq(0)}}}function o(u){var t=g.relative?f.position().top:f.offset().top,s=g.relative?f.position().left:f.offset().left,v=g.position[0];t-=l.outerHeight()-g.offset[0];s+=f.outerWidth()+g.offset[1];var q=l.outerHeight()+f.outerHeight();if(v=="center"){t+=q/2}if(v=="bottom"){t+=q}v=g.position[1];var r=l.outerWidth()+f.outerWidth();if(v=="center"){s-=r/2}if(v=="left"){s-=r}return{top:t,left:s}}var i=f.is(":input"),e=i&&f.is(":checkbox, :radio, select, :button"),h=f.attr("type"),n=g.events[h]||g.events[i?(e?"widget":"input"):"def"];n=n.split(/,\s*/);if(n.length!=2){throw"Tooltip: bad events configuration for "+h}f.bind(n[0],function(r){if(g.oneInstance){c.each(d,function(){this.hide()})}var q=l.data("trigger");if(q&&q[0]!=this){l.hide().stop(true,true)}r.target=this;p.show(r);n=g.events.tooltip.split(/,\s*/);l.bind(n[0],function(){p.show(r)});if(n[1]){l.bind(n[1],function(){p.hide(r)})}});f.bind(n[1],function(q){p.hide(q)});if(!c.browser.msie&&!i&&!g.predelay){f.mousemove(function(){if(!p.isShown()){f.triggerHandler("mouseover")}})}if(g.opacity<1){l.css("opacity",g.opacity)}var m=0,j=f.attr("title");if(j&&g.cancelDefault){f.removeAttr("title");f.data("title",j)}c.extend(p,{show:function(r){if(r){f=c(r.target)}clearTimeout(l.data("timer"));if(l.is(":animated")||l.is(":visible")){return p}function q(){l.data("trigger",f);var t=o(r);if(g.tip&&j){l.html(f.data("title"))}r=r||c.Event();r.type="onBeforeShow";k.trigger(r,[t]);if(r.isDefaultPrevented()){return p}t=o(r);l.css({position:"absolute",top:t.top,left:t.left});var s=b[g.effect];if(!s){throw'Nonexistent effect "'+g.effect+'"'}s[0].call(p,function(){r.type="onShow";k.trigger(r)})}if(g.predelay){clearTimeout(m);m=setTimeout(q,g.predelay)}else{q()}return p},hide:function(r){clearTimeout(l.data("timer"));clearTimeout(m);if(!l.is(":visible")){return}function q(){r=r||c.Event();r.type="onBeforeHide";k.trigger(r);if(r.isDefaultPrevented()){return}b[g.effect][1].call(p,function(){r.type="onHide";k.trigger(r)})}if(g.delay&&r){l.data("timer",setTimeout(q,g.delay))}else{q()}return p},isShown:function(){return l.is(":visible, :animated")},getConf:function(){return g},getTip:function(){return l},getTrigger:function(){return f},bind:function(q,r){k.bind(q,r);return p},onHide:function(q){return this.bind("onHide",q)},onBeforeShow:function(q){return this.bind("onBeforeShow",q)},onShow:function(q){return this.bind("onShow",q)},onBeforeHide:function(q){return this.bind("onBeforeHide",q)},unbind:function(q){k.unbind(q);return p}});c.each(g,function(q,r){if(c.isFunction(r)){p.bind(q,r)}})}c.prototype.tooltip=function(e){var f=this.eq(typeof e=="number"?e:0).data("tooltip");if(f){return f}var g=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(e)){e={onBeforeShow:e}}else{if(typeof e=="string"){e={tip:e}}}e=c.extend(true,g,e);if(typeof e.position=="string"){e.position=e.position.split(/,?\s/)}if(e.lazy!==false&&(e.lazy===true||this.length>20)){this.one("mouseover",function(h){f=new a(c(this),e);f.show(h);d.push(f)})}else{this.each(function(){f=new a(c(this),e);d.push(f)})}return e.api?f:this}})(jQuery);function previewComment(){eeLiveCommentPreview={};$("#comment_form input").each(function(i){eeLiveCommentPreview[$(this).attr('name')]=$(this).val();});eeLiveCommentPreview['comment']=$("#comment_form textarea").val();delete eeLiveCommentPreview['submit'];if(jQuery.trim(eeLiveCommentPreview.comment)!==""){$('#comment-preview').load('/tmo',eeLiveCommentPreview);}}
function edit_comment(comment_id)
{var ourBox=document.getElementById('edit_comment_box_'+comment_id);var commentBox=document.getElementById('comment_box_'+comment_id);if(ourBox.style.display=='none')
{ourBox.style.display='block';commentBox.style.display='none';}
else
{ourBox.style.display='none';commentBox.style.display='block';}};function submit_edited_comment(comment_id)
{try
{XMLHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{XMLHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e2)
{XMLHttp=null;}}
if(!XMLHttp&&typeof XMLHttpRequest!="undefined")
{XMLHttp=new XMLHttpRequest();}
if(!XMLHttp)
{alert('Browser Not Support');return false;}
var bleah=document.getElementById('edit_comment_box_'+comment_id);var content=bleah.getElementsByTagName('textarea')[0].value;var data="comment_id="+encodeURIComponent(comment_id)+"&comment="+encodeURIComponent(content);XMLHttp.onreadystatechange=function(){result_of_comment_edit(comment_id);}
XMLHttp.open("POST","/tmo/comments/edit/",true);XMLHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Connection","close");XMLHttp.send(data);};function result_of_comment_edit(comment_id)
{if(XMLHttp.readyState==4)
{document.getElementById('edit_comment_box_'+comment_id).style.display='none';document.getElementById('comment_box_'+comment_id).style.display='block';if(XMLHttp.status!=200)
{alert("An error was encountered: "+XMLHttp.status);return;}
var response=XMLHttp.responseText;if(response=='null')
{alert('Invalid Comment Edit');return;}
document.getElementById('comment_box_'+comment_id).innerHTML=response;}};function quotethis(ln,tag1,tag2){if(window.getSelection)
{var selectedString=window.getSelection();}
else if(document.all)
{var selectedString=document.selection.createRange().text;}
if(selectedString==''){alert('Please select the text you want to quote.');}else{taginsert(ln,tag1,tag2);}
return;}
$(document).ready(function(){$('blockquote[author]').each(function(i){source=$('blockquote[author]')[i].attributes[0].value;$(this).find('p').before('<p><b>'+source+' said:</b></p>');$('blockquote[author]')[i].className="quoteColapse";});$('blockquote[author]').bind("click",function(e){this.className="quoteExpand";});$(".comment-member-box").tooltip({offset:[40,0],relative:true,api:true,lazy:true,onBeforeShow:function(){getCommentAuthorDetails(this.getTrigger().attr("name"),this.getTip());}});$(".comment-action-menu").tooltip({offset:[35,-51],relative:true,api:true,lazy:false,delay:300,predelay:200,onBeforeShow:function(){getCommentActionMenu(this.getTrigger().attr("name"),this.getTip());}});function getCommentAuthorDetails(ID,$tip){$tip.html('<div class="profilebox">loading...</div>');$.ajax({url:'/tmo/comments/author/'+ID+'/',dataType:'html',success:function(response){$tip.html(response);}});}
function getCommentActionMenu(ID,$tip){$tip.html('<div class="dd-menu"><ul><li><a href="#">loading...</a></li></ul></div>');$.ajax({url:'/tmo/comments/action_menu/'+ID+'/',dataType:'html',success:function(response){$tip.html(response);}});}});var selField='comment';var selMode="normal";var url_text="Enter the hyperlink URL";var webpage_text="Enter the title of the link";var title_text="Optional: Enter a title attribute";var image_text="Enter the image URL";var email_text="Enter the email address";var email_title="Enter the link title (or leave the field empty to use the email address as the title.)";var enter_text="Enter the text you want to format";var button_0=0;var button_1=0;var button_2=0;var button_3=0;var button_4=0;tagarray=new Array();usedarray=new Array();function nullo()
{return;}
function styleswap(link)
{if(document.getElementById(link).className=='htmlButtonOff')
{document.getElementById(link).className='htmlButtonOn';}
else
{document.getElementById(link).className='htmlButtonOff';}}
function setmode(which)
{if(which=='guided')
selMode='guided';else
selMode='normal';}
function clear_state()
{if(usedarray[0])
{while(usedarray[0])
{clearState=arraypop(usedarray);eval(clearState+" = 0");document.getElementById(clearState).className='htmlButtonOff';}}}
function getarraysize(thearray)
{for(i=0;i<thearray.length;i++)
{if((thearray[i]=="undefined")||(thearray[i]=="")||(thearray[i]==null))
{return i;}}
return thearray.length;}
function arraypush(thearray,value)
{thearray[getarraysize(thearray)]=value;}
function arraypop(thearray)
{thearraysize=getarraysize(thearray);retval=thearray[thearraysize-1];delete thearray[thearraysize-1];return retval;}
function singleinsert(tagOpen)
{eval("document.getElementById('comment_form')."+selField+".value += tagOpen");curField=eval("document.getElementById('comment_form')."+selField);curField.blur();curField.focus();}
function selectinsert(item,tag)
{var selval=item.options[item.selectedIndex].value;if(selval==0)
return;var tagOpen='['+tag+'='+selval+']';var tagClose='[/'+tag+']';taginsert('other',tagOpen,tagClose,'menu');}
var tagarray=new Array();var usedarray=new Array();var running=0;function taginsert(item,tagOpen,tagClose,type)
{var which=eval('item.name');var theSelection=false;var result=false;eval("var theField = document.getElementById('comment_form')."+selField+";");if(selMode=='guided')
{data=prompt(enter_text,"");if((data!=null)&&(data!=""))
{result=tagOpen+data+tagClose;}}
if(window.getSelection&&(theSelection=window.getSelection())!=false)
{theSelection=window.getSelection();var selLength=theField.textLength;var selStart=theField.selectionStart;var selEnd=theField.selectionEnd;if(selEnd<=2&&typeof(selLength)!='undefined')
selEnd=selLength;var s1=(theField.value).substring(0,selStart);var s2=(theField.value).substring(selStart,selEnd)
var s3=(theField.value).substring(selEnd,selLength);s2=(result==false)?tagOpen+theSelection+tagClose:result;theSelection='';theField.value=s1+s2+s3;theField.blur();theField.focus();return;}
else if(document.selection)
{theSelection=document.selection.createRange().text;theField.focus();if(theSelection)
{document.selection.createRange().text=(result==false)?tagOpen+theSelection+tagClose:result;}
else
{document.selection.createRange().text=(result==false)?tagOpen+tagClose:result;}
theSelection='';theField.blur();theField.focus();return;}
else if(!isNaN(theField.selectionEnd))
{var scrollPos=theField.scrollTop;var selLength=theField.textLength;var selStart=theField.selectionStart;var selEnd=theField.selectionEnd;if(selEnd<=2&&typeof(selLength)!='undefined')
selEnd=selLength;var s1=(theField.value).substring(0,selStart);var s2=(theField.value).substring(selStart,selEnd)
var s3=(theField.value).substring(selEnd,selLength);if(result==false)
{var newStart=selStart+tagOpen.length+s2.length+tagClose.length;theField.value=(result==false)?s1+tagOpen+s2+tagClose+s3:result;}
else
{var newStart=selStart+result.length;theField.value=s1+result+s3;}
theField.focus();theField.selectionStart=newStart;theField.selectionEnd=newStart;theField.scrollTop=scrollPos;return;}
else if(selMode=='guided')
{eval("document.getElementById('comment_form')."+selField+".value += result");curField=eval("document.getElementById('comment_form')."+selField);curField.blur();curField.focus();return;}
if(item=='other')
{if(tagClose)
{eval("document.getElementById('comment_form')."+selField+".value += tagOpen + tagClose");}
else
{eval("document.getElementById('comment_form')."+selField+".value += tagOpen");}}
else if(eval(which)==0)
{var result=tagOpen;eval("document.getElementById('comment_form')."+selField+".value += result");eval(which+" = 1");arraypush(tagarray,tagClose);arraypush(usedarray,which);running++;styleswap(which);}
else
{n=0;for(i=0;i<tagarray.length;i++)
{if(tagarray[i]==tagClose)
{n=i;running--;while(tagarray[n])
{closeTag=arraypop(tagarray);eval("document.getElementById('comment_form')."+selField+".value += closeTag");}
while(usedarray[n])
{clearState=arraypop(usedarray);eval(clearState+" = 0");document.getElementById(clearState).className='htmlButtonA';}}}}
curField=eval("document.getElementById('comment_form')."+selField);curField.blur();curField.focus();}
function promptTag(which)
{if(!which)
return;var theSelection="";eval("var theField = document.getElementById('comment_form')."+selField+";");if((navigator.appName=="Microsoft Internet Explorer")&&(navigator.appVersion.indexOf("Win")!=-1))
{theSelection=document.selection.createRange().text;}
else if(theField.selectionEnd&&(theField.selectionEnd-theField.selectionStart>0))
{var selLength=theField.textLength;var selStart=theField.selectionStart;var selEnd=theField.selectionEnd;if(selEnd<=2&&typeof(selLength)!='undefined')
selEnd=selLength;var s1=(theField.value).substring(0,selStart);var s2=(theField.value).substring(selStart,selEnd)
var s3=(theField.value).substring(selEnd,selLength);theSelection=s2;}
if(which=="link")
{var URL=prompt(url_text,"http://");if(!URL||URL=='http://'||URL==null)
return;var Name=prompt(webpage_text,theSelection);if(!Name||Name==null)
return;var Link='[url='+URL+']'+Name+'[/url]';}
if(which=="email")
{var Email=prompt(email_text,"");if(!Email||Email==null)
return;var Title=prompt(email_title,theSelection);if(Title==null)
return;if(Title=="")
Title=Email;var Link='['+'email='+Email+']'+Title+'['+'/email]';}
if((navigator.appName=="Microsoft Internet Explorer")&&(navigator.appVersion.indexOf("Win")!=-1))
{if(theSelection!="")
{document.selection.createRange().text=Link;}
else
{eval("document.getElementById('comment_form')."+selField+".value += Link");}}
else if(theField.selectionEnd&&(theField.selectionEnd-theField.selectionStart>0))
{theField.value=s1+Link+s3;}
else
{eval("document.getElementById('comment_form')."+selField+".value += Link");}
curField=eval("document.getElementById('comment_form')."+selField);curField.blur();curField.focus();}
function closeall()
{if(tagarray[0])
{while(tagarray[0])
{closeTag=arraypop(tagarray);eval("document.getElementById('comment_form')."+selField+".value += closeTag");}}
clear_state();curField=eval("document.getElementById('comment_form')."+selField);curField.focus();}
var tb_pathToImage="/imgs/site_images/icons/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage;});function tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});}
function tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}
if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay").addClass("TB_overlayBG");}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[@rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}
imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}
TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}
$("#TB_prev").click(goPrev);}
if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}
$("#TB_next").click(goNext);}
document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||630;TB_HEIGHT=(params['height']*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>");}}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption);}}
$("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").unload(function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children());});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"});}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"});});}}
if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}};}}catch(e){}}
function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"});}
function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","");}
document.onkeydown="";document.onkeyup="";return false;}
function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}}
function tb_parseQuery(query){var Params={};if(!query){return Params;}
var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}
var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}
function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}
function refresh_stock(){$.getJSON("http://spreadsheets.google.com/feeds/cells/tCfmzPY7rtL5pY4acDV5_IA/od6/public/basic?alt=json-in-script&callback=?",function(data){$("#stock-price").html(data.feed.entry[0].content.$t);$("#stock-change").html(data.feed.entry[1].content.$t);});setTimeout('refresh_stock()',50000);}
$(document).ready(function(){refresh_stock();});