(function($){var ua=navigator.userAgent;var moz=$.browser.mozilla&&/gecko/i.test(ua);var webkit=$.browser.safari&&/Safari\/[5-9]/.test(ua);var expr=$.browser.msie&&(function(){var div=document.createElement('div');try{div.style.setExpression('width','0+0');}
catch(e){return false;}
return true;})();function sz(el,p){return parseInt($.css(el,p))||0;};function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?'0'+s:s;};function gpc(node){for(;node&&node.nodeName.toLowerCase()!='html';node=node.parentNode){var v=$.css(node,'backgroundColor');if(v=='rgba(0, 0, 0, 0)')
continue;if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2]);}
if(v&&v!='transparent')
return v;}
return'#ffffff';};function getWidth(fx,i,width){switch(fx){case'round':return Math.round(width*(1-Math.cos(Math.asin(i/width))));case'cool':return Math.round(width*(1+Math.cos(Math.asin(i/width))));case'sharp':return Math.round(width*(1-Math.cos(Math.acos(i/width))));case'bite':return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case'slide':return Math.round(width*(Math.atan2(i,width/i)));case'jut':return Math.round(width*(Math.atan2(width,(width-i-1))));case'curl':return Math.round(width*(Math.atan(i)));case'tear':return Math.round(width*(Math.cos(i)));case'wicked':return Math.round(width*(Math.tan(i)));case'long':return Math.round(width*(Math.sqrt(i)));case'sculpt':return Math.round(width*(Math.log((width-i-1),width)));case'dog':return(i&1)?(i+1):width;case'dog2':return(i&2)?(i+1):width;case'dog3':return(i&3)?(i+1):width;case'fray':return(i%2)*width;case'notch':return width;case'bevel':return i+1;}};$.fn.corner=function(options){if(this.length==0){if(!$.isReady&&this.selector){var s=this.selector,c=this.context;$(function(){$(s,c).corner(options);});}
return this;}
return this.each(function(index){var $this=$(this);var o=[options||'',$this.attr($.fn.corner.defaults.metaAttr)||''].join(' ').toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx=((o.match(re)||['round'])[0]);var edges={T:0,B:1};var opts={TL:/top|tl|left/.test(o),TR:/top|tr|right/.test(o),BL:/bottom|bl|left/.test(o),BR:/bottom|br|right/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR)
opts={TL:1,TR:1,BL:1,BR:1};if($.fn.corner.defaults.useNative&&fx=='round'&&(moz||webkit)&&!cc&&!sc){if(opts.TL)
$this.css(moz?'-moz-border-radius-topleft':'-webkit-border-top-left-radius',width+'px');if(opts.TR)
$this.css(moz?'-moz-border-radius-topright':'-webkit-border-top-right-radius',width+'px');if(opts.BL)
$this.css(moz?'-moz-border-radius-bottomleft':'-webkit-border-bottom-left-radius',width+'px');if(opts.BR)
$this.css(moz?'-moz-border-radius-bottomright':'-webkit-border-bottom-right-radius',width+'px');return;}
var strip=document.createElement('div');strip.style.overflow='hidden';strip.style.height='1px';strip.style.backgroundColor=sc||'transparent';strip.style.borderStyle='solid';var pad={T:parseInt($.css(this,'paddingTop'))||0,R:parseInt($.css(this,'paddingRight'))||0,B:parseInt($.css(this,'paddingBottom'))||0,L:parseInt($.css(this,'paddingLeft'))||0};if(typeof this.style.zoom!=undefined)this.style.zoom=1;if(!keep)this.style.border='none';strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,'height');for(var j in edges){var bot=edges[j];if((bot&&(opts.BL||opts.BR))||(!bot&&(opts.TL||opts.TR))){strip.style.borderStyle='none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');var d=document.createElement('div');$(d).addClass('jquery-corner');var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!='auto'){if($.css(this,'position')=='static')
this.style.position='relative';ds.position='absolute';ds.bottom=ds.left=ds.padding=ds.margin='0';if(expr)
ds.setExpression('width','this.parentNode.offsetWidth');else
ds.width='100%';}
else if(!bot&&$.browser.msie){if($.css(this,'position')=='static')
this.style.position='relative';ds.position='absolute';ds.top=ds.left=ds.right=ds.padding=ds.margin='0';if(expr){var bw=sz(this,'borderLeftWidth')+sz(this,'borderRightWidth');ds.setExpression('width','this.parentNode.offsetWidth - '+bw+'+ "px"');}
else
ds.width='100%';}
else{ds.position='relative';ds.margin=!bot?'-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px':(pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';}
for(var i=0;i<width;i++){var w=Math.max(0,getWidth(fx,i,width));var e=strip.cloneNode(false);e.style.borderWidth='0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';bot?d.appendChild(e):d.insertBefore(e,d.firstChild);}}}});};$.fn.uncorner=function(){if(moz||webkit)
this.css(moz?'-moz-border-radius':'-webkit-border-radius',0);$('div.jquery-corner',this).remove();return this;};$.fn.corner.defaults={useNative:true,metaAttr:'data-corner'};})(jQuery);(function(jQuery){var self=null;jQuery.fn.autogrow=function(o)
{return this.each(function(){new jQuery.autogrow(this,o);});};jQuery.autogrow=function(e,o)
{this.options=o||{};this.dummy=null;this.interval=null;this.line_height=this.options.lineHeight||parseInt(jQuery(e).css('line-height'));this.min_height=this.options.minHeight||parseInt(jQuery(e).css('min-height'));this.max_height=this.options.maxHeight||parseInt(jQuery(e).css('max-height'));;this.textarea=jQuery(e);if(this.line_height==NaN)
this.line_height=0;this.init();};jQuery.autogrow.fn=jQuery.autogrow.prototype={autogrow:'1.2.2'};jQuery.autogrow.fn.extend=jQuery.autogrow.extend=jQuery.extend;jQuery.autogrow.fn.extend({init:function(){var self=this;this.textarea.css({overflow:'hidden',display:'block'});this.textarea.bind('focus',function(){self.startExpand()}).bind('blur',function(){self.stopExpand()});this.checkExpand();},startExpand:function(){var self=this;this.interval=window.setInterval(function(){self.checkExpand()},400);},stopExpand:function(){clearInterval(this.interval);},checkExpand:function(){if(this.dummy==null)
{this.dummy=jQuery('<div></div>');this.dummy.css({'font-size':this.textarea.css('font-size'),'font-family':this.textarea.css('font-family'),'width':this.textarea.css('width'),'padding':this.textarea.css('padding'),'line-height':this.line_height+'px','overflow-x':'hidden','position':'absolute','top':0,'left':-9999}).appendTo('body');}
var html=this.textarea.val().replace(/(<|>)/g,'');if($.browser.msie)
{html=html.replace(/\n/g,'<BR>new');}
else
{html=html.replace(/\n/g,'<br>new');}
if(this.dummy.html()!=html)
{this.dummy.html(html);if(this.max_height>0&&(this.dummy.height()+this.line_height>this.max_height))
{this.textarea.css('overflow-y','auto');}
else
{this.textarea.css('overflow-y','hidden');if(this.textarea.height()<this.dummy.height()+this.line_height||(this.dummy.height()<this.textarea.height()))
{this.textarea.animate({height:(this.dummy.height()+this.line_height)+'px'},100);}}}}});})(jQuery);(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
if(typeof options=='function')
options={success:options};var url=$.trim(this.attr('action'));if(url){url=(url.match(/^([^#]+)/)||[])[1];}
url=url||window.location.href||'';options=$.extend({url:url,type:this.attr('method')||'GET'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n]instanceof Array){for(var k in options.data[n])
a.push({name:n,value:options.data[n][k]});}
else
a.push({name:n,value:options.data[n]});}}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else
options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm();});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments);});}
else if(options.success)
callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++)
callbacks[i].apply(options,[data,status,$form]);};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)
if(files[j])
found=true;var multipart=false;if(options.iframe||found||multipart){if(options.closeKeepAlive)
$.get(options.closeKeepAlive,fileUpload);else
fileUpload();}
else
$.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return;}
var opts=$.extend({},$.ajaxSettings,options);var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" src="about:blank" />');var io=$io[0];$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr('src','about:blank');}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&$.active--;return;}
if(xhr.aborted)
return;var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y;}}}
setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(form.getAttribute('method')!='POST')
form.setAttribute('method','POST');if(form.getAttribute('action')!=opts.url)
form.setAttribute('action',opts.url);if(!options.skipEncodingOverride){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(opts.timeout)
setTimeout(function(){timedOut=true;cb();},opts.timeout);var extraInputs=[];try{if(options.extraData)
for(var n in options.extraData)
extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit();}
finally{form.setAttribute('action',a);t?form.setAttribute('target',t):$form.removeAttr('target');$(extraInputs).remove();}},10);var domCheckCount=50;function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;var isXml=opts.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){cbInvoked=0;setTimeout(cb,100);return;}
log('Could not access iframe DOM after 50 tries.');return;}
xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header];};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];if(ta)
xhr.responseText=ta.value;else{var pre=doc.getElementsByTagName('pre')[0];if(pre)
xhr.responseText=pre.innerHTML;}}
else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
data=$.httpData(xhr,opts.dataType);}
catch(e){ok=false;$.handleError(opts,xhr,'error',e);}
if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts]);}
if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null;},100);};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else
doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null;};};};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false;}).bind('click.form-plugin',function(e){var $el=$(e.target);if(!($el.is(":submit,input:image"))){return;}
var form=this;form.clk=e.target;if(e.target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-e.target.offsetLeft;form.clk_y=e.pageY-e.target.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},10);});};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
continue;}
var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)
a.push({name:n,value:v[j]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:n,value:v});}
if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0],n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)
a.push({name:n,value:v[i]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:this.name,value:v});});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))
continue;v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))
return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)
v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;if(one)return v;a.push(v);}}
return a;}
return el.value;};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')
this.value='';else if(t=='checkbox'||t=='radio')
this.checked=false;else if(tag=='select')
this.selectedIndex=-1;});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))
this.reset();});};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')
this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)
window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''));};})(jQuery);(function(a){a.fn.example=function(e,c){var d=a.isFunction(e);var b=a.extend({},c,{example:e});return this.each(function(){var f=a(this);if(a.metadata){var g=a.extend({},a.fn.example.defaults,f.metadata(),b)}else{var g=a.extend({},a.fn.example.defaults,b)}if(!a.fn.example.boundClassNames[g.className]){a(window).unload(function(){a("."+g.className).val("")});a("form").submit(function(){a(this).find("."+g.className).val("")});a.fn.example.boundClassNames[g.className]=true}if(a.browser.msie&&!f.attr("defaultValue")&&(d||f.val()==g.example)){f.val("")}if(f.val()==""&&this!=document.activeElement){f.addClass(g.className);f.val(d?g.example.call(this):g.example)}f.focus(function(){if(a(this).is("."+g.className)){a(this).val("");a(this).removeClass(g.className)}});f.change(function(){if(a(this).is("."+g.className)){a(this).removeClass(g.className)}});f.blur(function(){if(a(this).val()==""){a(this).addClass(g.className);a(this).val(d?g.example.call(this):g.example)}})})};a.fn.example.defaults={className:"example"};a.fn.example.boundClassNames=[]})(jQuery);(function($){$.fn.maxlength=function(settings){if(typeof settings=='string'){settings={feedback:settings};}
settings=$.extend({},$.fn.maxlength.defaults,settings);function length(el){var parts=el.value;if(settings.words)
parts=el.value.length?parts.split(/\s+/):{length:0};return parts.length;}
return this.each(function(){var field=this,$field=$(field),$form=$(field.form),limit=settings.useInput?$form.find('input[name=maxlength]').val():$field.attr('maxlength'),$charsLeft=$form.find(settings.feedback);function limitCheck(event){var len=length(this),exceeded=len>=limit,code=event.keyCode;if(!exceeded)
return;switch(code){case 8:case 9:case 17:case 36:case 35:case 37:case 38:case 39:case 40:case 46:case 65:return;default:return settings.words&&code!=32&&code!=13&&len==limit;}}
var updateCount=function(){var len=length(field),diff=limit-len;$charsLeft.html(diff||"0");if(settings.hardLimit&&diff<0){field.value=settings.words?field.value.split(/(\s+)/,(limit*2)-1).join(''):field.value.substr(0,limit);updateCount();}};$field.keyup(updateCount).change(updateCount);if(settings.hardLimit){$field.keydown(limitCheck);}
updateCount();});};$.fn.maxlength.defaults={useInput:false,hardLimit:true,feedback:'.charsLeft',words:false};})(jQuery);(function($)
{$.fn.vid=function()
{var c={type:'youtube',videoId:'4wGR4-SeuJ0',autoPlay:false,loop:false,hq:true,chromeless:false};if(arguments[0])
{$.extend(c,arguments[0]);}
this.each(function()
{var h='';var v={};switch(c.type)
{case'youtube':h+='youtube.com/v/'+c.videoId+'?enablejsapi=1&autoplay='+(c.autoPlay?'1':'0')+'&loop='+(c.loop?'1':'0')+(c.hq?'&hd=1':'')+(c.chromless?'&version=3':'');break;case'vimeo':h+='vimeo.com/moogaloop.swf?clip_id='+c.videoId+'&js_api=1'+(c.hq?'':'&hd_off=1');break;case'dailymotion':h+='dailymotion.com/swf/'+c.videoId+'?enablejsapi=1&autoplay='+(c.autoPlay?'1':'0');break;case'1click2fame':h+='1click2fame.com/flash/Player.swf?videoID='+c.videoId+'&autoPlay='+c.autoPlay;break;}
$(this).flash({swf:'http://'+h,width:$(this).width(),height:$(this).height(),flashvars:v});});return this;};})(jQuery);(function($,flash){var createAttrs=function(obj){var aEach,aArray=[];for(aEach in obj){aArray.push(aEach+'="'+obj[aEach]+'"');}
return aArray.join('');},createParams=function(obj){var aEach,bEach,aArray=[],bArray;for(aEach in obj){if(typeof obj[aEach]=='object'){bArray=[];for(bEach in obj[aEach]){bArray.push([bEach,'=',encodeURIComponent(obj[aEach][bEach])].join(''));}
obj[aEach]=bArray.join('&');}
aArray.push(['<param name="',aEach,'" value="',obj[aEach],'" />'].join(''));}
return aArray.join('');},expressInstallIsActive=false;$[flash]=(function(){var flashVersion='0,0,0',Plugin=navigator.plugins['Shockwave Flash']||ActiveXObject;flashVersion=Plugin.description||(function(){try{return(new Plugin('ShockwaveFlash.ShockwaveFlash')).GetVariable('$version');}
catch(eIE){}}());flashVersion=flashVersion.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+r|,)(\d+)/);return{available:flashVersion[1]>0,activeX:!Plugin.name,version:{major:flashVersion[1]*1,minor:flashVersion[2]*1,release:flashVersion[3]*1},hasVersion:function(version){var versionCompare=this.version,major='major',minor='minor',release='release';version=(/string|number/.test(typeof version))?version.toString().split('.'):version||[0,0,0];version=[version[major]||version[0]||versionCompare[major],version[minor]||version[1]||versionCompare[minor],version[release]||version[2]||versionCompare[release]];return(version[0]<versionCompare[major])||(version[0]==versionCompare[major]&&version[1]<versionCompare[minor])||(version[0]==versionCompare[major]&&version[1]==versionCompare[minor]&&version[2]<=versionCompare[release]);},expressInstall:'expressInstall.swf',create:function(obj){if(!$[flash].available||expressInstallIsActive||!typeof obj=='object'||!obj.swf){return false;}
if(obj.hasVersion&&!$[flash].hasVersion(obj.hasVersion)){obj={swf:obj.expressInstall||$[flash].expressInstall,attrs:{id:'SWFObjectExprInst',height:Math.max(obj.height||137),width:Math.max(obj.width||214)},params:{flashvars:{MMredirectURL:location.href,MMplayerType:($[flash].activeX)?'ActiveX':'PlugIn',MMdoctitle:document.title.slice(0,47)+' - Flash Player Installation'}}};expressInstallIsActive=true;}
else{obj=$.extend(true,{attrs:{height:obj.height||180,width:obj.width||320},params:{wmode:obj.wmode||'opaque',flashvars:obj.flashvars}},obj);}
return'<object '+(createAttrs(obj.attrs))+($[flash].activeX?' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">'+'<param name="movie" value="'+obj.swf+'" />':' type="application/x-shockwave-flash" data="'+obj.swf+'">')+(createParams(obj.params))+'</object>';}};}());$.fn[flash]=function(args){if(typeof args=='object'){this.each(function(){var test=document.createElement(flash);test.innerHTML=$[flash].create(args);if(test.childNodes[0]){this.appendChild(test.childNodes[0]);}});}
else if(typeof args=='function'){this.find('object').andSelf().filter('object').each(function(){var elem=this,jsInteractionTimeoutMs='jsInteractionTimeoutMs';elem[jsInteractionTimeoutMs]=elem[jsInteractionTimeoutMs]||0;if(elem[jsInteractionTimeoutMs]<660){if(elem.clientWidth||elem.clientHeight){args.call(this);}
else{setTimeout(function(){$(elem)[flash](args);},elem[jsInteractionTimeoutMs]+66);}}});}
return this;};}(jQuery,'flash'));(function($){var NEG_INF=Number.NEGATIVE_INFINITY;var POS_INF=Number.POSITIVE_INFINITY;$.fn.cuteTime=function(options){var right_now=new Date().getTime();var other_time;var curr_this;if((typeof options=='object')||(options==undefined)){$.extend($.fn.cuteTime.settings,options);$.fn.cuteTime.the_selected=this;this.each(function(){curr_this=$(this);other_time=get_time_value(curr_this);curr_this.text(get_cuteness(right_now-other_time));});$.fn.cuteTime.start_cuteness();return this;}};$.cuteTime=function(options){var right_now=new Date().getTime();var other_time;var curr_this;if(typeof options=='string'){other_time=date_value(options);if(!isNaN(other_time)){return get_cuteness(right_now-other_time);}else{return'INVALID DATE/TIME FORMAT';}}
return this;};$.fn.cuteTime.settings={refresh:-1,time_ranges:[{bound:NEG_INF,cuteness:'moments ago',unit_size:0},{bound:0,cuteness:'a second ago',unit_size:0},{bound:2*1000,cuteness:' seconds ago',unit_size:1000},{bound:60*1000,cuteness:'a minute ago',unit_size:0},{bound:60*1000*2,cuteness:' minutes ago',unit_size:60*1000},{bound:60*1000*60,cuteness:'an hour ago',unit_size:0},{bound:60*1000*60*2,cuteness:' hours ago',unit_size:60*1000*60},{bound:60*1000*60*24,cuteness:'yesterday',unit_size:0},{bound:60*1000*60*24*2,cuteness:' days ago',unit_size:60*1000*60*24},{bound:60*1000*60*24*30,cuteness:'last month',unit_size:0},{bound:60*1000*60*24*30*2,cuteness:' months ago',unit_size:60*1000*60*24*30},{bound:60*1000*60*24*30*12,cuteness:'last year',unit_size:0},{bound:60*1000*60*24*30*12*2,cuteness:' years ago',unit_size:60*1000*60*24*30*12},{bound:POS_INF,cuteness:'a blinkle ago',unit_size:0}]};$.fn.cuteTime.start_cuteness=function(){var refresh_rate=$.fn.cuteTime.settings.refresh;if($.fn.cuteTime.process_tracker==null){if(refresh_rate>0){$.fn.cuteTime.process_tracker=setInterval("$.fn.cuteTime.update_cuteness()",refresh_rate);}}else{}
return this;};$.fn.cuteTime.update_cuteness=function(){var right_now=new Date().getTime();var curr_this;var other_time;$.fn.cuteTime.the_selected.each(function(){curr_this=$(this);other_time=get_time_value(curr_this);curr_this.text(get_cuteness(right_now-other_time));});}
$.fn.cuteTime.stop_cuteness=function(){if($.fn.cuteTime.process_tracker!=null){clearInterval($.fn.cuteTime.process_tracker);$.fn.cuteTime.process_tracker=null;}else{}
return this;};function get_cuteness(time_difference){var time_ranges=$.fn.cuteTime.settings.time_ranges;var calculated_time;var cute_time='';jQuery.each(time_ranges,function(i,timespan){if(i<time_ranges.length-1){if((time_difference>=timespan['bound'])&&(time_difference<time_ranges[i+1]['bound'])){if(timespan['unit_size']>0){calculated_time=Math.floor(time_difference/timespan['unit_size']);}else{calculated_time='';}
cute_time=calculated_time+timespan['cuteness'];return false;}}else{return false;}});if(cute_time==''){cute_time='2 pookies ago';}
return cute_time;}
function date_value(the_date){var the_value=(new Date(the_date)).valueOf();if(isNaN(the_value)){the_value=new Date(the_date.replace(/-/g," "));}
return the_value;}
function get_time_value(obj){var time_value=Number.NaN;time_string=get_cutetime_attr(obj);if(time_string!=null){time_value=date_value(time_string);}
if(isNaN(time_value)){time_string=get_object_text(obj);if(time_string!=null){time_value=date_value(time_string);}}
if(isNaN(time_value)){time_string=new Date().toString();time_value=date_value(time_string);}
set_cutetime_attr(time_string,obj);return time_value;}
function get_cutetime_attr(obj){var return_value=obj.attr('cutetime');if(return_value!=undefined){return return_value;}else{return null;}}
function set_cutetime_attr(attr,obj){obj.attr('cutetime',attr);}
function get_object_text(obj){return obj.text();}})(jQuery);jQuery(function($){$('.links').clickUrl();$('.strip').stripTags();$('.escape').escapeHtml();});(function($){$.fn.clickUrl=function(){var regexp=/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;this.each(function(){$(this).html($(this).html().replace(regexp,"<a href=\"$1\" target=\"_blank\">$1</a>"));});return $(this);}
$.fn.stripTags=function(){var regexp=/<("[^"]*"|'[^']*'|[^'">])*>/gi;this.each(function(){$(this).html($(this).html().replace(regexp,""));});return $(this);}
$.fn.escapeHtml=function(){this.each(function(){$(this).html($(this).html().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"'));});return $(this);}})(jQuery);
