// Modernizr v1.7  www.modernizr.com
window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document);var tscache;function topstuff_init(){$("#topjobs").topstuff(tscache,{item:"topjobs"});$("#topcars").topstuff(tscache,{item:"topcars"});$("#tophomes").topstuff(tscache,{item:"tophomes"});$("#toprentals").topstuff(tscache,{item:"toprentals"});$(".topstuff_next").click(function(){var a=$(this).parents(".topstuff_body").children(":first-child");var b=$(a).attr("id");$(a).topstuff(tscache,{item:b,position:$(this).siblings(".topstuff_current").html(),direction:1});return false});$(".topstuff_prev").click(function(){var a=$(this).parents(".topstuff_body").children(":first-child");var b=$(a).attr("id");$(a).topstuff(tscache,{item:b,position:$(this).siblings(".topstuff_current").html(),direction:0});return false})}function topstuff_cache(){var c,b,e,d=new Date(),a=d.getFullYear().toString()+d.getMonth().toString()+d.getDate().toString();e=window.location.host.replace(/((.*)\.)?thenewstribune\.com/,"$2");if(e=="blog"){b="http://blog.thenewstribune.com/wp-content/topstuff/topstuff.json?nocache="+a}else{if(e=="preview"){b="http://preview.thenewstribune.com/static/top/includes/topstuff.json?nocache="+a}else{b="http://www.thenewstribune.com/static/top/includes/topstuff.json?nocache="+a}}$.getJSON(b,function(f){tscache=f;topstuff_init()})}(function(a){a.fn.topstuff=function(c,d){var b={item:"topcars",position:"new",direction:1,max:3,amount:0};if(d){a.extend(b,d)}return this.each(function(){var e=a(this);a.fn.topstuff.processor(c,e,b)})};a.fn.topstuff.processor=function(d,c,b){if(b.item=="topjobs"){a.fn.topjobs(b,d,c)}else{if(b.item=="topcars"){b.amount=d.topcarssize}else{if(b.item=="tophomes"){b.amount=d.tophomessize}else{if(b.item=="toprentals"){b.amount=d.toprentalssize}}}if(b.position=="new"){b.position=a.fn.topstuff.rand(b.amount)}b=a.fn.topstuff.getposition(b);a.each(d,function(e,f){if(e==b.item+b.position){a(a.fn.topstuff.which(b.item,f)).appendTo(c.empty());c.next().children(".topstuff_current").empty().append(b.position+1).siblings(".topstuff_total").empty().append(b.amount)}})}};a.fn.topstuff.which=function(b,c){if(b=="topcars"){return a.fn.topstuff.topcars(c)}else{if(b=="tophomes"){return a.fn.topstuff.tophomes(c)}else{if(b=="toprentals"){return a.fn.topstuff.toprentals(c)}}}};a.fn.topstuff.rand=function(b){return Math.floor(Math.random()*b)};a.fn.topstuff.getposition=function(b){b.position=parseInt(b.position,10);if(b.direction==1){if(b.position==b.amount){b.position=0}}else{b.position-=2;if(b.position==-1){b.position=b.amount-1}}return b};a.fn.topstuff.topcars=function(b){var c='<a href="http://wwwb.thenewstribune.com/db/topcars-linker.php?d='+b.dlrid+'" id="topcars_viewall" class="topstuff_viewall">VIEW ALL &raquo;</a>';c+='<p class="topstuff_body_intro">Presented By<br /><a href="http://wwwb.thenewstribune.com/db/topcars-linker.php?d='+b.dlrid+'">'+b.dlr+"</a></p>";c+='<a href="http://wwwb.thenewstribune.com/db/topcars-linker.php?c='+b.id+'" class="topstuff_itemimg">';c+='<img src="http://media.thenewstribune.com/images/top/cars/photos/cars-'+b.dlrid+"-"+b.id+'.jpg" width="150" height="113" alt=""></a>';c+='<p class="topstuff_body_text"><a href="http://wwwb.thenewstribune.com/db/topcars-linker.php?c='+b.id+'">'+b.title+"</a>";c+="<br />"+b.desc+"</p>";return c};a.fn.topstuff.tophomes=function(c){var b='<a href="http://wwwb.thenewstribune.com/db/tophomes-linker.php?cn='+c.realtor+"&a="+c.realtorid+'" id="tophomes_viewall" class="topstuff_viewall">VIEW ALL &raquo;</a>';b+='<p class="topstuff_body_intro">Homes By<br /><a href="http://wwwb.thenewstribune.com/db/tophomes-linker.php?cn='+c.realtor+"&i="+c.realtorid+'">'+c.title+"</a></p>";b+='<p class="topstuff_body_text"><a href="http://wwwb.thenewstribune.com/db/tophomes-linker.php?cn='+c.title+"&i="+c.id+'">'+c.headline+"</a>";b+="<br />"+c.desc+"</p>";return b};a.fn.topstuff.toprentals=function(b){var c='<a href="http://www.southsoundrentals.com/toprents/viewall.php" id="toprentals_viewall" class="topstuff_viewall">VIEW ALL &raquo;</a>';c+='<p class="topstuff_body_intro"><a href="http://wwwb.thenewstribune.com/db/toprentals-linker.php?i='+b.link+'">'+b.account+"</a></p>";c+='<p class="topstuff_body_text"><a href="http://wwwb.thenewstribune.com/db/toprentals-linker.php?i='+b.link+'">'+b.title+"</a>";c+="<br />"+b.desc+"</p>";return c};a.fn.topjobs=function(b,c,f){b.amount=c.topjobssize;var e=a.fn.topjobs.allrand(b),d="";a.each(c,function(g,h){if(a.inArray(g,e)>-1){d+=a.fn.topjobs.makehtml(h)}});f.empty().append(d)};a.fn.topjobs.allrand=function(d){var b=[],e;for(e=0;e<d.max;e++){if(e===0){b[e]=a.fn.topstuff.rand(d.amount)}else{var c=a.fn.topstuff.rand(d.amount);while(a.inArray(c,b)>-1){c=a.fn.topstuff.rand(d.amount)}b[e]=c}}for(e=0;e<d.max;e++){b[e]="topjobs"+b[e]}return b};a.fn.topjobs.makehtml=function(b){var c="<dt>"+b.cat+"</dt>";c+='<dd><a href="http://www.careerbuilder.com/JobSeeker/Jobs/RedirectNewspaperJob.aspx?partnerid=Tacoma&jobid='+b.id+'&lr=cbmc_nt&siteid=cbmc_nt060">'+b.job+"</a><br />";c+=b.employer+"</dd>";return c}})(jQuery);/* Simple JavaScript Inheritance
 * By John Resig http://ejohn.org/
 * MIT Licensed.
 */
(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.constructor=c;c.extend=arguments.callee;return c}})();
/** 

  JUITTER 3.0
  BY RODRIGO FANTE @link http://rodrigofante.com
  Class instance changes by @link http://burninglogic.net

  Juitter is distributed under the MIT License
  Read more about the MIT License --> http://www.opensource.org/licenses/mit-license.php
*/
var Juitter=Class.extend({registerVar:function(a){this.numMSG=20;this.containerDiv="juitterContainer";this.loadMSG="Loading messages...";this.imgName="loader.gif";this.readMore="Read it on Twitter";this.nameUser="image";this.mode=a.mode;this.search=a.search;this.fresh=a.fresh?a.fresh:43200000;this.lang=a.lang?a.lang:"";this.contDiv=a.placeHolder?a.placeHolder:this.containerDiv;this.loadMSG=a.loadMSG?a.loadMSG:this.loadMSG;this.gifName=a.imgName?a.imgName:this.imgName;this.numMSG=a.total?a.total:this.numMSG;this.readMore=a.readMore!==undefined?a.readMore:this.readMore;this.fromID=a.nameUser?a.nameUser:this.nameUser;this.openLink=a.openExternalLinks?'target="_blank"':"";this.url=this.url()},init:function(a){this.ultID=0;if($("#"+this.contDiv)){this.registerVar(a);this.loading();this.conectaTwitter(1)}},url:function(){var a="http://search.twitter.com/search.json?",b=this.lang.length>0?"&lang="+this.lang:b="";param=this.search;mult=param.search(/,/);if(mult>0){param="&ors="+param.replace(/,/g,"+")}if(this.mode=="fromUser"||this.mode=="from"){a+=(mult<=0)?"q=from%3A":"from%3A"}if(this.mode=="toUser"||this.mode=="to"){a+=(mult<=0)?"q=to%3A":"to%3A"}if(this.mode=="search"){param=param.replace(/#/,"%23");a+="q="+param+b+"&rpp="+this.numMSG}else{a+=param+"&rpp="+this.numMSG}return a},update:function(){this.conectaTwitter()},loading:function(){if(this.loadMSG=="image/gif"){$("<img></img>").attr("src",this.gifName).appendTo("#"+this.contDiv)}else{$("#"+this.contDiv).html(this.loadMSG)}},makelinks:function(a){var d,c,b;d=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[\-A-Z0-9+&@#\/%=~_|])/ig;a=a.replace(d,'<a href="$1" class="extLink" '+this.openLink+">$1</a>");d=/[\@]+([A-Za-z0-9-_]+)/ig;a=a.replace(d,'<a href="http://twitter.com/$1" class="profileLink">@$1</a>');d=/[\#]+([A-Za-z0-9-_]+)/ig;a=a.replace(d,'<a href="http://juitter.com/#$1" class="hashLink">#$1</a>');return a},conectaTwitter:function(){var a,b;a=this;b=new Date();$.ajax({url:a.url,type:"GET",dataType:"jsonp",timeout:1000,error:function(){$("#"+a.contDiv).html("")},success:function(c){$("#"+a.contDiv).html("").hide();$.each(c.results,function(g,j){var f,d,h,k,e;if(g==0){$("<ul></ul>").attr("id",a.contDiv+"twittList").attr("class","twittList").prependTo("#"+a.contDiv)}if(j.text!="undefined"){f=new Date(j.created_at);d=b.getTime()-f.getTime();h="http://twitter.com/"+j.from_user+"/status/"+j.id_str;k=j.text;if(a.fromID=="image"){e='<a href="http://twitter.com/'+j.from_user+'"><div class="juitterAvatarContainer"><img src="'+j.profile_image_url+'" alt="'+j.from_user+'" class="juitterAvatar" /></a></div><div class="juitterTweetContainer"> '+a.makelinks(k)+' <span class="time"> &middot; '+f.toLocaleString()+"</span>"}else{e='<a href="http://twitter.com/'+j.from_user+'">@'+j.from_user+":</a> "+a.textFormat(k)+' <span class="time"> &middot;'+f.toLocaleString()+"</span>"}if(a.readMore){e+=' &middot; <a href="'+h+'" '+a.openLink+">"+a.readMore+"</a>"}if(d<a.fresh){$("<li></li>").attr("class","twittLI clearfix fresh").html(e).appendTo("#"+a.contDiv+"twittList")}else{$("<li></li>").attr("class","twittLI clearfix").html(e).appendTo("#"+a.contDiv+"twittList")}}});$("#"+a.contDiv).show("slow")}})},});$(document).ready(function(){$('#search_field').focus(function(){$('#search_controller').css('display','block');})
$('#search_close').click(function(){$('#search_controller').fadeOut(250);});$('#search_form').submit(function(){if($('#search_field').val()==''){alert('Please type in your search terms');return false;}
else{if($('#search_controller input:radio:checked').val()=='web_search'){var encoded_keywords=encodeURIComponent($('#search_field').val());var section_num='702';var url_version='osr';var params='product=Yahoo,Overture&'+'collection=WEB&'+
'preview_template=http%3A%2F%2Fpreview.thenewstribune.com%2F'+
section_num+
'%2Fv-'+url_version+'%2Findex.html&'+
'live_template=http%3A%2F%2Fwww.thenewstribune.com%2F'+
section_num+
'%2Fv-'+
url_version+
'%2Findex.html&'+
'error_template=http%3A%2F%2Fwww.thenewstribune.com%2F'+
section_num+
'%2Fv-err%2Findex.html&'+
'results_per_page=10&preview=1&'+
'prop_related=1&prop_dym=1';window.location='http://search2.thenewstribune.com/search-bin/search.pl.cgi?sf_Keywords='+encoded_keywords+'&'+params;return false;}}});});jQuery(document).ready(function($){$(".tnt_tabs li.tnt_tab_disabled").removeClass("tnt_tab_disabled");$(".tnt_tabs li").click(function(){var el=$(this).children("a").attr("href");$(el).show().siblings(".tnt_tab_content").hide();$(this).addClass("tnt_tab_active").siblings("li").removeClass("tnt_tab_active");return false;});});(function($){$.fn.zvents_includes=function(settings)
{var cfg={site:'tnt',days:5,target:'#zvents_listings'};if(settings){$.extend(cfg,settings);}
return this.each(function(){var $this=$(this);var tabs=[],today=new Date(),day_names=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];for(var i=0;i<cfg.days;i++){var date=today.getDate();var day=today.getDay();var dayName=day_names[day];var weekend=(day===0||day==6);tabs.push({html:date+'<span>'+dayName.slice(0,3)+'</span>',file:'/static/includes/zvents/'+cfg.site+'/'+i+'.3.html',weekend:weekend});today.setDate(date+1);}
$.fn.zvents_includes.tabs($this,cfg.target,tabs);});};$.fn.zvents_includes.tabs=function(el,target,tabs)
{var list=el.html('<ul />').find('ul').addClass('clearfix');var size=tabs.length;for(var i=0;i<size;i++){var li=list.append('<li />').find('li:last-child').html(tabs[i].html);if(i===0){li.addClass('first selected');}
else if(i==size-1){li.addClass('last');}
if(tabs[i].weekend){li.addClass('weekend');}
li.bind('click',{file:tabs[i].file},function(event){var h=Math.round($(target)[0].offsetHeight/2);var loading='<div class="loading" style="height:'+h+'px;padding-top:'+h+'px;text-align:center;">Loading &hellip;</div>'
$(target).html(loading);$.get(event.data.file,function(data){$(target).html(data);});list.children(".selected").removeClass('selected');$(this).addClass('selected');});}};})(jQuery);$(document).ready(function(){topstuff_cache();$('#login_link').click(function(e){e.preventDefault();$(this).siblings('.loginbox').show();});$('.loginclose').click(function(){$(this).parent().fadeOut(500);});if(document.login!==undefined){document.login.rurl.value=document.location.href;}
$("#zvents_calendar_tnt").zvents_includes({target:"#zvents_listings"});});function getCookieVal(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}function GetCookie(d){var b=d+"=";var f=b.length;var a=document.cookie.length;var e=0;while(e<a){var c=e+f;if(document.cookie.substring(e,c)==b){return getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null}function SaveCookie(a,d,e,c){var b=new Date();b.setTime(b.getTime()+(e*86400000));if(c===null){c="/"}c="; path="+c;if(e===null){e=""}else{e="; expires="+b.toGMTString()}document.cookie=a+"="+d+e+c+";domain="+location.host.replace(/.*\.(.*\.com)/,"$1")+";"}function readCookie(b){var e="";var c=b+"=";if(document.cookie.length>0){var d=document.cookie.indexOf(c);if(d!=-1){d+=c.length;var a=document.cookie.indexOf(";",d);if(a==-1){a=document.cookie.length}e=unescape(document.cookie.substring(d,a))}}return e}function parseCookie(d,c){var f=d.split("|");var b,a=f.length;for(b=0;b<a;b++){if(f[b].match(c)){var e=f[b].split("=");return e[1]}}return null}var insitecookie="tacoma_user_auth";var threshold=0;var daystokeep=1;if(GetCookie(insitecookie)&&!GetCookie(insitecookie).match("threshold")){if(!GetCookie("seentoday")){document.write('<img width="1" height="1" border="0" ');document.write("src='http://www.thenewstribune.com/static/secure/log.gif?pg="+escape(document.location)+"'>");SaveCookie("seentoday",1,0.9,"/")}}function tntLongDate(){var a=["January","February","March","April","May","June","July","August","September","October","November","December"];var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var d=new Date();var f=g[d.getDay()];var c=a[d.getMonth()];var e=d.getDate();var b=d.getFullYear();return(f+", "+c+" "+e+", "+b)}Array.prototype.remove=function(c,b){var a=this.slice((b||c)+1||this.length);this.length=c<0?this.length+c:c;return this.push.apply(this,a)};function supports_html5_storage(){try{return"localStorage" in window&&window.localStorage!==null}catch(a){return false}}function get_storage_array(a){var b=localStorage.getItem(a);if(b!==null){b=b.split("|||")}return b}function set_storage_array(a,b){if(b.length===0){delete localStorage[a]}else{localStorage.setItem(a,b.join("|||"))}}$(document).ready(function(){$(".local_dropdown").change(function(){window.location.href=$(this).children("option:selected").val()});var d=supports_html5_storage();var j="tntstory_fontsize";var e=$("#storyBody");var h=18,a=9;if($(e).length!==0){function g(k){$(e).css("font-size",k+"px");if(d){localStorage.setItem(j,k)}}function b(m){var o,k=m.length;var n=m[k-1];if(n!="%"){o=2}else{o=3}return m.slice(0,-o)}function i(k){k=b(k);k++;if(k>h){k=h}g(k)}function c(k){k=b(k);k--;if(k<a){k=a}g(k)}if(d){var f=localStorage.getItem(j);if(f!==null){g(f)}}$(".bigger_font").click(function(){i($(e).css("font-size"));return false});$(".smaller_font").click(function(){c($(e).css("font-size"));return false})}});function GFslideShow(c,a,b){this.feedUrl=null;this.directEntries=null;if(typeof c=="string"){this.feedUrl=c}else{if(c&&c.length&&c.length>1){this.directEntries=c}else{throw"invalid argument: photoFeed"}}if(typeof a=="string"){a=document.getElementById(a)}this.container=a;this.parseOptions(b);this.setup()}GFslideShow.THUMBNAILS_SMALL="small";GFslideShow.THUMBNAILS_MEDIUM="medium";GFslideShow.THUMBNAILS_LARGE="large";GFslideShow.MRSS_THUMBNAIL_TAG="thumbnail";GFslideShow.MRSS_THUMBNAIL_NS="http://search.yahoo.com/mrss/";GFslideShow.ITMS_THUMBNAIL_TAG="coverArt";GFslideShow.ITMS_THUMBNAIL_NS="http://phobos.apple.com/rss/1.0/modules/itms/";GFslideShow.DEFAULT_THUMBNAIL_TAG=GFslideShow.MRSS_THUMBNAIL_TAG;GFslideShow.DEFAULT_THUMBNAIL_NS=GFslideShow.MRSS_THUMBNAIL_NS;GFslideShow.DEFAULT_DISPLAY_TIME=3000;GFslideShow.DEFAULT_TRANSISTION_TIME=1000;GFslideShow.DEFAULT_TRANSISTION_STEP=40;GFslideShow.DEFAULT_PAUSE_PNG=google.loader.ServiceBase+"/solutions/slideshow/pause.png";GFslideShow.DEFAULT_PLAY_PNG=google.loader.ServiceBase+"/solutions/slideshow/play.png";GFslideShow.FC_PAUSE_PNG={small:google.loader.ServiceBase+"/solutions/slideshow/btn_pause_small.png",big:google.loader.ServiceBase+"/solutions/slideshow/btn_pause.png"};GFslideShow.FC_PLAY_PNG={small:google.loader.ServiceBase+"/solutions/slideshow/btn_play_small.png",big:google.loader.ServiceBase+"/solutions/slideshow/btn_play.png"};GFslideShow.FC_PREV_PNG={small:google.loader.ServiceBase+"/solutions/slideshow/btn_prev_small.png",big:google.loader.ServiceBase+"/solutions/slideshow/btn_prev.png"};GFslideShow.FC_NEXT_PNG={small:google.loader.ServiceBase+"/solutions/slideshow/btn_next_small.png",big:google.loader.ServiceBase+"/solutions/slideshow/btn_next.png"};GFslideShow.DEFAULT_FC_FADEOUT_TIME=5000;GFslideShow.DEFAULT_FC_OPACITY=0.65;GFslideShow.prototype.parseOptions=function(a){var c;if(google!=undefined&&google.feeds!=undefined){c=google.feeds.Feed.MAX_ENTRIES}else{c=20}this.options={numResults:c,scaleImages:false,thumbnailTag:GFslideShow.DEFAULT_THUMBNAIL_TAG,thumbnailNamespace:GFslideShow.DEFAULT_THUMBNAIL_NS,thumbnailSize:GFslideShow.THUMBNAILS_LARGE,linkTarget:null,displayTime:GFslideShow.DEFAULT_DISPLAY_TIME,transitionTime:GFslideShow.DEFAULT_TRANSISTION_TIME,transitionStep:GFslideShow.DEFAULT_TRANSISTION_STEP,pauseOnHover:true,pauseImage:GFslideShow.DEFAULT_PAUSE_PNG,pauseStateCallback:null,scalePauseImage:true,autoCleanup:true,thumbnailUrlResolver:null,transitionCallback:null,transitionAnimationCallback:null,feedLoadCallback:null,feedProcessedCallback:null,imageClickCallback:null,centerBias:{topBias:0,leftBias:0},pauseCenterBias:{topBias:0,leftBias:0},fullControlPanel:false,fullControlPanelCursor:false,fullControlPanelFadeOutTime:GFslideShow.DEFAULT_FC_FADEOUT_TIME,fullControlPanelPlayCallback:null,fullControlPanelSmallIcons:false,maintainAspectRatio:true,feedRenderCallback:null};if(a){for(o in this.options){if(typeof a[o]!="undefined"){this.options[o]=a[o]}}}if(this.options.displayTime<100){this.options.displayTime=100}var b=(this.options.transitionTime/this.options.transitionStep);this.delta=Math.min(1,(1/b));this.started=false};GFslideShow.prototype.setup=function(){if(this.container==null){return}if(window.ActiveXObject){this.ie=this[window.XMLHttpRequest?"ie7":"ie6"]=true}else{if(window.opera){this.opera=true}else{if(document.childNodes&&!document.all&&!navigator.taintEnabled){this.safari=true;if(navigator.userAgent.indexOf("iPhone")>0){this.iphone=true}}else{if(document.getBoxObjectFor!=null){this.gecko=true}}}}if(this.feedUrl){this.feed=new google.feeds.Feed(this.feedUrl);this.feed.setResultFormat(google.feeds.Feed.MIXED_FORMAT);this.feed.setNumEntries(this.options.numResults);this.feed.load(this.bind(this.feedLoaded))}else{if(this.directEntries){this.feedLoaded(this.directEntries)}}};GFslideShow.prototype.addEntries=function(a){this.processEntries(a);if(!this.thumb_timer){this.processThumbs()}};GFslideShow.prototype.bind=function(c){var a=this;var b=[].slice.call(arguments,1);return function(){var d=b.concat([].slice.call(arguments));return c.apply(a,d)}};GFslideShow.prototype.mouseOver=function(c){var b=c||window.event;var a=b.relatedTarget||b.fromElement;while(a!=null){if(a==this.container){return}a=a.parentNode}if(this.options.fullControlPanel){if(this.options.pauseOnHover&&!this.display_paused){this.pauseOrPlayFullControl()}this.fadeInFullControl()}else{this.display_paused=true;if(this.pauseImage){this.pauseImage.style.visibility="visible"}}if(this.options.pauseStateCallback){this.options.pauseStateCallback(this.display_paused)}};GFslideShow.prototype.mouseOut=function(c){var b=c||window.event;var a=b.relatedTarget||b.toElement;while(a!=null){if(a==this.container){return}a=a.parentNode}if(this.options.fullControlPanel){this.fadeOutFullControl();this.container.onmousemove=null;if(this.options.pauseOnHover&&this.display_paused){this.pauseOrPlayFullControl()}}else{this.display_paused=false;if(this.pauseImage){this.pauseImage.style.visibility="hidden"}}if(this.options.pauseStateCallback){this.options.pauseStateCallback(this.display_paused)}if(this.display_timer==null&&this.transition_timer==null){this.displayNextPhoto()}};GFslideShow.prototype.operaClickAndCallout=function(){var b=this.entries[this.photo_index];var a=this.createLink(b.link);a.click()};GFslideShow.prototype.pause=function(b){var a=this.pauseImage;if(b){this.pauseImage=null}this.pauseAndCallout();this.pauseImage=a};GFslideShow.prototype.resume=function(){this.resumeSlideShow()};GFslideShow.prototype.pauseAndCallout=function(){this.display_paused=true;if(this.pauseImage){this.pauseImage.style.visibility="visible"}this.container.onmouseout=null;if(this.options.imageClickCallback){this.options.imageClickCallback(this.entries[this.photo_index])}};GFslideShow.prototype.resumeSlideShow=function(){if(this.options.pauseOnHover||this.options.fullControlPanel){this.container.onmouseover=this.bind(this.mouseOver);this.container.onmouseout=this.bind(this.mouseOut)}this.display_paused=false;if(this.pauseImage){this.pauseImage.style.visibility="hidden"}if(this.display_timer==null&&this.transition_timer==null){this.displayNextPhoto()}};GFslideShow.prototype.clearNode=function(a){if(a==null){return}var b;while(b=a.firstChild){a.removeChild(b)}};GFslideShow.prototype.createSubContainer=function(){var a=document.createElement("div");a.style.width="100%";a.style.height="100%";a.style.position="relative";a.style.overflow="hidden";this.clearNode(this.container);this.container.appendChild(a);this.container=a};GFslideShow.prototype.grabThumb=function(b){var c=0;if(b.length>1){if(this.options.thumbnailSize==GFslideShow.THUMBNAILS_LARGE){c=b.length-1}else{if(this.options.thumbnailSize==GFslideShow.THUMBNAILS_MEDIUM){c=Math.floor(b.length/2)}}}var d=b[c];var a=null;var a=d.getAttribute("url");if(!a){a=d.firstChild.nodeValue}return a};GFslideShow.prototype.processThumbs=function(h,k){this.thumb_timer=null;var a=this.thumbs_index;var f=this.entries.length;var l=h||4;if(f>(a+l)){f=(a+l);var d=this.bind(this.processThumbs);var m=k||Math.round(this.options.displayTime/4);this.thumb_timer=window.setTimeout(d,m)}for(var e=a;e<f;e++){var g=this.entries[e].thumbUrl;var c=this.createImage(g);this.images.push(c);if(this.options.linkTarget){if(!this.opera){var j=this.createLink(this.entries[e].link);j.appendChild(c);this.container.appendChild(j)}else{c.onclick=this.bind(this.operaClickAndCallout);c.style.cursor="pointer";this.container.appendChild(c)}}else{this.container.appendChild(c)}if(c.complete){this.imageLoaded(c)}else{c.onerror=this.bind(this.imageError,c);c.onload=this.bind(this.imageLoaded,c)}this.thumbs_index++;var b=this.options.numResults;if(this.options.feedRenderCallback&&this.thumbs_index==b&&e==(b-1)){this.options.feedRenderCallback()}}};GFslideShow.prototype.processEntries=function(a){for(var c=0;c<a.length;c++){var d=null;if(this.options.thumbnailUrlResolver){d=this.options.thumbnailUrlResolver(a[c])}else{var b=google.feeds.getElementsByTagNameNS(a[c].xmlNode,this.options.thumbnailNamespace,this.options.thumbnailTag);if(b&&b.length>0){d=this.grabThumb(b)}}if(d){a[c].thumbUrl=d;this.entries.push(a[c])}}};GFslideShow.prototype.feedLoaded=function(b){if(this.options.feedLoadCallback){this.options.feedLoadCallback(b)}if((this.feedUrl&&b.error)||(this.directEntries&&this.directEntries.length==0)){if(!this.options.feedLoadCallback){this.container.innerHTML='<center style="color: gray">feed could not be loaded.</center>'}return}this.createSubContainer();if(this.container.offsetWidth){this.width=this.container.offsetWidth;this.height=this.container.offsetHeight}this.createPauseImage();this.images=[];this.entries=[];this.thumbs_index=0;var a;if(this.feedUrl){a=b.feed.entries}else{a=this.directEntries}this.processEntries(a);if(this.options.feedProcessedCallback){this.options.feedProcessedCallback(b)}if(this.options.fullControlPanel&&this.entries.length>0){this.createFullControlPanel()}if((this.options.pauseOnHover||this.options.fullControlPanel)&&this.entries.length>0){this.container.onmouseover=this.bind(this.mouseOver);this.container.onmouseout=this.bind(this.mouseOut)}if(this.options.imageClickCallback){this.container.onclick=this.bind(this.pauseAndCallout)}this.processThumbs(1,100+(Math.random()*100))};GFslideShow.prototype.imageLoaded=function(b){b.__gfloaded=true;this.adjustImage(b);if(!this.started){for(var a=0;a<this.images.length;a++){if(b==this.images[a]){this.beginSlideShow(a)}break}}};GFslideShow.prototype.imageError=function(a){a.__gferror=true};GFslideShow.prototype.adjustImage=function(a){if(this.options.scaleImages){if(this.options.maintainAspectRatio){this.scaleImage(a)}else{a.style.height=this.height+"px";a.style.width=this.width+"px"}}this.centerImage(a)};GFslideShow.prototype.scaleImage=function(c,a,f){var b=a||this.width;var i=f||this.height;var g=c.offsetWidth;var d=c.offsetHeight;if(g<=0||d<=0){return}var e=i/d;var h=b/g;if(e<h){c.style.height=i+"px";c.style.width=Math.round(g*e)+"px"}else{c.style.width=b+"px";c.style.height=Math.round(d*h)+"px"}};GFslideShow.prototype.centerImage=function(e){var c=this.height-e.offsetHeight;var b=this.width-e.offsetWidth;e.style.top="0px";e.style.left="0px";if(c>0){var a=Math.round(c/2);e.style.top=e.offsetTop+a+this.options.centerBias.topBias+"px"}if(b>0){var d=Math.round(b/2);e.style.left=e.offsetLeft+d+this.options.centerBias.leftBias+"px"}};GFslideShow.prototype.createLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);if(this.options.linkTarget){b.setAttribute("target",this.options.linkTarget)}return b};GFslideShow.prototype.createImage=function(b){var a=document.createElement("img");a.style.position="absolute";a.setAttribute("src",b);this.setOpacity(a,0);return a};GFslideShow.prototype.adjustPauseImage=function(c){if(this.options.scalePauseImage){var a=Math.round(this.height*0.33);var b=Math.round(this.width*0.33);this.scaleImage(c,b,a)}this.placePauseImage(c)};GFslideShow.prototype.placePauseImage=function(e){var c=this.height-e.offsetHeight;var b=this.width-e.offsetWidth;e.style.top="0px";e.style.left="0px";if(c>0){var f=Math.round(this.height*0.1);if(f<15){f=10}var a=this.height-(e.offsetHeight+f);if(a<0){a=0}e.style.top=e.offsetTop+a+this.options.pauseCenterBias.topBias+"px"}if(b>0){var d=Math.round(b/2);e.style.left=e.offsetLeft+d+this.options.pauseCenterBias.leftBias+"px"}};GFslideShow.prototype.createAlphaPauseImage=function(e){this.adjustPauseImage(e);var c=e.offsetWidth;var g=e.offsetHeight;var d=e.style.top;var b=e.style.left;var a=null;if(this.ie){var f=this.options.pauseImage;a=document.createElement("div");a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f+"', sizingMethod='scale')";a.style.position="absolute";a.style.width=c+"px";a.style.height=g+"px";a.style.left=b;a.style.top=d}else{a=e;a.style.opacity=""}a.style.visibility="hidden";a.style.zIndex=222;if(a!=e){this.container.appendChild(a);this.container.removeChild(e)}this.pauseImage=a};GFslideShow.prototype.pauseImageLoaded=function(a){this.createAlphaPauseImage(a)};GFslideShow.prototype.createPauseImage=function(b){if(!this.options.pauseOnHover){return}var a=this.createImage(this.options.pauseImage);this.container.appendChild(a);if(a.complete){this.createAlphaPauseImage(a)}else{a.onload=this.bind(this.pauseImageLoaded,a)}};GFslideShow.prototype.createFullControlPanel=function(){var e=(this.options.fullControlPanelSmallIcons?25:45);if(this.options.fullControlPanelCursor){e+=10}var g=(this.options.fullControlPanelSmallIcons?5:10);var d=5;var a=document.createElement("div");a.style.backgroundColor="#000000";a.style.height=e+"px";a.style.top=(this.height-(e+d+g))+"px";a.style.width="100%";a.style.zIndex="222";a.style.position="relative";a.style.textAlign="center";a.style.direction="ltr";a.style.paddingTop=g+"px";a.style.paddingBottom=d+"px";var i=this.options.fullControlPanelSmallIcons?"small":"big";var b=this.ie?"hand":"pointer";var k=document.createElement("img");k.src=GFslideShow.FC_PAUSE_PNG[i];k.style.cursor=b;var f=document.createElement("img");f.src=GFslideShow.FC_NEXT_PNG[i];f.style.cursor=b;var c=document.createElement("img");c.src=GFslideShow.FC_PREV_PNG[i];c.style.cursor=b;k.style.marginLeft="5px";k.style.marginRight="5px";a.appendChild(c);a.appendChild(k);a.appendChild(f);var j=null;if(this.options.fullControlPanelCursor){j=document.createElement("div");j.style.height="1.3em";j.style.fontSize="11px";j.style.color="#bbbbbb";a.appendChild(j)}this.fc={};this.fc.container=a;this.fc.pause=k;this.fc.next=f;this.fc.prev=c;this.fc.cursor=j;f.onclick=this.bind(this.goForward);c.onclick=this.bind(this.goBackward);k.onclick=this.bind(this.pauseOrPlayClick);this.fc.container.style.visibility="hidden";this.container.appendChild(a)};GFslideShow.prototype.clearTransitionTimer=function(){if(this.transition_timer){clearInterval(this.transition_timer);this.transition_timer=null}};GFslideShow.prototype.setTransitionTimer=function(){this.clearTransitionTimer();this.lastTick=GFslideShow.timeNow();var a=this.bind(this.transitionAnimation);this.transition_timer=window.setInterval(a,this.options.transitionStep)};GFslideShow.prototype.clearDisplayTimer=function(){if(this.display_timer){clearTimeout(this.display_timer);this.display_timer=null}};GFslideShow.prototype.setDisplayTimer=function(){if(this.display_timer){return}var a=this.bind(this.displayNextPhoto);this.display_timer=window.setTimeout(a,this.options.displayTime)};GFslideShow.prototype.clearThumbTimer=function(){if(this.thumb_timer){clearTimeout(this.thumb_timer);this.thumb_timer=null}};GFslideShow.prototype.beginSlideShow=function(a){this.photo_index=a;this.next=this.images[this.photo_index];this.snapToNextPhoto();this.started=true};GFslideShow.timeNow=function(){var a=new Date();return a.getTime()};GFslideShow.prototype.goForward=function(){this.finishTransition();this.setNextPhoto();this.snapToNextPhoto();this.clearFullControlTimeoutTimer()};GFslideShow.prototype.goBackward=function(){this.finishTransition();this.setPreviousPhoto();this.snapToNextPhoto();this.clearFullControlTimeoutTimer()};GFslideShow.prototype.gotoIndex=function(a){if(a==this.photo_index){return}this.clearTransitionTimer();this.setPhotoIndex(a);this.snapToNextPhoto();this.clearFullControlTimeoutTimer()};GFslideShow.prototype.pauseOrPlayClick=function(){if(this.options.fullControlPanelPlayCallback&&this.display_paused){this.container.onmouseover=null;this.container.onmouseout=null;this.options.fullControlPanelPlayCallback(this.entries[this.photo_index]);this.fadeOutFullControl()}else{this.pauseOrPlayFullControl()}};GFslideShow.prototype.pauseOrPlayFullControl=function(){var a=this.options.fullControlPanelSmallIcons?"small":"big";if(this.display_paused){this.display_paused=false;this.fc.pause.src=GFslideShow.FC_PAUSE_PNG[a];if(this.display_timer==null&&this.transition_timer==null){this.displayNextPhoto()}}else{this.display_paused=true;this.fc.pause.src=GFslideShow.FC_PLAY_PNG[a]}};GFslideShow.prototype.fullControlMotion=function(){var a=this.fc.container.opacity;if(a<GFslideShow.DEFAULT_FC_OPACITY){this.container.onmousemove=null;this.clearFullControlTimeoutTimer();this.fadeInFullControl()}else{this.setFullControlTimeoutTimer()}};GFslideShow.prototype.clearFullControlTimeoutTimer=function(){if(!this.fc){return}if(this.fc.timeout){clearTimeout(this.fc.timeout);this.fc.timeout=null}};GFslideShow.prototype.setFullControlTimeoutTimer=function(){if(this.fc.timeout){clearTimeout(this.fc.timeout);this.fc.timeout=null}if(this.options.fullControlPanelFadeOutTime>0){var a=this.bind(this.fadeOutFullControl);this.fc.timeout=setTimeout(a,this.options.fullControlPanelFadeOutTime)}};GFslideShow.prototype.setFullControlTimeout=function(){this.container.onmousemove=this.bind(this.fullControlMotion);this.setFullControlTimeoutTimer()};GFslideShow.prototype.fadeInFullControl=function(){this.setOpacity(this.fc.container,0);var a=this.bind(this.fadeInFullControlAnimation);this.setFullControlFadeTimer(a)};GFslideShow.prototype.fadeInFullControlAnimation=function(){var a=this.fc.container.opacity;a+=0.075;a=Math.min(GFslideShow.DEFAULT_FC_OPACITY,a);this.setOpacity(this.fc.container,a);if(a>=GFslideShow.DEFAULT_FC_OPACITY){this.setFullControlFadeTimer();this.setFullControlTimeout()}};GFslideShow.prototype.fadeOutFullControl=function(){var a=this.bind(this.fadeOutFullControlAnimation);this.setFullControlFadeTimer(a)};GFslideShow.prototype.fadeOutFullControlAnimation=function(){var a=this.fc.container.opacity;a-=0.075;this.setOpacity(this.fc.container,a);if(a<=0){this.setFullControlFadeTimer()}};GFslideShow.prototype.setFullControlFadeTimer=function(a){if(this.fc.fade_timer){clearInterval(this.fc.fade_timer);this.fc.fade_timer=null}if(a){this.fc.fade_timer=window.setInterval(a,40)}};GFslideShow.prototype.transitionAnimation=function(){if(this.current&&this.next){var f=this.delta;var e=this.options.transitionStep;var b=GFslideShow.timeNow();var d=b-this.lastTick;this.lastTick=b;f*=(d/e);if(f<0){return}var a=this.current.opacity-f;var c=this.next.opacity+f;this.setOpacity(this.current,a);this.setOpacity(this.next,c);if(this.options.transitionAnimationCallback){this.options.transitionAnimationCallback(this.next.opacity)}if(a>0){return}}this.finishTransition()};GFslideShow.prototype.setNextPhoto=function(){if(this.images.length==0){return}var a=this.photo_index;if(++this.photo_index>=this.images.length){this.photo_index=0}var b=this.images[this.photo_index];if(b&&b.__gfloaded){this.next=b}else{if(this.photo_index==a){this.next=this.images[0]}}};GFslideShow.prototype.setPreviousPhoto=function(){var a=this.photo_index;if(this.images.length!=0){if(--this.photo_index<0){this.photo_index=this.images.length-1}var b=this.images[this.photo_index];if(b&&b.__gfloaded){this.next=b}else{if(this.photo_index==a){this.next=this.images[0]}}}};GFslideShow.prototype.setPhotoIndex=function(a){if(a<0||a>=this.images.length){return}var b=this.images[a];if(b&&b.__gfloaded){this.next=b;this.photo_index=a}};GFslideShow.prototype.clearPauseEvents=function(){this.container.onmouseover=null;this.container.onmouseout=null};GFslideShow.prototype.cleanup=function(){this.clearTransitionTimer();this.clearDisplayTimer();this.clearThumbTimer();this.clearPauseEvents();this.clearNode(this.container);this.container=null};GFslideShow.prototype.displayNextPhoto=function(){this.display_timer=null;if(!this.started){return false}if(this.display_paused){return}if((!this.container||!this.container.parentNode)&&this.options.autoCleanup){this.cleanup();return}this.setNextPhoto();this.beginTransition()};GFslideShow.prototype.snapToNextPhoto=function(){this.setOpacity(this.next,1);this.setOpacity(this.current,0);this.current=this.next;this.setDisplayTimer();if(this.options.transitionCallback){this.options.transitionCallback(this.entries[this.photo_index],this.options.transitionTime)}if(this.options.fullControlPanel&&this.options.fullControlPanelCursor){var a=(this.photo_index+1)+" / "+this.images.length;this.fc.cursor.innerHTML=a}};GFslideShow.prototype.beginTransition=function(){if(!this.current||!this.next||(this.current==this.next)){this.setDisplayTimer();return}if(this.options.transitionTime>=this.options.transitionStep){this.setTransitionTimer()}else{this.snapToNextPhoto()}};GFslideShow.prototype.finishTransition=function(){this.clearTransitionTimer();this.snapToNextPhoto()};GFslideShow.prototype.setOpacity=function(b,a){if(b==null){return}a=Math.max(0,Math.min(1,a));if(a==0){if(b.style.visibility!="hidden"){b.style.visibility="hidden"}}else{if(b.style.visibility!="visible"){b.style.visibility="visible"}}if(this.ie){b.style.filter="alpha(opacity="+a*100+")"}b.style.opacity=b.opacity=a};function miPollAjax(){this.poll_id="";this.story_id="";this.section_id="";this.stretched=false;this.vote_casted=false;this.base_url=document.location.protocol+"//"+document.location.host;this.submitPoll=function(){var a=this.getPollValue();if(a!==-1){if(this.vote_casted===true){alert("Limit 1 vote per user, you have already voted.")}else{url="http://www.thenewstribune.com/survey-bin/tabulate_poll.cgi?mi_pb_cache=1&expire_days=5&path=/&already_voted_error=You%20have%20already%20voted.%20Limit%201%20vote%20per%20user.&save=Cast%20Vote&value=Cast%20Vote";url=url+"&poll_id="+this.poll_id;url=url+"&section_id="+this.section_id;url=url+"&story_id="+this.story_id;url=url+"&poll_response="+a;$("#poll_result").load(url);this.hidePollForm();this.fetchPollResults();this.showPollResults();this.vote_casted=true}}else{alert("Please choose an option to vote for")}};this.fetchPollResults=function(){url="http://www.thenewstribune.com/survey-bin/tabulate_poll.cgi?mi_pb_cache=1&expire_days=5&path=/&already_voted_error=You%20have%20already%20voted.%20Limit%201%20vote%20per%20user.";url=url+"&poll_id="+this.poll_id;url=url+"&section_id="+this.section_id;url=url+"&story_id="+this.story_id;$("#poll_result").load(url)};this.register_response=function(a){this.tempElement=a;this.stretch_graphs()};this.getPollValue=function(){var a,b=document.forms.poll_responses.poll_response;for(a=0;a<b.length;a++){if(b[a].checked){return(b[a].value)}}return -1};this.visibilityCheck=function(){if(this.alreadyVoted()){this.hidePollForm();this.fetchPollResults();this.showPollResults();this.vote_casted=true}else{this.showPollForm()}};this.alreadyVoted=function(){content=this.getPollCookie("mi_polls");if(content===null){return}sval=content.split(";");num_cookies=sval.length;key=[];for(x=0;x<num_cookies/2+1;x++){qval=sval[x].split("=");id=qval[0];poll_submitted=qval[1];key[id]=poll_submitted}if(key[this.poll_id]===1){return true}else{return false}};this.getPollCookie=function(a){dc=document.cookie;cname=a+"=";clen=dc.length;cbegin=0;while(cbegin<clen){vbegin=cbegin+cname.length;if(dc.substring(cbegin,vbegin)==cname){vend=dc.indexOf(";",vbegin);if(vend===-1){vend=clen}return unescape(dc.substring(vbegin,vend))}cbegin=dc.indexOf(" ",cbegin)+1;if(cbegin===0){break}}return null};this.stretch_graphs=function(){this.stretched=true;var c=document.getElementById("poll_result");var b=document.getElementById("poll_form");if(c.offsetWidth>0){div_width=c.offsetWidth}else{div_width=b.offsetWidth}multiplier=(div_width*0.9-20)/100;var a=document.getElementsByName("bar_result");for(count=0;count<a.length;count++){pixels=a[count].width;if(pixels>0){a[count].width=pixels*multiplier}}};this.hidePollForm=function(){var a=document.getElementById("poll_form");if(a){a.style.display="none"}};this.showPollForm=function(){var a=document.getElementById("poll_form");if(a){a.style.display="block"}};this.hidePollResult=function(){var a=document.getElementById("poll_result");if(a){a.style.display="none"}};this.hideAlreadyVotedMessage=function(){var a=document.getElementById("poll_already_voted");if(a){a.style.display="none"}};this.showPollResults=function(){this.fetchPollResults();var a=document.getElementById("poll_result");if(a){a.style.display="block"}if(this.stretched===false){this.stretch_graphs()}};this.showAlreadyVotedMessage=function(){element=document.getElementById("poll_already_voted");if(element){element.style.display="block"}}}$(document).ready(function(){if($("#poll_stats").length>0){var a=$("#poll_stats").val().split("|");if(a.length>2){mi_poll=new miPollAjax();mi_poll.poll_id=a[0];mi_poll.story_id=a[1];mi_poll.section_id=a[2];mi_poll.visibilityCheck()}}});
