/* jQuery utils - 0.5 http://code.google.com/p/jquery-utils/ (c) Maxime Haineault http://haineault.com MIT License (http://www.opensource.org/licenses/mit-license.php */ (function($){$.extend($.expr[':'],{icontains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}});$.extend({basename:function(s){var t=s.split('/');return t[t.length]==''&&s||t.slice(0,t.length).join('/');},filename:function(s){return s.split('/').pop();},isRegExp:function(o){return o&&o.constructor.toString().indexOf('RegExp()')!=-1||false;},isArray:function(o){return o&&o.constructor.toString().indexOf('Array()')!=-1||false;},toCurrency:function(o){o=parseFloat(o,10).toFixed(2);return(o=='NaN')?'0.00':o;},range:function(){if(!arguments.length){return[];}var min,max,step;if(arguments.length==1){min=0;max=arguments[0]-1;step=1;}else{min=arguments[0];max=arguments[1]-1;step=arguments[2]||1;}if(step<0&&min>=max){step*=-1;var tmp=min;min=max;max=tmp;min+=((max-min)%step);}var a=[];for(var i=min;i<=max;i+=step){a.push(i);}return a;}});$.extend($.fn,{selectRange:function(start,end){if($(this).get(0).createTextRange){var range=$(this).get(0).createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',start);range.select();}else if($(this).get(0).setSelectionRange){$(this).bind('focus',function(e){e.preventDefault();}).get(0).setSelectionRange(start,end);}return $(this);}});})(jQuery);(function($){var hash=window.location.hash;var handlers=[];var opt={};$.extend({anchorHandler:{apply:function(){$.map(handlers,function(handler){var match=hash.match(handler.r)&&hash.match(handler.r)[0]||false;if(match){handler.cb.apply($('a[href~='+match+']').get(0),[handler.r,hash||'']);}});return $.anchorHandler;},add:function(regexp,callback,options){var opt=$.extend({handleClick:true,preserveHash:true},options);if(opt.handleClick){$('a[href~=#]').each(function(i,a){if(a.href.match(regexp)){$(a).bind('click.anchorHandler',function(){if(opt.preserveHash){window.location.hash=a.hash;}return callback.apply(this,[regexp,a.href]);});}});}handlers.push({r:regexp,cb:callback});$($.anchorHandler.apply);return $.anchorHandler;}}});})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i=options.elements.length){log('invalid slide index: '+num);return;}options.nextSlide=num;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0;}go(options.elements,options,1,1);return;}if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return;}var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)opts.countdown=opts.autostopCount||els.length;$cont.data('cycle.opts',opts);opts.container=this;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(opts.continuous)opts.after.push(function(){go(els,opts,0,!opts.rev);});if(ie6&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($slides);var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;if($cont.css('position')=='static')$cont.css('position','relative');if(opts.width)$cont.width(opts.width);if(opts.height&&opts.height!='auto')$cont.height(opts.height);if(opts.random){opts.randomMap=[];for(var i=0;i=els.length)opts.startingSlide=0;var first=opts.startingSlide||0;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();if($.browser.msie)els[first].style.removeAttribute('filter');if(opts.fit&&opts.width)$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);if(opts.pause)$cont.hover(function(){this.cyclePause=1;},function(){this.cyclePause=0;});var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))init($cont,$slides,opts);else if(opts.fx!='custom')log('unknown transition: '+opts.fx);$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();});opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)$($slides[first]).css(opts.cssFirst);if(opts.timeout){if(opts.speed.constructor==String)opts.speed={slow:600,fast:200}[opts.speed]||400;if(!opts.sync)opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)opts.timeout+=opts.speed;}if(opts.easing)opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)opts.speedIn=opts.speed;if(!opts.speedOut)opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}else opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;var e0=$slides[first];if(opts.before.length)opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.click&&!opts.next)opts.next=opts.click;if(opts.next)$(opts.next).bind('click',function(){return advance(els,opts,opts.rev?-1:1)});if(opts.prev)$(opts.prev).bind('click',function(){return advance(els,opts,opts.rev?1:-1)});if(opts.pager)buildPager(els,opts);opts.addSlide=function(newSlide){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)opts.countdown++;els.push(s);if(opts.els)opts.els.push(s);opts.slideCount=els.length;$s.css('position','absolute').appendTo($cont);if(ie6&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($s);if(opts.fit&&opts.width)$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager)$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if(typeof opts.onAddSlide=='function')opts.onAddSlide($s);};if(opts.timeout||opts.continuous)this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.continuous?10:opts.timeout+(opts.delay||0));});};function go(els,opts,manual,fwd){if(opts.busy)return;var p=opts.container,curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleTimeout===0&&!manual)return;if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide=els.length){if(opts.nowrap)return false;opts.nextSlide=0;}}log('nextSlide: '+opts.nextSlide+'; randomIndex: '+opts.randomIndex);if(opts.prevNextClick&&typeof opts.prevNextClick=='function')opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false;};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var $a=(typeof opts.pagerAnchorBuilder=='function')?$(opts.pagerAnchorBuilder(i,el)):$(''+(i+1)+'');if($a.parents('body').length==0)$a.appendTo($p);$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(typeof opts.pagerClick=='function')opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!='transparent')return v;}return'#ffffff';};$slides.each(function(){$(this).css('background-color',getBg(this));});};$.fn.cycle.custom=function(curr,next,opts,cb){var $l=$(curr),$n=$(next);$n.css(opts.cssBefore);var fn=function(){$n.animate(opts.animIn,opts.speedIn,opts.easeIn,cb)};$l.animate(opts.animOut,opts.speedOut,opts.easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.startingSlide+')').css('opacity',0);opts.before.push(function(){$(this).show()});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:0};opts.cssAfter={display:'none'};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:'fade',timeout:4000,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:'click',pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,pause:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0};})(jQuery);(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=next.offsetHeight;opts.animOut.top=0-curr.offsetHeight;});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:'none'};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=0-next.offsetHeight;opts.animOut.top=curr.offsetHeight;});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:'none'};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=next.offsetWidth;opts.animOut.left=0-curr.offsetWidth;});opts.cssFirst={left:0};opts.animIn={left:0};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=0-next.offsetWidth;opts.animOut.left=curr.offsetWidth;});opts.cssFirst={left:0};opts.animIn={left:0};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){$(this).show();var currW=curr.offsetWidth,nextW=next.offsetWidth;opts.cssBefore=fwd?{left:nextW}:{left:-nextW};opts.animIn.left=0;opts.animOut.left=fwd?-currW:currW;$slides.not(curr).css(opts.cssBefore);});opts.cssFirst={left:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){$(this).show();var currH=curr.offsetHeight,nextH=next.offsetHeight;opts.cssBefore=fwd?{top:-nextH}:{top:nextH};opts.animIn.top=0;opts.animOut.top=fwd?currH:-currH;$slides.not(curr).css(opts.cssBefore);});opts.cssFirst={top:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1);});opts.onAddSlide=function($s){$s.hide();};opts.cssBefore={zIndex:2};opts.animIn={width:'show'};opts.animOut={width:'hide'};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1);});opts.onAddSlide=function($s){$s.hide();};opts.cssBefore={zIndex:2};opts.animIn={height:'show'};opts.animOut={height:'hide'};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(){$(this).show()});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++)opts.els.push($slides[i]);for(var i=0;irv[i])return true;}return true;};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always';}catch(e){return'6,0,0';}}catch(e){}return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(e){}}return'0,0,0';};$$.htmlOptions={height:240,flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash',width:320};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='
'+this.innerHTML+'
';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions));};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='

This content requires the Flash Player. Download Flash Player. Already have Flash Player? Click here.

';this.innerHTML=''+this.innerHTML+'';jQuery(this).addClass('flash-update').prepend(msg);};function toAttributeString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'="'+this[key]+'" ';return s;};function toFlashvarsString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'');};$$.transform=function(htmlOptions){htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;return'';};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();(function($){$._i18n={trans:{},'default':'en',language:'en'};$.i18n=function(){var getTrans=function(ns,str){var trans=false;if($._i18n.trans[$._i18n.language]&&$._i18n.trans[$._i18n.language][ns]&&$._i18n.trans[$._i18n.language][ns][str]){trans=$._i18n.trans[$._i18n.language][ns][str];}else if($._i18n.trans[$._i18n['default']]&&$._i18n.trans[$._i18n['default']][ns]&&$._i18n.trans[$._i18n['default']][ns][str]){trans=$._i18n.trans[$._i18n['default']][ns][str];}return trans||str;};if(arguments.length<2&&arguments[0].length==2){return $._i18n.language=arguments[0];}else{if(typeof(arguments[1])=='string'){var trans=getTrans(arguments[0],arguments[1]);if(arguments[2]&&typeof(arguments[2])=='object'){return $.format(trans,arguments[2]);}else{return trans;}}else{var tmp=arguments[0].split('.');var lang=tmp[0];var ns=tmp[1]||'jQuery';if(!$._i18n.trans[lang]){$._i18n.trans[lang]={};$._i18n.trans[lang][ns]=arguments[1];}else{$.extend($._i18n.trans[lang][ns],arguments[1]);}}}};})(jQuery);(function($){$.ifixpng=function(customPixel){$.ifixpng.pixel=customPixel;};$.ifixpng.getPixel=function(){return $.ifixpng.pixel||'images/pixel.gif';};var hack={ltie7:$.browser.msie&&$.browser.version<7,filter:function(src){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";}};$.fn.ifixpng=hack.ltie7?function(){return this.each(function(){var $$=$(this);var base=$('base').attr('href');if($$.is('img')||$$.is('input')){if($$.attr('src')){if($$.attr('src').match(/.*\.png([?].*)?$/i)){var source=(base&&$$.attr('src').substring(0,1)!='/')?base+$$.attr('src'):$$.attr('src');$$.css({filter:hack.filter(source),width:$$.width(),height:$$.height()}).attr({src:$.ifixpng.getPixel()}).positionFix();}}}else{var image=$$.css('backgroundImage');if(image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)){image=RegExp.$1;$$.css({backgroundImage:'none',filter:hack.filter(image)}).children().children().positionFix();}}});}:function(){return this;};$.fn.iunfixpng=hack.ltie7?function(){return this.each(function(){var $$=$(this);var src=$$.css('filter');if(src.match(/src=["']?(.*\.png([?].*)?)["']?/i)){src=RegExp.$1;if($$.is('img')||$$.is('input')){$$.attr({src:src}).css({filter:''});}else{$$.css({filter:'',background:'url('+src+')'});}}});}:function(){return this;};$.fn.positionFix=function(){return this.each(function(){var $$=$(this);var position=$$.css('position');if(position!='absolute'&&position!='relative'){$$.css({position:'relative'});}});};})(jQuery);(function($){$.event.special.mousewheel={setup:function(){var handler=$.event.special.mousewheel.handler;if($.browser.mozilla)$(this).bind('mousemove.mousewheel',function(event){$.data(this,'mwcursorposdata',{pageX:event.pageX,pageY:event.pageY,clientX:event.clientX,clientY:event.clientY});});if(this.addEventListener)this.addEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else this.onmousewheel=handler;},teardown:function(){var handler=$.event.special.mousewheel.handler;$(this).unbind('mousemove.mousewheel');if(this.removeEventListener)this.removeEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else this.onmousewheel=function(){};$.removeData(this,'mwcursorposdata');},handler:function(event){var args=Array.prototype.slice.call(arguments,1);event=$.event.fix(event||window.event);$.extend(event,$.data(this,'mwcursorposdata')||{});var delta=0,returnValue=true;if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;if($.browser.opera)delta=-event.wheelDelta;event.data=event.data||{};event.type="mousewheel";args.unshift(delta);args.unshift(event);return $.event.handle.apply(this,args);}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});})(jQuery);(function($){var conversion={__repr:function(i){switch(this.__getType(i)){case'array':case'date':case'number':return i.toString();case'object':var o=[];for(x=0;x0){o=new Array(Math.ceil(l/p.length)).join(p).substr(0,t=!t?l:t==1?0:Math.ceil(l/2))+str+p.substr(0,l-t);}return o;},__getInput:function(arg,args){var key=arg.getKey();switch(this.__getType(args)){case'object':var keys=key.split('.');var obj=args;for(var subkey=0;subkey6)?Math.round(o.toExponential(arg.getPrecision())):o;},G:function(input,args){return this.g(input,args);},c:function(input,args){var match=input.match(/\w|\d/);return match&&match[0]||'';},r:function(input,args){return this.__repr(input);},s:function(input,args){return input.toString&&input.toString()||''+input;}};var Argument=function(arg,args){this.__arg=arg;this.__args=args;this.__max_precision=parseFloat('1.'+(new Array(32)).join('1'),10).toString().length-3;this.__def_precision=6;this.getString=function(){return this.__arg;};this.getKey=function(){return this.__arg.split(':')[0];};this.getFormat=function(){var match=this.getString().split(':');return(match&&match[1])?match[1]:'s';};this.getPrecision=function(){var match=this.getFormat().match(/\.(\d+|\*)/g);if(!match){return this.__def_precision;}else{match=match[0].slice(1);if(match!='*'){return parseInt(match,10);}else if(conversion.__getType(this.__args)=='array'){return this.__args[1]&&this.__args[0]||this.__def_precision;}else if(conversion.__getType(this.__args)=='object'){return this.__args[this.getKey()]&&this.__args[this.getKey()][0]||this.__def_precision;}else{return this.__def_precision;}}};this.getPaddingLength=function(){var match=false;if(this.isAlternate()){match=this.getString().match(/0?#0?(\d+)/);if(match&&match[1]){return parseInt(match[1],10);}}match=this.getString().match(/(0|\.)(\d+|\*)/g);return match&&parseInt(match[0].slice(1),10)||0;};this.getPaddingString=function(){var o='';if(this.isAlternate()){o=' ';}if(this.getFormat().match(/#0|0#|^0|\.\d+/)){o='0';}return o;};this.getFlags=function(){var match=this.getString().matc(/^(0|\#|\-|\+|\s)+/);return match&&match[0].split('')||[];};this.isAlternate=function(){return!!this.getFormat().match(/^0?#/);};};var arguments2Array=function(args,shift){var o=[];for(l=args.length,x=(shift||0)-1;xend||buffer.length<1){buffer.push(tmp[start]);}}return(buffer.length>1)?buffer.join(''):buffer[0];};var calc=function(str,args){return eval(format(str,args));};$.extend({format:format,calc:calc,strConversion:conversion,repeat:function(s,n){return new Array(n+1).join(s);},UTF8encode:function(s){return unescape(encodeURIComponent(s));},UTF8decode:function(s){return decodeURIComponent(escape(s));}});})(jQuery);(function($){$.timeago=function(timestamp){if(timestamp instanceof Date)return inWords(timestamp);else if(typeof timestamp=="string")return inWords($.timeago.parse(timestamp));else return inWords($.timeago.parse($(timestamp).attr("title")));};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:60000,allowFuture:false,strings:{ago:"ago",fromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years"}},inWords:function(distanceMillis){var $l=this.settings.strings;var suffix=$l.ago;if(this.settings.allowFuture){if(distanceMillis<0)suffix=$l.fromNow;distanceMillis=Math.abs(distanceMillis);}var seconds=distanceMillis/1000;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;var words=seconds<45&&sprintf($l.seconds,Math.round(seconds))||seconds<90&&$l.minute||minutes<45&&sprintf($l.minutes,Math.round(minutes))||minutes<90&&$l.hour||hours<24&&sprintf($l.hours,Math.round(hours))||hours<48&&$l.day||days<30&&sprintf($l.days,Math.floor(days))||days<60&&$l.month||days<365&&sprintf($l.months,Math.floor(days/30))||years<2&&$l.year||sprintf($l.years,Math.floor(years));return words+" "+suffix;},parse:function(iso8601){var s=$.trim(iso8601);s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(s);}});$.fn.timeago=function(){var self=this;self.each(refresh);var $s=$t.settings;if($s.refreshMillis>0){setInterval(function(){self.each(refresh);},$s.refreshMillis);}return self;};function refresh(){var date=$t.parse(this.title);if(!isNaN(date)){$(this).text(inWords(date));}return this;}function inWords(date){return $t.inWords(distance(date));}function distance(date){return(new Date().getTime()-date.getTime());}function sprintf(string,value){return string.replace(/%d/i,value);}if($.browser.msie&&$.browser.version<7.0){document.createElement('abbr');}})(jQuery);(function($){var youtubeURL='http://www.youtube.com/v/';var yl2e={onclick:function(){if($(this).next().hasClass('youtubeLinksToEmbed')){return false;}href=youtubeURL+this.href.match(/[a-zA-Z0-9-_]+$/)+'&rel=1';wrapper=$('');player=$('div:first',wrapper);player.flash({src:href,width:425,height:355});$(this).after(wrapper);wrapper.queue(function(){$(this).css('height',40);$(this).dequeue();$(this).slideDown();$(this).dequeue();});setTimeout(function(){wrapper.queue(function(){$(this).find('span').hide().end();$(this).dequeue();$(this).animate({height:375});$(this).dequeue();});setTimeout(function(){player.show();},500);},1500);return false;}};$.fn.youtubeLinksToEmbed=function(options){var opt=$.extend({autoOpen:false},options);$(this).find('a[href~=youtube.com/watch?v=]').addClass('youtubeLinksToEmbed').each(function(){$(this).click(yl2e.onclick);if(opt.autoOpen){$(this).trigger('click');}});};$.fn.youtubeInputsToEmbed=function(options){$(this).find('input[value~=youtube.com/watch?v=]').addClass('youtubeLinksToEmbed').each(function(){$('watch').insertAfter(this);});$(this).youtubeLinksToEmbed(options);};})(jQuery);$(document).ready(function(){$('body').youtubeLinksToEmbed();});(function($){$.extend($.expr[':'],{icontains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}});$.extend({basename:function(s){var t=s.split('/');return t[t.length]==''&&s||t.slice(0,t.length).join('/');},filename:function(s){return s.split('/').pop();},isRegExp:function(o){return o&&o.constructor.toString().indexOf('RegExp()')!=-1||false;},isArray:function(o){return o&&o.constructor.toString().indexOf('Array()')!=-1||false;},toCurrency:function(o){o=parseFloat(o,10).toFixed(2);return(o=='NaN')?'0.00':o;},range:function(){if(!arguments.length){return[];}var min,max,step;if(arguments.length==1){min=0;max=arguments[0]-1;step=1;}else{min=arguments[0];max=arguments[1]-1;step=arguments[2]||1;}if(step<0&&min>=max){step*=-1;var tmp=min;min=max;max=tmp;min+=((max-min)%step);}var a=[];for(var i=min;i<=max;i+=step){a.push(i);}return a;}});$.extend($.fn,{selectRange:function(start,end){if($(this).get(0).createTextRange){var range=$(this).get(0).createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',start);range.select();}else if($(this).get(0).setSelectionRange){$(this).bind('focus',function(e){e.preventDefault();}).get(0).setSelectionRange(start,end);}return $(this);}});})(jQuery);(function($){$.extend($.expr[':'],{icontains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}});$.extend({basename:function(s){var t=s.split('/');return t[t.length]==''&&s||t.slice(0,t.length).join('/');},filename:function(s){return s.split('/').pop();},isRegExp:function(o){return o&&o.constructor.toString().indexOf('RegExp()')!=-1||false;},isArray:function(o){return o&&o.constructor.toString().indexOf('Array()')!=-1||false;},toCurrency:function(o){o=parseFloat(o,10).toFixed(2);return(o=='NaN')?'0.00':o;},range:function(){if(!arguments.length){return[];}var min,max,step;if(arguments.length==1){min=0;max=arguments[0]-1;step=1;}else{min=arguments[0];max=arguments[1]-1;step=arguments[2]||1;}if(step<0&&min>=max){step*=-1;var tmp=min;min=max;max=tmp;min+=((max-min)%step);}var a=[];for(var i=min;i<=max;i+=step){a.push(i);}return a;}});$.extend($.fn,{selectRange:function(start,end){if($(this).get(0).createTextRange){var range=$(this).get(0).createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',start);range.select();}else if($(this).get(0).setSelectionRange){$(this).bind('focus',function(e){e.preventDefault();}).get(0).setSelectionRange(start,end);}return $(this);}});})(jQuery);(function($){var hash=window.location.hash;var handlers=[];var opt={};$.extend({anchorHandler:{apply:function(){$.map(handlers,function(handler){var match=hash.match(handler.r)&&hash.match(handler.r)[0]||false;if(match){handler.cb.apply($('a[href~='+match+']').get(0),[handler.r,hash||'']);}});return $.anchorHandler;},add:function(regexp,callback,options){var opt=$.extend({handleClick:true,preserveHash:true},options);if(opt.handleClick){$('a[href~=#]').each(function(i,a){if(a.href.match(regexp)){$(a).bind('click.anchorHandler',function(){if(opt.preserveHash){window.location.hash=a.hash;}return callback.apply(this,[regexp,a.href]);});}});}handlers.push({r:regexp,cb:callback});$($.anchorHandler.apply);return $.anchorHandler;}}});})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i=options.elements.length){log('invalid slide index: '+num);return;}options.nextSlide=num;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0;}go(options.elements,options,1,1);return;}if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return;}var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)opts.countdown=opts.autostopCount||els.length;$cont.data('cycle.opts',opts);opts.container=this;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(opts.continuous)opts.after.push(function(){go(els,opts,0,!opts.rev);});if(ie6&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($slides);var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;if($cont.css('position')=='static')$cont.css('position','relative');if(opts.width)$cont.width(opts.width);if(opts.height&&opts.height!='auto')$cont.height(opts.height);if(opts.random){opts.randomMap=[];for(var i=0;i=els.length)opts.startingSlide=0;var first=opts.startingSlide||0;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();if($.browser.msie)els[first].style.removeAttribute('filter');if(opts.fit&&opts.width)$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);if(opts.pause)$cont.hover(function(){this.cyclePause=1;},function(){this.cyclePause=0;});var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))init($cont,$slides,opts);else if(opts.fx!='custom')log('unknown transition: '+opts.fx);$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();});opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)$($slides[first]).css(opts.cssFirst);if(opts.timeout){if(opts.speed.constructor==String)opts.speed={slow:600,fast:200}[opts.speed]||400;if(!opts.sync)opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)opts.timeout+=opts.speed;}if(opts.easing)opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)opts.speedIn=opts.speed;if(!opts.speedOut)opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}else opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;var e0=$slides[first];if(opts.before.length)opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.click&&!opts.next)opts.next=opts.click;if(opts.next)$(opts.next).bind('click',function(){return advance(els,opts,opts.rev?-1:1)});if(opts.prev)$(opts.prev).bind('click',function(){return advance(els,opts,opts.rev?1:-1)});if(opts.pager)buildPager(els,opts);opts.addSlide=function(newSlide){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)opts.countdown++;els.push(s);if(opts.els)opts.els.push(s);opts.slideCount=els.length;$s.css('position','absolute').appendTo($cont);if(ie6&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($s);if(opts.fit&&opts.width)$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager)$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if(typeof opts.onAddSlide=='function')opts.onAddSlide($s);};if(opts.timeout||opts.continuous)this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.continuous?10:opts.timeout+(opts.delay||0));});};function go(els,opts,manual,fwd){if(opts.busy)return;var p=opts.container,curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleTimeout===0&&!manual)return;if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide=els.length){if(opts.nowrap)return false;opts.nextSlide=0;}}log('nextSlide: '+opts.nextSlide+'; randomIndex: '+opts.randomIndex);if(opts.prevNextClick&&typeof opts.prevNextClick=='function')opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false;};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var $a=(typeof opts.pagerAnchorBuilder=='function')?$(opts.pagerAnchorBuilder(i,el)):$(''+(i+1)+'');if($a.parents('body').length==0)$a.appendTo($p);$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(typeof opts.pagerClick=='function')opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!='transparent')return v;}return'#ffffff';};$slides.each(function(){$(this).css('background-color',getBg(this));});};$.fn.cycle.custom=function(curr,next,opts,cb){var $l=$(curr),$n=$(next);$n.css(opts.cssBefore);var fn=function(){$n.animate(opts.animIn,opts.speedIn,opts.easeIn,cb)};$l.animate(opts.animOut,opts.speedOut,opts.easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.startingSlide+')').css('opacity',0);opts.before.push(function(){$(this).show()});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:0};opts.cssAfter={display:'none'};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:'fade',timeout:4000,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:'click',pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,pause:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0};})(jQuery);(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=next.offsetHeight;opts.animOut.top=0-curr.offsetHeight;});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:'none'};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.top=0-next.offsetHeight;opts.animOut.top=curr.offsetHeight;});opts.cssFirst={top:0};opts.animIn={top:0};opts.cssAfter={display:'none'};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=next.offsetWidth;opts.animOut.left=0-curr.offsetWidth;});opts.cssFirst={left:0};opts.animIn={left:0};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts){$(this).show();opts.cssBefore.left=0-next.offsetWidth;opts.animOut.left=curr.offsetWidth;});opts.cssFirst={left:0};opts.animIn={left:0};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){$(this).show();var currW=curr.offsetWidth,nextW=next.offsetWidth;opts.cssBefore=fwd?{left:nextW}:{left:-nextW};opts.animIn.left=0;opts.animOut.left=fwd?-currW:currW;$slides.not(curr).css(opts.cssBefore);});opts.cssFirst={left:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){$(this).show();var currH=curr.offsetHeight,nextH=next.offsetHeight;opts.cssBefore=fwd?{top:-nextH}:{top:nextH};opts.animIn.top=0;opts.animOut.top=fwd?currH:-currH;$slides.not(curr).css(opts.cssBefore);});opts.cssFirst={top:0};opts.cssAfter={display:'none'}};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1);});opts.onAddSlide=function($s){$s.hide();};opts.cssBefore={zIndex:2};opts.animIn={width:'show'};opts.animOut={width:'hide'};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(curr).css('zIndex',1);});opts.onAddSlide=function($s){$s.hide();};opts.cssBefore={zIndex:2};opts.animIn={height:'show'};opts.animOut={height:'hide'};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(){$(this).show()});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++)opts.els.push($slides[i]);for(var i=0;irv[i])return true;}return true;};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always';}catch(e){return'6,0,0';}}catch(e){}return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(e){}}return'0,0,0';};$$.htmlOptions={height:240,flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash',width:320};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='
'+this.innerHTML+'
';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions));};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='

This content requires the Flash Player. Download Flash Player. Already have Flash Player? Click here.

';this.innerHTML=''+this.innerHTML+'';jQuery(this).addClass('flash-update').prepend(msg);};function toAttributeString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'="'+this[key]+'" ';return s;};function toFlashvarsString(){var s='';for(var key in this)if(typeof this[key]!='function')s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'');};$$.transform=function(htmlOptions){htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;return'';};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();(function($){$._i18n={trans:{},'default':'en',language:'en'};$.i18n=function(){var getTrans=function(ns,str){var trans=false;if($._i18n.trans[$._i18n.language]&&$._i18n.trans[$._i18n.language][ns]&&$._i18n.trans[$._i18n.language][ns][str]){trans=$._i18n.trans[$._i18n.language][ns][str];}else if($._i18n.trans[$._i18n['default']]&&$._i18n.trans[$._i18n['default']][ns]&&$._i18n.trans[$._i18n['default']][ns][str]){trans=$._i18n.trans[$._i18n['default']][ns][str];}return trans||str;};if(arguments.length<2&&arguments[0].length==2){return $._i18n.language=arguments[0];}else{if(typeof(arguments[1])=='string'){var trans=getTrans(arguments[0],arguments[1]);if(arguments[2]&&typeof(arguments[2])=='object'){return $.format(trans,arguments[2]);}else{return trans;}}else{var tmp=arguments[0].split('.');var lang=tmp[0];var ns=tmp[1]||'jQuery';if(!$._i18n.trans[lang]){$._i18n.trans[lang]={};$._i18n.trans[lang][ns]=arguments[1];}else{$.extend($._i18n.trans[lang][ns],arguments[1]);}}}};})(jQuery);(function($){$.ifixpng=function(customPixel){$.ifixpng.pixel=customPixel;};$.ifixpng.getPixel=function(){return $.ifixpng.pixel||'images/pixel.gif';};var hack={ltie7:$.browser.msie&&$.browser.version<7,filter:function(src){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";}};$.fn.ifixpng=hack.ltie7?function(){return this.each(function(){var $$=$(this);var base=$('base').attr('href');if($$.is('img')||$$.is('input')){if($$.attr('src')){if($$.attr('src').match(/.*\.png([?].*)?$/i)){var source=(base&&$$.attr('src').substring(0,1)!='/')?base+$$.attr('src'):$$.attr('src');$$.css({filter:hack.filter(source),width:$$.width(),height:$$.height()}).attr({src:$.ifixpng.getPixel()}).positionFix();}}}else{var image=$$.css('backgroundImage');if(image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)){image=RegExp.$1;$$.css({backgroundImage:'none',filter:hack.filter(image)}).children().children().positionFix();}}});}:function(){return this;};$.fn.iunfixpng=hack.ltie7?function(){return this.each(function(){var $$=$(this);var src=$$.css('filter');if(src.match(/src=["']?(.*\.png([?].*)?)["']?/i)){src=RegExp.$1;if($$.is('img')||$$.is('input')){$$.attr({src:src}).css({filter:''});}else{$$.css({filter:'',background:'url('+src+')'});}}});}:function(){return this;};$.fn.positionFix=function(){return this.each(function(){var $$=$(this);var position=$$.css('position');if(position!='absolute'&&position!='relative'){$$.css({position:'relative'});}});};})(jQuery);(function($){$.event.special.mousewheel={setup:function(){var handler=$.event.special.mousewheel.handler;if($.browser.mozilla)$(this).bind('mousemove.mousewheel',function(event){$.data(this,'mwcursorposdata',{pageX:event.pageX,pageY:event.pageY,clientX:event.clientX,clientY:event.clientY});});if(this.addEventListener)this.addEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else this.onmousewheel=handler;},teardown:function(){var handler=$.event.special.mousewheel.handler;$(this).unbind('mousemove.mousewheel');if(this.removeEventListener)this.removeEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else this.onmousewheel=function(){};$.removeData(this,'mwcursorposdata');},handler:function(event){var args=Array.prototype.slice.call(arguments,1);event=$.event.fix(event||window.event);$.extend(event,$.data(this,'mwcursorposdata')||{});var delta=0,returnValue=true;if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;if($.browser.opera)delta=-event.wheelDelta;event.data=event.data||{};event.type="mousewheel";args.unshift(delta);args.unshift(event);return $.event.handle.apply(this,args);}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});})(jQuery);(function($){var conversion={__repr:function(i){switch(this.__getType(i)){case'array':case'date':case'number':return i.toString();case'object':var o=[];for(x=0;x0){o=new Array(Math.ceil(l/p.length)).join(p).substr(0,t=!t?l:t==1?0:Math.ceil(l/2))+str+p.substr(0,l-t);}return o;},__getInput:function(arg,args){var key=arg.getKey();switch(this.__getType(args)){case'object':var keys=key.split('.');var obj=args;for(var subkey=0;subkey6)?Math.round(o.toExponential(arg.getPrecision())):o;},G:function(input,args){return this.g(input,args);},c:function(input,args){var match=input.match(/\w|\d/);return match&&match[0]||'';},r:function(input,args){return this.__repr(input);},s:function(input,args){return input.toString&&input.toString()||''+input;}};var Argument=function(arg,args){this.__arg=arg;this.__args=args;this.__max_precision=parseFloat('1.'+(new Array(32)).join('1'),10).toString().length-3;this.__def_precision=6;this.getString=function(){return this.__arg;};this.getKey=function(){return this.__arg.split(':')[0];};this.getFormat=function(){var match=this.getString().split(':');return(match&&match[1])?match[1]:'s';};this.getPrecision=function(){var match=this.getFormat().match(/\.(\d+|\*)/g);if(!match){return this.__def_precision;}else{match=match[0].slice(1);if(match!='*'){return parseInt(match,10);}else if(conversion.__getType(this.__args)=='array'){return this.__args[1]&&this.__args[0]||this.__def_precision;}else if(conversion.__getType(this.__args)=='object'){return this.__args[this.getKey()]&&this.__args[this.getKey()][0]||this.__def_precision;}else{return this.__def_precision;}}};this.getPaddingLength=function(){var match=false;if(this.isAlternate()){match=this.getString().match(/0?#0?(\d+)/);if(match&&match[1]){return parseInt(match[1],10);}}match=this.getString().match(/(0|\.)(\d+|\*)/g);return match&&parseInt(match[0].slice(1),10)||0;};this.getPaddingString=function(){var o='';if(this.isAlternate()){o=' ';}if(this.getFormat().match(/#0|0#|^0|\.\d+/)){o='0';}return o;};this.getFlags=function(){var match=this.getString().matc(/^(0|\#|\-|\+|\s)+/);return match&&match[0].split('')||[];};this.isAlternate=function(){return!!this.getFormat().match(/^0?#/);};};var arguments2Array=function(args,shift){var o=[];for(l=args.length,x=(shift||0)-1;xend||buffer.length<1){buffer.push(tmp[start]);}}return(buffer.length>1)?buffer.join(''):buffer[0];};var calc=function(str,args){return eval(format(str,args));};$.extend({format:format,calc:calc,strConversion:conversion,repeat:function(s,n){return new Array(n+1).join(s);},UTF8encode:function(s){return unescape(encodeURIComponent(s));},UTF8decode:function(s){return decodeURIComponent(escape(s));}});})(jQuery);(function($){$.timeago=function(timestamp){if(timestamp instanceof Date)return inWords(timestamp);else if(typeof timestamp=="string")return inWords($.timeago.parse(timestamp));else return inWords($.timeago.parse($(timestamp).attr("title")));};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:60000,allowFuture:false,strings:{ago:"ago",fromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years"}},inWords:function(distanceMillis){var $l=this.settings.strings;var suffix=$l.ago;if(this.settings.allowFuture){if(distanceMillis<0)suffix=$l.fromNow;distanceMillis=Math.abs(distanceMillis);}var seconds=distanceMillis/1000;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;var words=seconds<45&&sprintf($l.seconds,Math.round(seconds))||seconds<90&&$l.minute||minutes<45&&sprintf($l.minutes,Math.round(minutes))||minutes<90&&$l.hour||hours<24&&sprintf($l.hours,Math.round(hours))||hours<48&&$l.day||days<30&&sprintf($l.days,Math.floor(days))||days<60&&$l.month||days<365&&sprintf($l.months,Math.floor(days/30))||years<2&&$l.year||sprintf($l.years,Math.floor(years));return words+" "+suffix;},parse:function(iso8601){var s=$.trim(iso8601);s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(s);}});$.fn.timeago=function(){var self=this;self.each(refresh);var $s=$t.settings;if($s.refreshMillis>0){setInterval(function(){self.each(refresh);},$s.refreshMillis);}return self;};function refresh(){var date=$t.parse(this.title);if(!isNaN(date)){$(this).text(inWords(date));}return this;}function inWords(date){return $t.inWords(distance(date));}function distance(date){return(new Date().getTime()-date.getTime());}function sprintf(string,value){return string.replace(/%d/i,value);}if($.browser.msie&&$.browser.version<7.0){document.createElement('abbr');}})(jQuery);(function($){var youtubeURL='http://www.youtube.com/v/';var yl2e={onclick:function(){if($(this).next().hasClass('youtubeLinksToEmbed')){return false;}href=youtubeURL+this.href.match(/[a-zA-Z0-9-_]+$/)+'&rel=1';wrapper=$('');player=$('div:first',wrapper);player.flash({src:href,width:425,height:355});$(this).after(wrapper);wrapper.queue(function(){$(this).css('height',40);$(this).dequeue();$(this).slideDown();$(this).dequeue();});setTimeout(function(){wrapper.queue(function(){$(this).find('span').hide().end();$(this).dequeue();$(this).animate({height:375});$(this).dequeue();});setTimeout(function(){player.show();},500);},1500);return false;}};$.fn.youtubeLinksToEmbed=function(options){var opt=$.extend({autoOpen:false},options);$(this).find('a[href~=youtube.com/watch?v=]').addClass('youtubeLinksToEmbed').each(function(){$(this).click(yl2e.onclick);if(opt.autoOpen){$(this).trigger('click');}});};$.fn.youtubeInputsToEmbed=function(options){$(this).find('input[value~=youtube.com/watch?v=]').addClass('youtubeLinksToEmbed').each(function(){$('watch').insertAfter(this);});$(this).youtubeLinksToEmbed(options);};})(jQuery);$(document).ready(function(){$('body').youtubeLinksToEmbed();});if($.ui){$.widget('ui.toaster',{init:function(){var self=this;var wrapper='#ui-toaster-'+self.options.position;if(!$(wrapper).get(0)){$('
').attr('id','ui-toaster-'+self.options.position).appendTo('body');}self.toaster=$('