(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}
if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])
selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])
return jQuery().find(selector);return jQuery(elem);}
selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))
return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)
if(value===undefined)
return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}
return this.each(function(i){for(name in options)
jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)
value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)
return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])
jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)
elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)
this[expando]=null;});if(events===true)
this.find("*").andSelf().each(function(i){if(this.nodeType==3)
return;var events=jQuery.data(this,"events");for(var type in events)
for(var handler in events[type])
jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)
if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)
return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)
return value;values.push(value);}}
return values;}else
return(this[0].value||"").replace(/\r/g,"");}
return undefined;}
if(value.constructor==Number)
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)
this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)
data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)
elems.reverse();}
var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))
obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))
scripts=scripts.add(elem);else{if(elem.nodeType==1)
scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)
jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)
elem.parentNode.removeChild(elem);}
function now(){return+new Date;}
jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!="object"&&typeof target!="function")
target={};if(length==i){target=this;--i;}
for(;i<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)
script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)
id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])
jQuery.cache[id]={};if(data!==undefined)
jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])
break;if(!name)
jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)
elem.removeAttribute(expando);}
delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length==undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options)
elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}
if(jQuery(elem).is(":visible"))
getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)
return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}
if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}
if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}
if(name.match(/float/i))
name=styleFloat;if(!force&&style&&style[name])
ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))
name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))
ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)
stack.unshift(a);for(;i<stack.length;i++)
if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}
ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)
if(swap[i]!=null)
stack[i].style.display=swap[i];}
if(name=="opacity"&&ret=="")
ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')
context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)
return;if(elem.constructor==Number)
elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)
if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)
tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))
div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}
elem=jQuery.makeArray(div.childNodes);}
if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))
return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)
ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)
return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)
elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)
throw"type property can't be changed";elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))
return elem.getAttributeNode(name).nodeValue;return elem[name];}
if(msie&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}
name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)
elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)
ret[0]=array;else
while(i)
ret[--i]=array[i];}
return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])
if(elem.nodeType!=8)
first[pos++]=elem;}else
while(elem=second[i++])
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)
jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)
this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)
this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)
this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}
return cur;},find:function(t,context){if(typeof t!="string")
return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)
return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)
for(var c=ret[i].firstChild;c;c=c.nextSibling)
if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))
r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)
if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}
if(m=="+")break;}}
ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}
if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}
m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])
oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")
tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}
if(m[1]==".")
r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)
if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}
r=tmp;}
ret=r;}
t=t.replace(re2,"");}}
if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}
if(t)
ret=[];if(ret&&context==ret[0])
ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)
tmp.push(r[i]);}
return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}
if(!m)
break;if(m[1]==":"&&m[2]=="not")
r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")
r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))
z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)
tmp.push(a);}
r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)
if(n.nodeType==1)
n.nodeIndex=c++;merge[id]=true;}
var add=false;if(first==0){if(node.nodeIndex==last)
add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)
add=true;if(add^not)
tmp.push(node);}
r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")
fn=fn[m[2]];if(typeof fn=="string")
fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}
return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)
matched.push(cur);cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)
r.push(n);}
return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)
return;if(jQuery.browser.msie&&elem.setInterval)
elem=window;if(!handler.guid)
handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}
var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)
return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)
elem.addEventListener(type,handle,false);else if(elem.attachEvent)
elem.attachEvent("on"+type,handle);}}
handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)
return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))
for(var type in events)
this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}
jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)
delete events[type][handler.guid];else
for(handler in events[type])
if(!parts[1]||events[type][handler].type==parts[1])
delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)
elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)
elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}
ret=null;delete events[type];}}});}
for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}
if(!elem){if(this.global[type])
jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)
return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}
data[0].type=type;if(exclusive)
data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)
val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)
val=false;if(event)
data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)
val=ret;}
if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}
this.triggered=false;}
return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)
val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}
return val;},fix:function(event){if(event[expando]==true)
return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)
event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)
originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)
originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)
event.target=event.srcElement||document;if(event.target.nodeType==3)
event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();if(jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)
if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}
jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}
if(numStyles===undefined)
numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}
return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')
return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
callback=callback||function(){};var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")
self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")
s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))
s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))
s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}
if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)
s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head)
head.removeChild(script);};}
if(s.dataType=="script"&&s.cache==null)
s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}
if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)
script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}
head.appendChild(script);return undefined;}
var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)
xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)
xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}
if(s.global)
jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}
if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;if(!jsonp)
success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)
xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}
if(!s.async)
onreadystatechange();function success(){if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xhr,s]);}
function complete(){if(s.complete)
s.complete(xhr,status);if(s.global)
jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");}
return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}
return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")
throw"parsererror";if(filter)
data=filter(data,type);if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)
jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")
this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)
return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}
if(!type||(typeof type=="string"&&!fn))
return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)
queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)
fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)
if(timers[i].elem==this){if(gotoEnd)
timers[i](true);timers.splice(i,1);}});if(!gotoEnd)
this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)
q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}
return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)
q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)
jQuery(this).dequeue();if(jQuery.isFunction(opt.old))
opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)
options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)
this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")
this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)
return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")
this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)
if(this.options.curAnim[i]!==true)
done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")
this.elem.style.display="block";}
if(this.options.hide)
this.elem.style.display="none";if(this.options.hide||this.options.show)
for(var p in this.options.curAnim)
jQuery.attr(this.elem.style,p,this.options.orig[p]);}
if(done)
this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)
border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")
fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}
while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))
add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")
border(parent);parent=parent.parentNode;}
if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))
add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)
add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}
results={top:top,left:left};}
function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}
function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}
return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+
num(this,"padding"+tl)+
num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+
num(this,"border"+tl+"Width")+
num(this,"border"+br+"Width")+
(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();;


(function($){$.extend({manageAjax:function(o){o=$.extend({manageType:'normal',maxReq:0,blockSameRequest:false,global:true},o);return new $.ajaxManager(o);},ajaxManager:function(o){this.opt=o;this.queue=[];}});$.extend($.ajaxManager.prototype,{add:function(o){var quLen=this.queue.length,s=this.opt,q=this.queue,self=this,i,j;o=$.extend({},s,o);var cD=(o.data&&typeof o.data!="string")?$.param(o.data):o.data;if(s.blockSameRequest){var toPrevent=false;for(i=0;i<quLen;i++){if(q[i]&&q[i].data===cD&&q[i].url===o.url&&q[i].type===o.type){toPrevent=true;break;}}
if(toPrevent){return false;}}
q[quLen]={fnError:o.error,fnSuccess:o.success,fnComplete:o.complete,fnAbort:o.abort,error:[],success:[],complete:[],done:false,queued:false,data:cD,url:o.url,type:o.type,xhr:null};o.error=function(){if(q[quLen]){q[quLen].error=arguments;}};o.success=function(){if(q[quLen]){q[quLen].success=arguments;}};o.abort=function(){if(q[quLen]){q[quLen].abort=arguments;}};function startCallbacks(num,opts){if(q[num].fnError&&q[num].error.length){q[num].fnError.apply(opts||$,q[num].error);}
if(q[num].fnSuccess){q[num].fnSuccess.apply(opts||$,q[num].success);}
if(q[num].fnComplete){q[num].fnComplete.apply(opts||$,q[num].complete);}
self.abort(num,true);}
o.complete=function(){if(!q[quLen]){return;}
q[quLen].complete=arguments;q[quLen].done=true;switch(s.manageType){case'sync':if(quLen===0||!q[quLen-1]){var curQLen=q.length;for(i=quLen;i<curQLen;i++){if(q[i]){if(q[i].done){startCallbacks(i,this);}
else{break;}}}}
break;case'queue':if(quLen===0||!q[quLen-1]){var curQLen=q.length;for(i=0,j=0;i<curQLen;i++){if(q[i]&&q[i].queued){q[i].xhr=jQuery.ajax(q[i].xhr);q[i].queued=false;break;}}}
startCallbacks(quLen,this);break;case'abortOld':startCallbacks(quLen,this);for(i=quLen;i>=0;i--){if(q[i]){self.abort(i);}}
break;default:startCallbacks(quLen,this);break;}};if(s.maxReq){if(s.manageType!='queue'){for(i=quLen,j=0;i>=0;i--){if(j>=s.maxReq){this.abort(i);}
if(q[i]){j++;}}}
else{for(i=0,j=0;i<=quLen&&!q[quLen].queued;i++){if(q[i]&&!q[i].queued)
j++;if(j>s.maxReq)
q[quLen].queued=true;}}}
q[quLen].xhr=(q[quLen].queued)?o:jQuery.ajax(o);return quLen;},cleanUp:function(){this.queue=[];},abort:function(num,completed){var qLen=this.queue.length,s=this.opt,q=this.queue,self=this,i;function del(num){if(!q[num]){return;}
((!completed&&q[num].fnAbort)&&q[num].fnAbort.apply($,[num]));if(!q[num]){return;}
if(q[num].xhr){if(typeof q[num].xhr.abort!='undefined'){q[num].xhr.abort();}
if(typeof q[num].xhr.close!='undefined'){q[num].xhr.close();}
q[num].xhr=null;}
if(s.global&&$.active&&!--$.active){$.event.trigger("ajaxStop");}
q[num]=null;}
if(!num&&num!==0){for(i=0;i<qLen;i++){del(i);}
this.cleanUp();}
else{del(num);var allowCleaning=true;for(i=qLen;i>=0;i--){if(q[i]){allowCleaning=false;break;}}
if(allowCleaning){this.cleanUp();}}}});})(jQuery);;

;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(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};options=$.extend({url:this.attr('action')||window.location.toString(),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;if(options.iframe||found){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=jQuery.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&&jQuery.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 nullCheckFlag=0;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;if((doc.body==null||doc.body.innerHTML=='')&&!nullCheckFlag){nullCheckFlag=1;cbInvoked--;setTimeout(cb,100);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];xhr.responseText=ta?ta.value:xhr.responseText;}
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;}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var form=this.form;form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-this.offsetLeft;form.clk_y=e.pageY-this.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},10);});});};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('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+'.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 inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input)
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);;


$.fn.prevalue=function(options){options=$.extend({allowEmpty:false},options);return this.each(function(){$(this).unbind("focus");$(this).unbind("blur");var default_value=$(this).val();$(this).focus(function(){if($(this).val()==default_value){$(this).val("");}});$(this).blur(function(){if(!options.allowEmpty&&$(this).val()==""){$(this).val(default_value);}});});};


(function($){function History()
{this._curHash='';this._callback=function(hash){};};$.extend(History.prototype,{init:function(callback){this._callback=callback;this._curHash=location.hash;if($.browser.msie){if(this._curHash==''){this._curHash='#';}
$("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');var iframe=$("#jQuery_history")[0].contentWindow.document;iframe.open();iframe.close();iframe.location.hash=this._curHash;}
else if($.browser.safari){this._historyBackStack=[];this._historyBackStack.length=history.length;this._historyForwardStack=[];this._isFirst=true;this._dontCheck=false;}
this._callback(this._curHash.replace(/^#/,''));setInterval(this._check,100);},add:function(hash){this._historyBackStack.push(hash);this._historyForwardStack.length=0;this._isFirst=true;},_check:function(){if($.browser.msie){var ihistory=$("#jQuery_history")[0];var iframe=ihistory.contentDocument||ihistory.contentWindow.document;var current_hash=iframe.location.hash;if(current_hash!=$.history._curHash){location.hash=current_hash;$.history._curHash=current_hash;$.history._callback(current_hash.replace(/^#/,''));}}else if($.browser.safari){if(!$.history._dontCheck){var historyDelta=history.length-$.history._historyBackStack.length;if(historyDelta){$.history._isFirst=false;if(historyDelta<0){for(var i=0;i<Math.abs(historyDelta);i++)$.history._historyForwardStack.unshift($.history._historyBackStack.pop());}else{for(var i=0;i<historyDelta;i++)$.history._historyBackStack.push($.history._historyForwardStack.shift());}
var cachedHash=$.history._historyBackStack[$.history._historyBackStack.length-1];if(cachedHash!=undefined){$.history._curHash=location.hash;$.history._callback(cachedHash);}}else if($.history._historyBackStack[$.history._historyBackStack.length-1]==undefined&&!$.history._isFirst){if(document.URL.indexOf('#')>=0){$.history._callback(document.URL.split('#')[1]);}else{$.history._callback('');}
$.history._isFirst=true;}}}else{var current_hash=location.hash;if(current_hash!=$.history._curHash){$.history._curHash=current_hash;$.history._callback(current_hash.replace(/^#/,''));}}},load:function(hash){var newhash;if($.browser.safari){newhash=hash;}else{newhash='#'+hash;location.hash=newhash;}
this._curHash=newhash;if($.browser.msie){var ihistory=$("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=newhash;this._callback(hash);}
else if($.browser.safari){this._dontCheck=true;this.add(hash);var fn=function(){$.history._dontCheck=false;};window.setTimeout(fn,200);this._callback(hash);location.hash=newhash;}
else{this._callback(hash);}}});$(document).ready(function(){$.history=new History();});})(jQuery);;


jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});;


(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);;


$.fn.horizontalScroller=function(options){options=$.extend({width:"850px",height:"100px",buttonWidth:"21px",itemWidth:"100px",itemSpacing:"10px",animate:true,event:"mousedown",startPosition:"0px",wrap:true,scrollSize:20},options);var self=$(this);var remainder=parseInt(options.width)%(parseInt(options.itemWidth)+parseInt(options.itemSpacing));var width_children=0;self.children().each(function(){width_children+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+parseInt($(this).css("margin-right"));});self.css({position:"relative",position:"absolute",left:options.startPosition,top:"1px",paddingLeft:"1px",width:width_children+"px"});var wrapper=$("<div class='horizontalScrollerWrapper'></div>");var left_button=$("<div class='gradient_vertical'>"+"<div class='shadow_small_corner_tl'/>"+"<div class='shadow_small_corner_tr'/>"+"<div class='shadow_small_corner_bl'/>"+"<div class='shadow_small_corner_br'/>"+"<div class='shadow_small_edge_top'/>"+"<div class='shadow_small_edge_bottom'/>"+"<div class='shadow_small_edge_left'/>"+"<div class='shadow_small_edge_right'/>"+"<img src='images/icons/12_func_arrow_left.png' alt='&lt;' />&nbsp;"+"</div>");var right_button=$("<div class='gradient_vertical'>"+"<div class='shadow_small_corner_tl'/>"+"<div class='shadow_small_corner_tr'/>"+"<div class='shadow_small_corner_bl'/>"+"<div class='shadow_small_corner_br'/>"+"<div class='shadow_small_edge_top'/>"+"<div class='shadow_small_edge_bottom'/>"+"<div class='shadow_small_edge_left'/>"+"<div class='shadow_small_edge_right'/>"+"<img src='images/icons/12_func_arrow_right.png' alt='&gt;' />&nbsp;"+"</div>");left_button.css({cursor:"pointer",textAlign:"center",float:"left",padding:"0px",paddingLeft:"1px",paddingRight:"1px",marginTop:"1px",marginRight:"10px",width:options.buttonWidth,height:options.height,fontSize:"1px",lineHeight:options.height});right_button.css({cursor:"pointer",textAlign:"center",float:"right",padding:"0px",paddingLeft:"1px",paddingRight:"1px",marginTop:"1px",marginLeft:"0px",width:options.buttonWidth,height:options.height,fontSize:"1px",lineHeight:options.height});var loadItems=function(){var n=0;$(self).children().each(function(){if(n*parseInt(options.itemWidth)<((-1*parseInt(self.css("left")))+2*parseInt(options.width))){$(this).children().trigger("loadContent").unbind("loadContent");}
n++;});}
var onLeft=function(){var scrollSize=options.scrollSize;if(parseInt(self.css("left"))+parseInt(options.scrollSize)<=parseInt(options.scrollSize)){if(options.animate)
self.stop(true).animate({left:Math.min(parseInt(options.startPosition),parseInt(self.css("left"))+parseInt(scrollSize))},"slow","easeInOutCubic");else
self.css({left:Math.min(0,parseInt(self.css("left"))+parseInt(scrollSize))});}};var onRight=function(){var scrollSize=options.scrollSize;if(parseInt(self.css("left"))+parseInt(self.width())<parseInt(options.width))
return;if(options.animate)
self.stop(true).animate({left:parseInt(self.css("left"))-scrollSize},"slow","easeInOutCubic",loadItems);else
self.css({left:parseInt(self.css("left"))-parseInt(scrollSize)});};if(options.event=="mousedown"){var left_down;var right_down;left_button.mousedown(function(){onLeft();left_down=setInterval(onLeft,10);});left_button.mouseup(function(){clearInterval(left_down);});right_button.mousedown(function(){onRight();right_down=setInterval(onRight,10);});right_button.mouseup(function(){clearInterval(right_down);});}else if(options.event=="mouseclick"){left_button.click(function(){onLeft(true);});right_button.click(function(){onRight(true);});}
wrapper.css({float:"left",padding:"1px",overflow:"hidden",width:options.width,height:options.height});left_button.insertBefore($(this));right_button.insertAfter($(this));if(options.wrap){wrapper.css("height",parseInt(wrapper.css("height"))-20);self.wrap(wrapper).parent().wrap($("<div class='inner_content_block' style='float: left; padding-left: 0; padding-right: 0; height: "+(parseInt(options.height)-20)+"px;'>"+"</div>"));}else{self.wrap(wrapper);}
loadItems();return this;};;


$.fn.customSelect=function(options){options=$.extend({width:"145px",height:"150px",macStyle:false,scroll:true,baseClass:"button button_white",className:"border_small",onShowList:undefined,onSelectItem:undefined,border:true,zIndex:"21",arrowUrl:"images/icons/12_func_arrow_down.png",background:"white",selectedBackground:"white"},options);return this.each(function(){var self=$(this);if(self.hasClass("customSelect"))
return;if(self.css("z-index"))
options=$.extend(options,{zIndex:self.css("z-index")});var wrapper=$("<div class='"+options.baseClass+" "+options.className+"'></div>");wrapper.css({width:options.width,zIndex:options.zIndex});if(options.border){wrapper.append($("<div class='border_corner_small_tr'/>"+"<div class='border_corner_small_br'/>"+"<div class='border_corner_small_tl'/>"+"<div class='border_corner_small_bl'/>"));}else{wrapper.append($("<div class='shadow_small_corner_tl'></div>"+"<div class='shadow_small_corner_tr'></div>"+"<div class='shadow_small_corner_bl'></div>"+"<div class='shadow_small_corner_br'></div>"+"<div class='shadow_small_edge_top'></div>"+"<div class='shadow_small_edge_bottom'></div>"+"<div class='shadow_small_edge_left'></div>"+"<div class='shadow_small_edge_right'></div>"));}
var selectedItem=$("<div><span>Selected item</span></div>");var arrow=$("<div><img src='"+options.arrowUrl+"' /></div>");arrow.css({position:"relative",position:"absolute",top:"1px",right:"-3px",width:"15px",height:"15px",zIndex:parseInt(options.zIndex)-1});selectedItem.append(arrow);var input=$("<input type='hidden' name='"+$(this).attr("name")+"' value='' />");wrapper.append(selectedItem);wrapper.append(input);var optionList=$("<div class='optionList border_small'></div>");optionList.css({visibility:"hidden",position:"relative",position:"absolute",left:"-1px",right:"-1px",top:"-1px",zIndex:options.zIndex,border:"1px solid #DEDEDE",cursor:"pointer",background:"white"});if($("option",self).length<5){options.scroll=false;}else{options.scroll=true;}
if(!options.macStyle){if(options.scroll){optionList.css({overflowY:"scroll",overflowX:"hidden",height:options.height});}else{optionList.css({height:"auto",overflow:"hidden"});}}
var hideTimer;optionList.mouseout(function(){hideTimer=setTimeout(function(){optionList.css("visibility","hidden");},1000);});optionList.mouseover(function(){clearTimeout(hideTimer);});wrapper.append(optionList);var setItem=function(value,display,height){$("span",selectedItem).html(display);input.val(value);if(options.macStyle)
optionList.css("top",height+"px");optionList.scrollTop((height)+optionList.scrollTop());optionList.css("visibility","hidden");};var selectedOption=undefined;var n=0;$("option",self).each(function(){var cur_option=$(this);var option=$("<div class='"+options.baseClass+" option'>"+$(this).html()+"<span class='value' style='display: none;'>"+$(this).val()+"</span></div>");option.css({border:"none",borderBottom:"1px solid #DEDEDE",background:options.background});if(!selectedOption)
option;if($(this).attr('selected')){selectedOption=option;option.css({background:options.selectedBackground});}
optionList.append(option);option.click(function(){var pos=0;if($(this).is(":visible")){pos=$(this).position().top;}else{optionList.css("visibility","visible");try{pos=$(this).position().top;}catch(err){}
optionList.css("visibility","hidden");}
setItem($("span.value",option).html(),$(this).html(),pos);if(options.onSelectItem!=undefined){options.onSelectItem();}
cur_option.click();return false;});n++;});optionList.find("div.option:last").css({borderBottom:"none"});wrapper.click(function(){$(".optionList").css("visibility","hidden");optionList.css("visibility","visible");if(options.onShowList!=undefined){options.onShowList();}});wrapper.insertAfter(self);wrapper.parent().addShadow();self.addClass("customSelect").removeAttr("name").hide();if(selectedOption!=undefined){selectedOption.click();}});};


$.fn.customCheckbox=function(options){options=$.extend({uncheckedImage:"url('images/checkbox.png')",checkedImage:"url('images/checkbox_checked.png')",checkedForcedImage:"url('images/radio_selected.png')",onClick:undefined,onChange:undefined,forceOne:false},options);return this.each(function(){var self=$(this);var checked=self.attr("checked");var replacement=$("<div/>");replacement.css({position:"relative",width:"16px",height:"16px",cursor:"pointer",backgroundImage:options.uncheckedImage});replacement.click(function(){self.click().change();if(options.onClick!=undefined)
options.onClick();});var changeImages=function(){if(checked){if(options.forceOne)
$(replacement).css("background-image",options.checkedForcedImage);else
$(replacement).css("background-image",options.checkedImage);}else{$(replacement).css("background-image",options.uncheckedImage);}};var changeOthers=function(){$("input[@name='"+self.attr("name")+"']").not(self).trigger("change");};self.bind("change",function(){if($(this).attr("checked")){if(options.forceOne)
changeOthers();checked=true;}else{checked=false;}
changeImages();if(options.onChange!=undefined)
options.onChange();});changeImages();replacement.insertAfter(self);self.hide();});};


$.fn.photoSlider=function(options){options=$.extend({width:"460px",height:"345px",backgroundColor:"white"},options);return this.each(function(){var self=$(this);var images=Array();var current_index=0;$("a",self).each(function(){images[images.length]={anchor:$(this),img:$("img",this).attr("src")};});if(images.length<2)
return this;$("a",self).hide();var first_image=$("<div/>");first_image.css({position:"relative",position:"absolute",left:0,top:0,width:options.width,height:options.height,backgroundPosition:"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:"url('"+images[current_index].img+"')",zIndex:1});first_image.click(function(){images[current_index].anchor.click();});self.css({position:"relative",width:options.width,height:options.height,marginBottom:"10px",overflow:"hidden"});var left_button=$("<div></div>");var right_button=$("<div></div>");left_button.css({position:"relative",position:"absolute",left:"10px",top:((parseInt(options.height)/2)-5)+"px",width:"21px",height:"21px",cursor:"pointer",backgroundColor:"transparent",backgroundImage:"url('images/arrow_left_glow.png')",backgroundRepeat:"no-repeat",zIndex:10});right_button.css({position:"relative",position:"absolute",right:"10px",top:((parseInt(options.height)/2)-5)+"px",width:"21px",height:"21px",cursor:"pointer",backgroundColor:"transparent",backgroundImage:"url('images/arrow_right_glow.png')",backgroundRepeat:"no-repeat",zIndex:10});left_button.css("opacity",0);right_button.css("opacity",0);var onLeft=function(){current_index=current_index-1;if(current_index<0)
current_index=images.length-1;var overlay=$("<div/>");overlay.css({position:"relative",position:"absolute",left:options.width,top:0,width:options.width,height:options.height,backgroundColor:options.backgroundColor,backgroundPosition:"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:"url('"+images[current_index].img+"')",zIndex:1});self.append(overlay);overlay.click(function(){images[current_index].anchor.click();});overlay.animate({left:0},"fast","easeOutCubic",function(){first_image.remove();first_image=overlay;});};left_button.click(onLeft);var onRight=function(){current_index=(current_index+1)%images.length;var overlay=$("<div/>");overlay.css({position:"relative",position:"absolute",right:options.width,top:0,width:options.width,height:options.height,backgroundColor:options.backgroundColor,backgroundPosition:"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:"url('"+images[current_index].img+"')",zIndex:1});self.append(overlay);overlay.click(function(){images[current_index].anchor.click();});overlay.animate({right:0},"fast","easeOutCubic",function(){first_image.remove();first_image=overlay;});};right_button.click(onRight);self.append(first_image);self.append(left_button);self.append(right_button);self.append("<div class='corner_small_tl' style='z-index: 20;'/>");self.append("<div class='corner_small_tr' style='z-index: 20;'/>");self.append("<div class='corner_small_bl' style='z-index: 20;'/>");self.append("<div class='corner_small_br' style='z-index: 20;'/>");self.hover(function(){$(left_button).add(right_button).stop(true).fadeTo("fast",1);},function(){$(left_button).add(right_button).stop(true).fadeTo("fast",0);});});};

;(function($){$.ifixpng=function(customPixel){$.ifixpng.pixel=customPixel;};$.ifixpng.regexp={bg:/^url\(["']?(.*\.png([?].*)?)["']?\)$/i,img:/.*\.png([?].*)?$/i},$.ifixpng.getPixel=function(){return $.ifixpng.pixel||'images/pixel.gif';};var hack={base:$('base').attr('href'),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(){function fixImage(image,source,width,height,hidden){image.css({filter:hack.filter(source),width:width,height:height}).attr({src:$.ifixpng.getPixel()}).positionFix();}
return this.each(function(){var $$=$(this);if($$.is('img')||$$.is('input')){var source,img;if(this.src&&this.src.match($.ifixpng.regexp.img)){source=(hack.base&&this.src.substring(0,1)!='/'&&this.src.indexOf(hack.base)===-1)?hack.base+this.src:this.src;if(!this.width||!this.height){$(new Image()).one('load',function(){fixImage($$,source,this.width,this.height);$(this).remove();}).attr('src',source);}else fixImage($$,source,this.width,this.height);}}else if(this.style){var imageSrc=$$.css('backgroundImage');if(imageSrc&&imageSrc.match($.ifixpng.regexp.bg)&&this.currentStyle.backgroundRepeat=='no-repeat'){imageSrc=RegExp.$1;var x=this.currentStyle.backgroundPositionX||0,y=this.currentStyle.backgroundPositionY||0;if(x||y){var css={},img;if(typeof x!='undefined'){if(x=='left')css.left=0;else if(x=='right')css.right=$$.width()%2===1?-1:0;else css.left=x;}
if(typeof y!='undefined'){if(y=='bottom')css.bottom=$$.height()%2===1?-1:0;else if(y=='top')css.top=0;else css.top=y;}
img=new Image();$(img).one('load',function(){var x,y,expr={},prop;if(/center|%/.test(css.top)){expr.top="(this.parentNode.offsetHeight - this.offsetHeight) * "+(css.top=='center'?0.5:(parseInt(css.top)/100));delete css.top;}
if(/center|%/.test(css.left)){expr.left="(this.parentNode.offsetWidth - this.offsetWidth) * "+(css.left=='center'?0.5:(parseInt(css.left)/100));delete css.left;}
$$.positionFix().css({backgroundImage:'none'}).prepend($('<div></div>').css(css).css({width:this.width,height:this.height,position:'absolute',filter:hack.filter(imageSrc)}));if(expr.top||expr.left){var elem=$$.children(':first')[0];for(prop in expr)elem.style.setExpression(prop,expr[prop],'JavaScript');}
$(this).remove();});img.src=imageSrc;}else{$$.css({backgroundImage:'none',filter:hack.filter(imageSrc)});}}}});}:function(){return this;};$.fn.positionFix=function(){return this.each(function(){var $$=$(this);if($$.css('position')!='absolute')$$.css({position:'relative'});});};})(jQuery);;


jQuery.jScrollPane={active:[]};jQuery.fn.jScrollPane=function(settings)
{settings=jQuery.extend({scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false},settings);return this.each(function()
{var $this=jQuery(this);if(jQuery(this).parent().is('.jScrollPaneContainer')){var currentScrollPosition=settings.maintainPosition?$this.offset({relativeTo:jQuery(this).parent()[0]}).top:0;var $c=jQuery(this).parent();var paneWidth=$c.innerWidth();var paneHeight=$c.outerHeight();var trackHeight=paneHeight;if($c.unmousewheel){$c.unmousewheel();}
jQuery('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown',$c).remove();$this.css({'top':0});}else{var currentScrollPosition=0;this.originalPadding=$this.css('paddingTop')+' '+$this.css('paddingRight')+' '+$this.css('paddingBottom')+' '+$this.css('paddingLeft');this.originalSidePaddingTotal=(parseInt($this.css('paddingLeft'))||0)+(parseInt($this.css('paddingRight'))||0);var paneWidth=$this.innerWidth();var paneHeight=$this.innerHeight();var trackHeight=paneHeight;$this.wrap(jQuery('<div></div>').attr({'className':'jScrollPaneContainer'}).css({'height':paneHeight+'px','width':paneWidth+'px'}));jQuery(document).bind('emchange',function(e,cur,prev)
{$this.jScrollPane(settings);});}
var p=this.originalSidePaddingTotal;var cssToApply={'height':'auto','width':paneWidth-settings.scrollbarWidth-settings.scrollbarMargin-4-p+'px'}
if(settings.scrollbarOnLeft){cssToApply.paddingLeft=settings.scrollbarMargin+settings.scrollbarWidth+'px';}else{cssToApply.paddingRight=settings.scrollbarMargin+'px';}
$this.css(cssToApply);var contentHeight=$this.outerHeight();var percentInView=paneHeight/contentHeight;if(true||percentInView<.99){var $container=$this.parent();$container.append(jQuery('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(jQuery('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(jQuery('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),jQuery('<div></div>').attr({'className':'jScrollPaneDragCenter'}).css({'width':settings.scrollbarWidth+'px'}),jQuery('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'}))));var $track=jQuery('>.jScrollPaneTrack',$container);var $drag=jQuery('>.jScrollPaneTrack .jScrollPaneDrag',$container);if(settings.showArrows){var currentArrowButton;var currentArrowDirection;var currentArrowInterval;var currentArrowInc;var whileArrowButtonDown=function()
{if(currentArrowInc>4||currentArrowInc%4==0){positionDrag(dragPosition+currentArrowDirection*mouseWheelMultiplier);}
currentArrowInc++;};var onArrowMouseUp=function(event)
{jQuery('html').unbind('mouseup',onArrowMouseUp);currentArrowButton.removeClass('jScrollActiveArrowButton');clearInterval(currentArrowInterval);};var onArrowMouseDown=function(){jQuery('html').bind('mouseup',onArrowMouseUp);currentArrowButton.addClass('jScrollActiveArrowButton');currentArrowInc=0;whileArrowButtonDown();currentArrowInterval=setInterval(whileArrowButtonDown,100);};$container.append(jQuery('<a></a>').attr({'href':'javascript:;','className':'jScrollArrowUp'}).css({'width':settings.scrollbarWidth+'px'}).html('Scroll up').bind('mousedown',function()
{currentArrowButton=jQuery(this);currentArrowDirection=-1;onArrowMouseDown();this.blur();return false;}),jQuery('<a></a>').attr({'href':'javascript:;','className':'jScrollArrowDown'}).css({'width':settings.scrollbarWidth+'px'}).html('Scroll down').bind('mousedown',function()
{currentArrowButton=jQuery(this);currentArrowDirection=1;onArrowMouseDown();this.blur();return false;}));var $upArrow=jQuery('>.jScrollArrowUp',$container);var $downArrow=jQuery('>.jScrollArrowDown',$container);if(settings.arrowSize){trackHeight=paneHeight-settings.arrowSize-settings.arrowSize;$track.css({'height':trackHeight+'px',top:settings.arrowSize+'px'})}else{var topArrowHeight=$upArrow.height();settings.arrowSize=topArrowHeight;trackHeight=paneHeight-topArrowHeight-$downArrow.height();$track.css({'height':trackHeight+'px',top:topArrowHeight+'px'})}}
var $pane=jQuery(this).css({'position':'absolute','overflow':'visible'});var currentOffset;var maxY;var mouseWheelMultiplier;var dragPosition=0;var dragMiddle=percentInView*paneHeight/2;var getPos=function(event,c){var p=c=='X'?'Left':'Top';return event['page'+c]||(event['client'+c]+(document.documentElement['scroll'+p]||document.body['scroll'+p]))||0;};var ignoreNativeDrag=function(){return false;};var initDrag=function()
{ceaseAnimation();currentOffset=$drag.offset(false);currentOffset.top-=dragPosition;maxY=trackHeight-$drag[0].offsetHeight;mouseWheelMultiplier=2*settings.wheelSpeed*maxY/contentHeight;};var onStartDrag=function(event)
{initDrag();dragMiddle=getPos(event,'Y')-dragPosition-currentOffset.top;jQuery('html').bind('mouseup',onStopDrag).bind('mousemove',updateScroll);if(jQuery.browser.msie){jQuery('html').bind('dragstart',ignoreNativeDrag).bind('selectstart',ignoreNativeDrag);}
return false;};var onStopDrag=function()
{jQuery('html').unbind('mouseup',onStopDrag).unbind('mousemove',updateScroll);dragMiddle=percentInView*paneHeight/2;if(jQuery.browser.msie){jQuery('html').unbind('dragstart',ignoreNativeDrag).unbind('selectstart',ignoreNativeDrag);}};var positionDrag=function(destY)
{destY=destY<0?0:(destY>maxY?maxY:destY);dragPosition=destY;$drag.css({'top':destY+'px'});var p=destY/maxY;$pane.css({'top':((paneHeight-contentHeight)*p)+'px'});$this.trigger('scroll');if(settings.showArrows){$upArrow[destY==0?'addClass':'removeClass']('disabled');$downArrow[destY==maxY?'addClass':'removeClass']('disabled');}};var updateScroll=function(e)
{positionDrag(getPos(e,'Y')-currentOffset.top-dragMiddle);};var dragH=Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2),settings.dragMaxHeight),settings.dragMinHeight);$drag.css({'height':dragH+'px'}).bind('mousedown',onStartDrag);var trackScrollInterval;var trackScrollInc;var trackScrollMousePos;var doTrackScroll=function()
{if(trackScrollInc>8||trackScrollInc%4==0){positionDrag((dragPosition-((dragPosition-trackScrollMousePos)/2)));}
trackScrollInc++;};var onStopTrackClick=function()
{clearInterval(trackScrollInterval);jQuery('html').unbind('mouseup',onStopTrackClick).unbind('mousemove',onTrackMouseMove);};var onTrackMouseMove=function(event)
{trackScrollMousePos=getPos(event,'Y')-currentOffset.top-dragMiddle;};var onTrackClick=function(event)
{initDrag();onTrackMouseMove(event);trackScrollInc=0;jQuery('html').bind('mouseup',onStopTrackClick).bind('mousemove',onTrackMouseMove);trackScrollInterval=setInterval(doTrackScroll,100);doTrackScroll();};$track.bind('mousedown',onTrackClick);if($container.mousewheel){$container.mousewheel(function(event,delta){initDrag();ceaseAnimation();var d=dragPosition;positionDrag(dragPosition-delta*mouseWheelMultiplier);var dragOccured=d!=dragPosition;return!dragOccured;},false);}
var _animateToPosition;var _animateToInterval;function animateToPosition()
{var diff=(_animateToPosition-dragPosition)/settings.animateStep;if(diff>1||diff<-1){positionDrag(dragPosition+diff);}else{positionDrag(_animateToPosition);ceaseAnimation();}}
var ceaseAnimation=function()
{if(_animateToInterval){clearInterval(_animateToInterval);delete _animateToPosition;}};var scrollTo=function(pos,preventAni)
{if(typeof pos=="string"){$e=jQuery(pos,this);if(!$e.length)return;pos=$e.offset().top-$this.offset().top;}
ceaseAnimation();var destDragPosition=-pos/(paneHeight-contentHeight)*maxY;if(preventAni||!settings.animateTo){positionDrag(destDragPosition);}else{_animateToPosition=destDragPosition;_animateToInterval=setInterval(animateToPosition,settings.animateInterval);}};$this[0].scrollTo=scrollTo;$this[0].scrollBy=function(delta)
{var currentPos=-parseInt($pane.css('top'))||0;scrollTo(currentPos+delta);};initDrag();if(percentInView>=.98){$drag.hide();}
jQuery.jScrollPane.active.push($this[0]);}else{$this.css({'height':paneHeight+'px','width':paneWidth-this.originalSidePaddingTotal+'px','padding':this.originalPadding});}})};jQuery(window).bind('unload',function(){var els=jQuery.jScrollPane.active;for(var i=0;i<els.length;i++){els[i].scrollTo=els[i].scrollBy=null;}});;


$.fn.jScrollPaneExt=function(settings){settings=$.extend({background:"none"},settings);var $this=$(this);var $container=$this.parent();if(settings.background!="none"){$container.append(jQuery("<div class='scroller_top' style='position: relative; position: absolute; height: 9px; top: 1px; left: 1px; right: 30px; background: #F8F8F8; z-index: 10;'></div>"),jQuery("<div class='scroller_bottom' style='position: relative; position: absolute; height: 9px; bottom: 1px; left: 1px; right: 30px; background: #F8F8F8; z-index: 10;'></div>"));}
if(settings.background=="gradient"){$container.append("<div style='position: relative; position: absolute; top: 0px; left: 0px; right: 30px; bottom: 0px; z-index: -1;' class='gradient'></div>");$this.css("background","none");$(".scroller_top",$container).css("background","white").shadow({corners:"tl tr",size:"small",edges:"left right top"})
$(".scroller_bottom",$container).shadow({corners:"bl br",size:"small",edges:"left right bottom"});}else if(settings.background=="gray"){$(".scroller_top",$container).shadow({corners:"tr",size:"small",edges:"left right top"})
$(".scroller_bottom",$container).shadow({corners:"bl br",size:"small",edges:"left right bottom"});}
return this;};


(function($){function toIntegersAtLease(n)
{return n<10?'0'+n:n;}
Date.prototype.toJSON=function(date)
{return this.getUTCFullYear()+'-'+
toIntegersAtLease(this.getUTCMonth())+'-'+
toIntegersAtLease(this.getUTCDate());};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'}
$.quoteString=function(string)
{if(escapeable.test(string))
{return'"'+string.replace(escapeable,function(a)
{var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"'}
return'"'+string+'"';}
$.toJSON=function(o,compact)
{var type=typeof(o);if(type=="undefined")
return"undefined";else if(type=="number"||type=="boolean")
return o+"";else if(o===null)
return"null";if(type=="string")
{return $.quoteString(o);}
if(type=="object"&&typeof o.toJSON=="function")
return o.toJSON(compact);if(type!="function"&&typeof(o.length)=="number")
{var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact));}
if(compact)
return"["+ret.join(",")+"]";else
return"["+ret.join(", ")+"]";}
if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}
ret=[];for(var k in o){var name;var type=typeof(k);if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$.quoteString(k);else
continue;val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}
if(compact)
ret.push(name+":"+val);else
ret.push(name+": "+val);}
return"{"+ret.join(", ")+"}";}
$.compactJSON=function(o)
{return $.toJSON(o,true);}
$.evalJSON=function(src)
{return eval("("+src+")");}
$.secureEvalJSON=function(src)
{var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
return eval("("+src+")");else
throw new SyntaxError("Error parsing JSON, source is not valid.");}})(jQuery);;


jQuery.fn.mousehold=function(timeout,f){if(timeout&&typeof timeout=='function'){f=timeout;timeout=100;}
if(f&&typeof f=='function'){var timer=0;var fireStep=0;return this.each(function(){jQuery(this).mousedown(function(){fireStep=1;var ctr=0;var t=this;timer=setInterval(function(){ctr++;f.call(t,ctr);fireStep=2;},timeout);})
clearMousehold=function(){clearInterval(timer);if(fireStep==1)f.call(this,1);fireStep=0;}
jQuery(this).mouseout(clearMousehold);jQuery(this).mouseup(clearMousehold);})}};

;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')
$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)
return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)
helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}
function settings(element){return $.data(element,"tooltip");}
function handle(event){if(settings(this).delay)
tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}
function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))
return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(!bodyContent)
return;if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}
helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)
helper.body.append("<br/>");helper.body.append(part);}
helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}
if(settings(this).showURL&&$(this).url())
helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)
helper.parent.fixPNG();handle.apply(this,arguments);}
function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))
helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}
update();}
function update(event){if($.tooltip.blocked)
return;if(event&&event.target.tagName=="OPTION"){return;}
if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}
if(current==null){$(document.body).unbind('mousemove',update);return;}
helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}
helper.parent.css({left:left,right:right,top:top});}
var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}
if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}
function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}
function hide(event){if($.tooltip.blocked)
return;if(tID)
clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}
if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))
helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)
helper.parent.unfixPNG();}})(jQuery);;


(function($){$.fn.upload=function(options){options=$.extend({name:'file',enctype:'multipart/form-data',action:'',autoSubmit:true,onSubmit:function(){},onComplete:function(){},onSelect:function(){},params:{}},options);return new $.ocupload(this,options);},$.ocupload=function(element,options){var self=this;var id=new Date().getTime().toString().substr(8);var iframe=$('<iframe '+'id="iframe'+id+'" '+'name="iframe'+id+'"'+'></iframe>').css({display:'none'});var form=$('<form '+'method="post" '+'enctype="'+options.enctype+'" '+'action="'+options.action+'" '+'target="iframe'+id+'"'+'></form>').css({margin:0,padding:0});var input=$('<input '+'name="'+options.name+'" '+'type="file" '+'/>').css({'width':'auto','position':'absolute','right':0,'top':0,'opacity':0,'zoom':1,'filter':'alpha(opacity=0)','border':0,'font-size':'10em'});element.wrap('<div></div>');element.wrap(form);element.wrap('<span></span>');element.parent().css({'float':'left','white-space':'nowrap','position':'relative','z-index':1,'left':0,'top':0,'overflow':'hidden','display':'inline','border':0});element.after(input);element.parent().parent().after(iframe);form=input.parent().parent();input.change(function(){self.onSelect();if(self.autoSubmit){self.submit();}});$.extend(this,{autoSubmit:options.autoSubmit,onSubmit:options.onSubmit,onComplete:options.onComplete,onSelect:options.onSelect,filename:function(){return input.attr('value');},params:function(params){var params=params?params:false;if(params){options.params=$.extend(options.params,params);}
else{return options.params;}},name:function(name){var name=name?name:false;if(name){input.attr('name',value);}
else{return input.attr('name');}},action:function(action){var action=action?action:false;if(action){form.attr('action',action);}
else{return form.attr('action');}},enctype:function(enctype){var enctype=enctype?enctype:false;if(enctype){form.attr('enctype',enctype);}
else{return form.attr('enctype');}},set:function(obj,value){var value=value?value:false;function option(action,value){switch(action){default:throw new Error('[jQuery.ocupload.set] \''+action+'\' is an invalid option.');break;case'name':self.name(value);break;case'action':self.action(value);break;case'enctype':self.enctype(value);break;case'params':self.params(value);break;case'autoSubmit':self.autoSubmit=value;break;case'onSubmit':self.onSubmit=value;break;case'onComplete':self.onComplete=value;break;case'onSelect':self.onSelect=value;break;}}
if(value){option(obj,value);}
else{$.each(obj,function(key,value){option(key,value);});}},submit:function(){this.onSubmit();$.each(options.params,function(key,value){form.append($('<input '+'type="hidden" '+'name="'+key+'" '+'value="'+value+'" '+'/>'));});form.get(0).submit();iframe.unbind().load(function(){var myFrame=document.getElementById(iframe.attr('name'));var response=$(myFrame.contentWindow.document.body).text();self.onComplete(response);});}});}})(jQuery);;


$.gallery={images:Array(),default_width:100,default_height:100,current_image:0,initialize:function(){if($("#gallery_overlay").length<1){$("body").append("<div id='gallery_overlay'></div>");$("body").append("<div id='gallery_content_wrapper'>"+"<div id='gallery_content'>"+"<div class='border_corner_medium_tl'/>"+"<div class='border_corner_medium_tr'/>"+"<div class='border_corner_medium_bl'/>"+"<div class='border_corner_medium_br'/>"+"<div class='border_edge_medium_left'/>"+"<div class='border_edge_medium_right'/>"+"<div class='border_edge_medium_bottom'/>"+"<div class='border_edge_medium_top'/>"+"<div id='gallery_content_inner'>"+"<div class='gallery_button' style='left: 20px; background: transparent url(\"images/arrow_left_glow.png\") no-repeat 50% 50%;' onClick='$.gallery.previous();'>"+"</div>"+"<div class='gallery_button' style='right: 20px; background: transparent url(\"images/arrow_right_glow.png\") no-repeat 50% 50%;' onClick='$.gallery.next();'>"+"</div>"+"<div class='gallery_button gallery_close_button' style='top: 20px !important; right: 20px; background: transparent url(\"images/close_glow.png\") no-repeat 50% 50%;' onClick='$.gallery.hide();'>"+"</div>"+"</div>"+"<div id='gallery_loader'></div>"+"</div>"+"</div>");}
width=500;$("#gallery_overlay").click(function(){$.gallery.hide()});$("#gallery_overlay").css("opacity",0);$("#gallery_overlay").css("z-index",2000);$("#gallery_overlay").css({position:"relative",position:"absolute",left:"0",right:"0",top:"0",bottom:"0",width:"100%",height:$(document).height(),background:"black",display:"none"});if($.browser.msie)
$("#gallery_overlay").css("width",$(window).width());$(document).keydown(function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27)
$.gallery.hide()});$("#gallery_content_wrapper").css({position:"relative",position:"absolute",top:"200px",left:"0",width:"100%",height:"auto",zIndex:"2001"});$("#gallery_content").css({position:"relative",background:"white",margin:"0px auto",width:$.gallery.default_width,height:$.gallery.default_height,display:"none"});$("#gallery_content_inner").css({position:"static",background:"white",overflow:"hidden",padding:"10px",textAlign:"left"});$("#gallery_loader").css({position:"relative",position:"absolute",bottom:"20px",display:"none",left:"0px",right:"0px",height:"22px",background:"url('images/ajax-loader.gif') 50% 50% no-repeat"});$("#gallery_content_inner .gallery_button").css({position:"relative",position:"absolute",cursor:"pointer",width:"21px",height:"21px",top:"10px",zIndex:2002});$("#gallery_content_inner .gallery_button").css("opacity",0);$("#gallery_content_inner").hover(function(){$(".gallery_button",this).stop(true).fadeTo("fast",1);},function(){$(".gallery_button",this).stop(true).fadeTo("fast",0);});$(window).scroll(function(){});},showURL:function(width,height,url){$.gallery.initialize();$.gallery.resize(width,height);$("#gallery_content_inner *").not(".gallery_button").remove();$("#gallery_overlay").show().css("opacity",0.7);$("#gallery_content").fadeIn("fast",function(){$("#gallery_content_inner").html("<iframe style='border: 0; overflow: hidden;' width="+width+" height="+height+" src='"+url+"'></iframe>");});},showHTML:function(width,height,html,adjustSize){adjustSize=adjustSize||false;$.gallery.initialize();$.gallery.resize(width,height);$("#gallery_content_inner *").not(".gallery_button").remove();$("gallery_loader").hide();$(".gallery_button").hide();$("#gallery_overlay").show().css("opacity",0.7);$("#gallery_content").fadeIn("fast",function(){$("#gallery_content_inner").append(html);applyInitFunctions($("#gallery_content_inner"));if(adjustSize){if($.browser.msie)
$.gallery.resize(html.width(),html.height()-10);else
$.gallery.resize(html.width(),html.height());}});},show:function(selector,start){$.gallery.hide(function(){$.gallery.initialize();$.gallery.images=new Array();$(selector).each(function(){$.gallery.images[$.gallery.images.length]=$(this).attr("href");if($(start).attr("href")==$(this).attr("href"))
$.gallery.current_image=$.gallery.images.length-1;});$("#gallery_content").css({width:$.gallery.default_width,height:$.gallery.default_height});$("#gallery_overlay").show().css("opacity",0.7);$("#gallery_content").fadeIn("fast",function(){$.gallery.loadCurrentImage();});});},loadCurrentImage:function(){$("#gallery_loader").show();$(".gallery_button").show();var img=new Image();img.onerror=function(){$("#gallery_loader").hide();}
img.onload=function(){$("#gallery_loader").hide();current_layer=$("#gallery_content_inner .image:first");if($.browser.msie)
top_layer=$("<div class='image' style='position: relative; position: absolute; left: 10px; width: "+img.width+"px; height: "+img.height+"px;background-repeat: no-repeat; background-position: 50% 50%; background-image: url(\""+img.src+"\");'>"+"</div>");else
top_layer=$("<div class='image' style='margin: 10px; position: relative; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background-repeat: no-repeat; background-position: 50% 50%; background-image: url(\""+img.src+"\");'>"+"<div class='shadow_small_corner_tl'></div>"+"<div class='shadow_small_corner_tr'></div>"+"<div class='shadow_small_corner_bl'></div>"+"<div class='shadow_small_corner_br'></div>"+"<div class='shadow_small_edge_top'></div>"+"<div class='shadow_small_edge_bottom'></div>"+"<div class='shadow_small_edge_left'></div>"+"<div class='shadow_small_edge_right'></div>"+"</div>");$(top_layer).css("opacity",0);$("#gallery_content_inner").append(top_layer);if($(current_layer).height()>img.height){$.gallery.resize($(current_layer).width(),img.height,function(){if($(current_layer).width()>img.width){$.gallery.resize(img.width,img.height,function(){$(top_layer).fadeTo("fast",1.0,function(){$(current_layer).remove();});});}else{$(top_layer).fadeTo("fast",1.0,function(){$.gallery.resize(img.width,img.height,function(){$(current_layer).remove();});});}});}else{if($(current_layer).width()>img.width){$.gallery.resize(img.width,$(current_layer).height(),function(){$(top_layer).fadeTo("fast",1.0,function(){$(current_layer).remove();$.gallery.resize(img.width,img.height,function(){});});});}else{$(top_layer).fadeTo("fast",1.0,function(){$.gallery.resize(img.width,img.height,function(){$(current_layer).remove();});});}}};img.src=$.gallery.images[$.gallery.current_image];},next:function(){$.gallery.current_image=($.gallery.current_image+1)%$.gallery.images.length;$.gallery.loadCurrentImage();},previous:function(){$.gallery.current_image=$.gallery.current_image-1;if($.gallery.current_image<0)
$.gallery.current_image=$.gallery.images.length-1;$.gallery.loadCurrentImage();},hide:function(callback){$("#gallery_content").hide();$("#gallery_content_inner *").not(".gallery_button").remove();$("#gallery_overlay").hide();if(callback)
callback();},resize:function(width,height,callback){var padding=parseInt($("#gallery_content_inner").css("padding"));width+=2*padding;height+=2*padding;if($.browser.msie)
height=height+10;var new_top=($(window).height()-height)/2+$(window).scrollTop();$("#gallery_content_inner .gallery_button").css({top:height/2-10});$("#gallery_content_inner .gallery_close_button").css({top:20});if(true||$.browser.msie){$("#gallery_content_wrapper").css({top:new_top,left:0},"fast");}else{$("#gallery_content_wrapper").stop(true).animate({top:new_top,left:0},"fast");}
if(true||$.browser.msie){$("#gallery_content").css({width:width,height:height});if(callback)
callback();}else{$("#gallery_content").stop(true).animate({width:width,height:height},"fast",callback);}}};


var jsessionid="empty";var role=new Array("ROLE_ANONYMOUS");var hash='';var user_id="";var user_email="";var user_name="";var ngo_id="";var object_id="";var object_name="";var level="visitor";var ambassador_bool=false;var global_intro=true;var global_page="";var ajaxManager;var global_debug;var flash_mode_small=true;function checkJSession(p,sp,callback){if(callback==loadPage){$("#main_content_div").children().css("visibility","hidden");$('#main_content_div').append("<div class='loader'>&nbsp;</div>");}else if(callback==loadSubPage){$("#sub_content_div").children().css("visibility","hidden");$('#sub_content_div').append("<div class='loader'>&nbsp;</div>");}
$.post("/getSessionInfo.do",{p:p,sp:sp},function(data){debug("CheckJSession",p+"-"+sp);jsessionid=data.jSessionId;if(data.roles[0]!="ROLE_ANONYMOUS"){role=new Array();level='user';for(var x=0;x<data.roles.length;x++){role.push(data.roles[x]);if(data.roles[x]=='ROLE_NGO_ADMINISTRATOR'){level='ngo_admin';ngo_id=data.organizationId;}}
if(data.fieldworker)
level='fieldworker';if(data.fundraiser){if(level!='ngo_admin')
level='ambassador';ambassador_bool=true;}else{ambassador=false;}
if(level=='ngo_admin'||level=='fieldworker')
$('#mypartner_function_menu_button').show();if(ambassador_bool)
$('#myambassador_function_menu_button').show();user_id=data.playerId;user_email=data.email;if(object_id=='')
object_id=user_id;if(callback){callback(p,sp);debug("callback",callback);}}
else{level='anonymous';if(callback){if(p=='cockpit'||p==''){if(p=='cockpit'){hh=279;if($.browser.msie)
hh=299;load_block_with_data({page:'cockpit',subpage:sp,error:"You need to be logged in to view this page"},"lightbox_login",{},"",function(data){$.gallery.showHTML(387,hh,$(data).addShadow());});}
callback("home",sp);session.page="home";session.object_id="";resetInitValues();}else{callback(p,sp);}}}
global_page=p;},"json");}
var session={};var delay=10;$(document).ready(function(){$.ajaxSettings.timeout=25000;var maxReqs=10;if($.browser.msie)
maxReqs=2;ajaxManager=$.manageAjax({manageType:'queue',maxReq:maxReqs});$.history.init(pageload);rewriteURLs($("body"));jQuery().ajaxError(function(event,request,settings){if(request.readyState==0){}else if(request.readyState==4){alert("Couldn't connect to the server<br>Please wait a few minutes and refresh your page.");}else{}
debug("AJAX ERROR 1",event);debug("AJAX ERROR 2",request);debug("AJAX ERROR 3",settings);});});function setTitle(title,subtitle){if(title)
if(subtitle)
document.title="Pifworld, the Charity Platform"+" - "+title+" - "+subtitle;else
document.title="Pifworld, the Charity Platform"+" - "+title;else
document.title="Pifworld, the Charity Platform";if(pageTracker){pageTracker._trackPageview(cur_hash.substring(1));}}
var pages;function pageload(hash){if(cur_hash==hash&&hash!="/cockpit/mywallet"){debug("hash",hash+" "+cur_hash)
return;}
debug("aaa"+hash);cur_hash=hash;$("#outer").show();if(session.page=="")
var cur_scroll="0px";else
var cur_scroll="536px";pages=hash.split('/');if(pages[3]==undefined){object_id=user_id;}else{object_id=pages[3];object_name=pages[2];session.item_id=pages[4];}
if(pages[1]==undefined)
pages[1]="home";if(pages[4]==undefined&&(pages[1]=='partner'||pages[1]=='project'||pages[1]=='player'))
pages[4]='overview';else if(pages[2]==undefined&&pages[1]=='aboutpifworld')
pages[4]='welcome';else if(pages[2]==undefined&&pages[1]=='projects')
pages[4]='fundraising';else if(pages[2]=="company"&&pages[1]=='projects'){pages[4]="company";}
else if(pages[4]==undefined&&pages[1]=='projects')
pages[4]=pages[2];else if(pages[4]==undefined&&pages[1]=='aboutpifworld')
pages[4]=pages[2];else if(pages[4]==undefined)
pages[4]=pages[1];if(pages[1]=='cockpit')
pages[4]=pages[2];if(pages[1]=='home')
ccbool=true;else
ccbool=false
if(pages[1]=="projects")
session.object_id=object_id
if(pages[1]=="home"&&session.page==undefined)
ccbool=true;else
ccbool=false;loadBody(ccbool,function(){if(pages[1]==session.page&&object_id==session.object_id){if(session.subpage=='mywallet'&&pages[4]=='mywallet'){checkJSession(pages[1],pages[4],loadPage);}else{checkJSession(pages[1],pages[4],loadSubPage);}}else{checkJSession(pages[1],pages[4],loadPage);}
session.page=pages[1];session.subpage=pages[4];session.object_id=object_id;});}
function animGlobe(height,bool,callback){var cheight=parseInt($('#header').css("height"));if(bool){if(false&&cheight-25>height){$('#header').css("height",cheight-25);$('#header').css("height",cheight-25);setTimeout(function(){animGlobe(height,bool,callback)},1);}else{$('#header').css("height",height);if(callback){toggleGlobeMode("small");callback();}}}else{if(cheight+25<height){$('#header').css("height",cheight+25);setTimeout(function(){animGlobe(height,bool,callback)},1);}else{$('#header').css("height",height);if(callback){toggleGlobeMode("big");callback();}}}}
function loadBody(splash,callback){if($('#main_content_div').length==0||splash){animGlobe(221,true,callback);showGlobeResizeButton(true);}
else{if($("#header").css("height")!="521px"){animGlobe(521,false,callback);}else
callback();showGlobeResizeButton(true);}}
function rewriteURLs(selector){selector=selector||$("body");$("a[@rel='history']",selector).add("#tabs a").unbind().click(function(){hash=this.href;hash=hash.replace(/^.*#/,'');hash=hash.replace($("base").attr("href"),"");if(hash.substr(0,1)!="/")
hash="/"+hash;debug("URL",document.location.hash);if(!document.location.hash||document.location.search!=""){document.location.href=$("base").attr("href")+"#"+hash;}else{$.history.load(hash);}
return false;});$("a[@rel='internal']",selector).click(function(){hash=this.href.replace(/^.*#/,'');$(document).scrollTo($("a[@name='"+hash+"']"),"slow");return false;});}
function applyInitFunctions(selector){selector=selector||$("body");debug(selector);rewriteURLs(selector);$("input.prevalue, textarea.prevalue").prevalue();$("input.prevalue_allow_empty, textarea.prevalue_allow_empty").prevalue({allowEmpty:true});$("div.icon, div.icon_medium, div.tooltip",selector).not(".no-tooltip").tooltip({delay:0,track:true,opacity:1,fixPNG:true,top:10,left:5,bodyHandler:function(){return $("div.tooltip_text",this).html();}});}
function destroyFlash(selector){$("embed, object",selector).each(function(){try{document[$(this).attr("id")].video_action($.toJSON({action:"destroy"}));}catch(error){}});}
function loadPage(page,subpage){destroyFlash($('#main_content_div'));$("#tooltip").hide();ajaxManager.abort();ajaxManager.add({url:js_base_href+'scripts/loadTabs.php',data:{jsessionid:jsessionid,page:page,subpage:subpage,object_id:object_id,object_name:object_name,level:level,ambassador_bool:ambassador_bool},type:"post",success:function(data){setTimeout(function(){$("#tabs").html(data).find("img").ifixpng().end().find(".tab_container > a > span").click(function(){setActiveTab($(this).parent().parent());});applyInitFunctions($("#tabs"));$("#tabs span.tab").corner({corners:"tl tr",size:"medium"});$("#tabs span.tab_active").shadow({corners:"tl tr",edges:"left top right",size:"medium"});$("#tabs span.tab_small_left").shadow({corners:"tl",edges:"left top right",size:"small"});$("#tabs span.tab_small_middle").shadow({corners:"",edges:"left top",size:"small"});$("#tabs span.tab_small_right").shadow({corners:"tr",edges:"left top right",size:"small"});},delay);}});ajaxManager.add({url:js_base_href+'scripts/loadPage.php',data:{jsessionid:jsessionid,page:page,subpage:subpage,object_id:object_id,object_name:object_name,level:level},type:"post",success:function(data){setTimeout(function(){$('#main_content_div').html(data).addShadow().find("img").ifixpng();applyInitFunctions($('#main_content_div'));if($.browser.msie){if($.browser.version<7){$("#content").css("zoom","1");$("#content > div.shadow_big_corner_bl, #content > div.shadow_big_corner_br").css({bottom:"-4px",border:"0px solid red"});$("#content > div.shadow_big_edge_bottom").css({bottom:"-5px",border:"0px solid red"});}
$("#content > div.shadow_big_edge_left, #content > div.shadow_big_edge_right").css({height:$("#content").height()+10,border:"0px solid red"});}
if(session.page=="home"&&session.page==undefined)
var cur_scroll="0px";else
var cur_scroll="510px";setTimeout(function(){$.scrollTo(cur_scroll,"fast")},"1500");},delay);}});}
function loadSubPage(page,subpage){var timer;var timer2;destroyFlash($('#sub_content_div'));$.gallery.hide();$("#tooltip").hide();ajaxManager.abort();var subpage_number=ajaxManager.add({url:js_base_href+'scripts/loadSubpage.php',data:{jsessionid:jsessionid,page:page,subpage:subpage,object_id:object_id,level:level},type:"post",beforeSend:function(){timer=setTimeout(function(){$('#sub_content_div div.loader').css({"background":"url('headers/header.php?font_color=898989&font_size=7&font_name=pixel&text=Loading ...') no-repeat 50% 50%"});ajaxManager.abort(subpage_number);timer2=setTimeout(function(){loadSubPage(page,subpage);},3000);},$.ajaxSettings.timeout);},success:function(data){clearTimeout(timer);clearTimeout(timer2);setTimeout(function(){$('#sub_content_div').html(data).addShadow().find("img").ifixpng();applyInitFunctions($('#sub_content_div'));if($.browser.msie){if($.browser.version<7){$("#content").css("zoom","1");$("#content > div.shadow_big_corner_bl, #content > div.shadow_big_corner_br").css({bottom:"-4px",border:"0px solid red"});$("#content > div.shadow_big_edge_bottom").css({bottom:"-5px",border:"0px solid red"});}
$("#content > div.shadow_big_edge_left, #content > div.shadow_big_edge_right").css({height:$("#content").height()+10,border:"0px solid red"});}},delay);if(page=='cockpit')
setActiveTab($("#tab_"+subpage));else if(page=="aboutpifworld"||page=="projects")
setActiveTab2($("#tab_"+subpage));}});}
function setActiveTab(activeTab){$("#tabs .tab").show();$("#tabs .tab_active").hide();$(".tab",activeTab).hide();$(".tab_active",activeTab).show();}
function setActiveTab2(activeTab){$("#sub_tabs .sub_tab").show();$("#sub_tabs .sub_tab_active").hide();$(".sub_tab",activeTab).hide();$(".sub_tab_active",activeTab).show();}
function load_block(script,html_file,datastring,target,callback){var timer;var loader;if(target){destroyFlash($(target));loader=$("<div class='loader'>&nbsp;</div>");$(target).html(loader);}
var block_number=ajaxManager.add({url:js_base_href+'scripts/loadBlock.php',data:{script:script,block:html_file,vars:$.toJSON(datastring)},type:"post",beforeSend:function(data){timer=setTimeout(function(){loader.css({"background":"url('headers/header.php?font_color=898989&font_size=7&font_name=pixel&text=Loading ...') no-repeat 50% 50%"});ajaxManager.abort(block_number);setTimeout(function(){load_block(script,html_file,datastring,target,callback);},3000);},$.ajaxSettings.timeout);},success:function(data){clearTimeout(timer);setTimeout(function(){if(target){$(target).html(data).addShadow().find("img").ifixpng();applyInitFunctions(target);applyShadows(target);if($.browser.msie){if($.browser.version<7){$("#content").css("zoom","1");$("#content > div.shadow_big_corner_bl, #content > div.shadow_big_corner_br").css({bottom:"-4px",border:"0px solid red"});$("#content > div.shadow_big_edge_bottom").css({bottom:"-5px",border:"0px solid red"});}
$("#content > div.shadow_big_edge_left, #content > div.shadow_big_edge_right").css({height:$("#content").height()+10,border:"0px solid red"});}}
if(callback)
callback(data);},delay);}});}
function load_block_with_data(jsonArray,html_file,datastring,target,callback){if(target)
$(target).html("<div class='loader'>&nbsp;</div>");$.post(js_base_href+'scripts/loadBlockWithData.php',{jsonArray:$.toJSON(jsonArray),block:html_file,vars:$.toJSON(datastring)},function(data){setTimeout(function(){if(target){$(target).html(data).addShadow().ifixpng();applyInitFunctions(target);}
if(callback)
callback(data);},delay);});};


pwsL10n={short:"Too short",bad:"Bad",good:"Good",strong:"Strong"};var shortPass=pwsL10n.short;var badPass=pwsL10n.bad;var goodPass=pwsL10n.good;var strongPass=pwsL10n.strong;function check_pass_strength(){var pass=$('#password').val();var user=$('#username').val();var res=$('#pass-strength-result');var strength=passwordStrength(pass,user);$(res).removeClass('short bad good strong');if(strength==pwsL10n.bad){$(res).addClass('bad');$(res).html(pwsL10n.bad);}
else if(strength==pwsL10n.good){$(res).addClass('good');$(res).html(pwsL10n.good);}
else if(strength==pwsL10n.strong){$(res).addClass('strong');$(res).html(pwsL10n.strong);}
else{$(res).addClass('short');$(res).html(pwsL10n.short);}}
function passwordStrength(password,username){score=0;if(password.length<4){return shortPass;}
if(password.toLowerCase()==username.toLowerCase())
return badPass;score+=password.length*4;score+=(checkRepetition(1,password).length-password.length)*1;score+=(checkRepetition(2,password).length-password.length)*1;score+=(checkRepetition(3,password).length-password.length)*1;score+=(checkRepetition(4,password).length-password.length)*1;if(password.match(/(.*[0-9].*[0-9].*[0-9])/))
score+=5;if(password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/))
score+=5;if(password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))
score+=10;if(password.match(/([a-zA-Z])/)&&password.match(/([0-9])/))
score+=15;if(password.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&password.match(/([0-9])/))
score+=15;if(password.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&password.match(/([a-zA-Z])/))
score+=15;if(password.match(/^\w+$/)||password.match(/^\d+$/))
score-=10;if(score<0)score=0;if(score>100)score=100;if(score<34)return badPass;if(score<68)return goodPass;return strongPass;}
function checkRepetition(pLen,str){res="";for(i=0;i<str.length;i++){repeated=true;for(j=0;j<pLen&&(j+i+pLen)<str.length;j++)
repeated=repeated&&(str.charAt(j+i)==str.charAt(j+i+pLen));if(j<pLen)repeated=false;if(repeated){i+=pLen-1;repeated=false;}
else{res+=str.charAt(i);}}
return res;}
function loadBlockItem(id,scroll_item,load_block_script,load_block_template,load_block_element,load_block_id,load_block_stats_bool){if(load_block_stats_bool&&$(scroll_item).hasClass("active")){$(scroll_item).fadeTo("fast",1).removeClass("active");$("#"+load_block_element+"_passport").hide();$("#"+load_block_element+"_statistics").show().fadeTo("fast",1);return;}
$("."+load_block_element+"_item").removeClass("active").fadeTo("fast",1);$(scroll_item).fadeTo(100,0.5,function(){$(scroll_item).addClass("active");var varss={};varss[load_block_id]=id;varss['offset']=0;varss['amount']=99999;load_block(load_block_script,load_block_template,varss,$("#"+load_block_element+"_passport"));$("#"+load_block_element+"_statistics").fadeTo("fast",0.1,function(){$(this).hide();$("#"+load_block_element+"_passport").show();});});}
var last_id;var last_scroll;function loadNewsItem(newsId,scroll_item,load_block_script,load_block_script2,type,oid,owner){$(".news_list_item").removeClass("selected").fadeTo("fast",1);if(type!='new'&&type!='edit'&&type!='delete')
$(scroll_item).fadeTo("fast",0.5).addClass("active");var varss={};if(owner!=""){varss['owner']=""+owner;varss['ownerId']=oid;}
varss['contentItemId']=newsId;varss['newsItemId']=newsId;varss['offset']=0;varss['amount']=99999;if(pages&&pages[1]=='cockpit')
varss['cockpit']=true;if(type=='owner')
load_block(load_block_script,"news_item_owner",varss,$("#news_item"));else if(type=='empty')
load_block_with_data({},"news_item_empty",varss,$("#news_item"));else if(type=='new')
load_block_with_data({participantOwner:oid,prev_id:last_id,owner:owner,ownerId:oid},"news_item_new","",$("#news_item"));else if(type=='edit')
load_block(load_block_script,"news_item_edit",varss,$("#news_item"));else if(type=='delete')
load_block(load_block_script,"news_item_delete",varss,$("#news_item"));else{load_block(load_block_script,"news_item",varss,$("#news_item"));}
$('#comment_news_item_id').val(newsId);last_id=newsId;if(type=='owner'||type=='list'||type=='empty'){$("#news_item_comments").fadeTo("fast",0.1,function(){if(type=='owner')
load_block(load_block_script2,"news_item_comments_owner",varss,$("#news_item_comments"));else
load_block(load_block_script2,"news_item_comments",varss,$("#news_item_comments"));$("#news_item_comments").show().fadeTo("fast",1);});}else{$('#news_item_comments').html("");}
last_scroll=scroll_item;}
$.fn.addShadow=function(){return this.each(function(){applyShadows(this);});}
function applyShadows(selector){$(".button_white",selector).hover(function(){$(this).addClass("button_hover");},function(){$(this).removeClass("button_hover");});$(".scroll_item",selector).hover(function(){$(this).find("img").each(function(){$(this).attr("src",$(this).attr("src").replace(/&brightness=\d\d\d/g,'')+"&brightness=120");});},function(){$(this).find("img").each(function(){$(this).attr("src",$(this).attr("src").replace(/&brightness=\d\d\d/g,'')+"&brightness=100");});});$("div.scroll-pane",selector).each(function(){$(this).jScrollPane({scrollbarWidth:"17",scrollbarMargin:"10",dragMinHeight:"15",showArrows:true}).jScrollPaneExt({background:"gray"});});$("div.scroll-pane-gradient",selector).each(function(){$(this).jScrollPane({scrollbarWidth:"17",scrollbarMargin:"10",dragMinHeight:"15",showArrows:true}).jScrollPaneExt({background:"gradient"});});$("div.scroll-pane-none",selector).each(function(){$(this).jScrollPane({scrollbarWidth:"17",scrollbarMargin:"10",dragMinHeight:"15",showArrows:true}).jScrollPaneExt();});$("span.tab_active",selector).shadow({corners:"tl tr",edges:"left top right",size:"medium"});$("span.tab_small_left",selector).shadow({corners:"tl",edges:"left top right",size:"small"});$("span.tab_small_middle",selector).shadow({corners:"",edges:"left top",size:"small"});$("span.tab_small_right",selector).shadow({corners:"tr",edges:"left top right",size:"small"});return;$("div.shadow_medium",selector).shadow();$("div.shadow_bottom",selector).shadow({corners:"tr bl br",edges:"left top right bottom",size:"big"});$("div.shadow_small",selector).shadow({size:"small"});$("div.scroll-pane",selector).shadow({size:"small",corners:"tr bl br"});$("div.shadow_small_tabbed",selector).shadow({size:"small",corners:"tr bl br"});$("div.shadow_small_top",selector).shadow({size:"small",corners:"tl tr",edges:"left right top"});$("div.tab_active",selector).shadow({corners:"tl tr",edges:"left top right",size:"medium"});$("div.corner_small",selector).corner();$("div.corner_small_left",selector).corner({corners:"tl bl"});$("div.corner_small_right",selector).corner({corners:"tr br"});$("div.corner_medium_left",selector).corner({corners:"tl bl",size:"medium"});$("div.corner_medium_right",selector).corner({corners:"tr br",size:"medium"});$("div.tab",selector).corner({corners:"tl tr",size:"medium"});$("div.corner_bottom_medium",selector).corner({corners:"bl br",size:"medium"});$("div.border_small",selector).corner({size:"small",edge:true,edges:""});$("div.border_small_right",selector).corner({size:"small",corners:"tr br",edge:true,edges:""});$("div.buttons_bottom .button_white:first-child",selector).corner({size:"small",corners:"tl bl",edge:true,edges:""});$("div.buttons_bottom .button_white:last-child",selector).corner({size:"small",corners:"tr br",edge:true,edges:"",ignore:true});}
function display_error(responseText){if(responseText.fieldErrors||responseText.error_msg){var err="";for(key in responseText.fieldErrors){err+="- "+key+" "+responseText.fieldErrors[key]+"<br/>";}
err+="- "+responseText.error_msg+"<br/>";alert(err);debug("error",err);}}
function debug(fName,error){if($.browser.msie)
return;if(global_debug){if(window.console&&window.console.log){console.log("Debug for "+fName);console.log(error)}else{}}}
function decode(json){var i=json.indexOf("<pre>");if(i>=0){json=json.substring(i+5);}
i=json.indexOf("<PRE>");if(i>=0){json=json.substring(i+5);}
i=json.indexOf("</pre>");if(i>=0){json=json.substring(0,i);}
i=json.indexOf("</PRE>");if(i>=0){json=json.substring(0,i);}
return eval("("+json+")");}
function html2bbcode(text){text=text.replace(/<br>/gi,"\r");text=text.replace(/<br \/>/gi,"\r");text=text.replace(/<p>/gi,"");text=text.replace(/<p [^>]*>/gi,"");text=text.replace(/<\/p>/gi,"");text=text.replace(/<b>/gi,"[b]");text=text.replace(/<\/b>/gi,"[/b]");text=text.replace(/<strong>/gi,"[b]");text=text.replace(/<\/strong>/gi,"[/b]");text=text.replace(/<u>/gi,"[u]");text=text.replace(/<\/u>/gi,"[/u]");text=text.replace(/<i>/gi,"[i]");text=text.replace(/<\/i>/gi,"[/i]");text=text.replace(/<internallink>([^<]+)/i,"[url=$1]$1");text=text.replace(/<\/internallink>/i,"[/url]");text=text.replace(/<\/a>/i,"[/url]");text=text.replace(/<a href/i,"[url");text=text.replace(/<\/a>/i,"[/url]");text=text.replace(/\r\r/i,"");text=text.replace(/\r\n/i,"");return text;}
function truncate(text,max){if(text.length>max){return(text.substr(0,(max-4))+" ...");}
else
return text;}
function formatCurrency(num,nocents){num=num.toString().replace(/\$|\,/g,'');if(isNaN(num))
num="0";sign=(num==(num=Math.abs(num)));num=Math.floor(num*100+0.50000000001);cents=num%100;num=Math.floor(num/100).toString();if(cents<10)
cents="0"+cents;for(var i=0;i<Math.floor((num.length-(1+i))/3);i++)
num=num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));if(nocents)
return(((sign)?'':'-')+num);else
return(((sign)?'':'-')+num+'.'+cents);}
function getCookie(check_name){var a_all_cookies=document.cookie.split(';');var a_temp_cookie='';var cookie_name='';var cookie_value='';var b_cookie_found=false;for(i=0;i<a_all_cookies.length;i++){a_temp_cookie=a_all_cookies[i].split('=');cookie_name=a_temp_cookie[0].replace(/^\s+|\s+$/g,'');if(cookie_name==check_name){b_cookie_found=true;if(a_temp_cookie.length>1){cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''));}
return cookie_value;break;}
a_temp_cookie=null;cookie_name='';}
if(!b_cookie_found){return null;}}
function setCookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24;}
var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");}
function wordwrap(str,int_width,str_break,cut,prefix){var m=((arguments.length>=2)?arguments[1]:75);var b=((arguments.length>=3)?arguments[2]:"\n");var c=((arguments.length>=4)?arguments[3]:false);var p=((arguments.length>=5)?arguments[4]:"");var i,j,l,s,r;str+='';if(m<1){return str;}
for(i=-1,l=(r=str.split("\n")).length;++i<l;r[i]+=s){for(s=r[i],r[i]=p;s.length>m;r[i]+=s.slice(0,j)+((s=s.slice(j)).length?b+p:"")){j=c==2||(j=s.slice(0,m+1).match(/\S*(\s)?$/))[1]?m:j.input.length-j[0].length||c==1&&m||j.input.length+(j=s.slice(m).match(/^\S*/)).input.length;}}
return r.join("\n");};


if(typeof com=="undefined")var com=new Object();if(typeof com.deconcept=="undefined")com.deconcept=new Object();if(typeof com.deconcept.util=="undefined")com.deconcept.util=new Object();if(typeof com.deconcept.FlashObjectUtil=="undefined")com.deconcept.FlashObjectUtil=new Object();com.deconcept.FlashObject=function(swf,id,w,h,ver,c,useExpressInstall,quality,redirectUrl,detectKey){this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf)this.setAttribute('swf',swf);if(id)this.setAttribute('id',id);if(w)this.setAttribute('width',w);if(h)this.setAttribute('height',h);if(ver)this.setAttribute('version',new com.deconcept.PlayerVersion(ver.toString().split(".")));if(c)this.addParam('bgcolor',c);var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('redirectUrl','');if(redirectUrl)this.setAttribute('redirectUrl',redirectUrl);if(useExpressInstall){var expressInstallReqVer=new com.deconcept.PlayerVersion([6,0,65]);var installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion();if(installedVer.versionIsValid(expressInstallReqVer)&&!installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);}}else{this.setAttribute('doExpressInstall',false);}}
com.deconcept.FlashObject.prototype.setAttribute=function(name,value){this.attributes[name]=value;}
com.deconcept.FlashObject.prototype.getAttribute=function(name){return this.attributes[name];}
com.deconcept.FlashObject.prototype.getAttributes=function(){return this.attributes;}
com.deconcept.FlashObject.prototype.addParam=function(name,value){this.params[name]=value;}
com.deconcept.FlashObject.prototype.getParams=function(){return this.params;}
com.deconcept.FlashObject.prototype.getParam=function(name){return this.params[name];}
com.deconcept.FlashObject.prototype.addVariable=function(name,value){this.variables[name]=value;}
com.deconcept.FlashObject.prototype.getVariable=function(name){return this.variables[name];}
com.deconcept.FlashObject.prototype.getVariables=function(){return this.variables;}
com.deconcept.FlashObject.prototype.getParamTags=function(){var paramTags="";var key;var params=this.getParams();for(key in params){paramTags+='<param name="'+key+'" value="'+params[key]+'" />';}
return paramTags;}
com.deconcept.FlashObject.prototype.getVariablePairs=function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs.push(key+"="+variables[key]);}
return variablePairs;}
com.deconcept.FlashObject.prototype.getHTML=function(){var flashHTML="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
flashHTML+='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'?r='+Math.round(Math.random()*99999)+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'"';var params=this.getParams();for(var key in params){flashHTML+=' '+key+'="'+params[key]+'"';}
pairs=this.getVariablePairs().join("&");if(pairs.length>0){flashHTML+=' flashvars="'+pairs+'"';}
flashHTML+='></embed>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
flashHTML+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" id="'+this.getAttribute('id')+'">';flashHTML+='<param name="movie" value="'+this.getAttribute('swf')+'?r='+Math.round(Math.random()*99999)+'" />';var tags=this.getParamTags();if(tags.length>0){flashHTML+=tags;}
var pairs=this.getVariablePairs().join("&");if(pairs.length>0){flashHTML+='<param name="flashvars" value="'+pairs+'" />';}
flashHTML+='</object>';}
return flashHTML;}
com.deconcept.FlashObject.prototype.write=function(elementId){if(this.skipDetect||this.getAttribute('doExpressInstall')||com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){if(document.getElementById){if(this.getAttribute('doExpressInstall')){this.addVariable("MMredirectURL",escape(window.location));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}
document.getElementById(elementId).innerHTML=this.getHTML();}}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}
else{document.getElementById(elementId).innerHTML="<div style='text-align: center; margin-top: 300px;'>You don't seem to have the proper Flash plugin needed for this website, <a href='http://sdc.shockwave.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOWi'>click here to get it</a>.</div>";}}}
com.deconcept.FlashObjectUtil.getPlayerVersion=function(){var PlayerVersion=new com.deconcept.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else if(window.ActiveXObject){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");PlayerVersion=new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}catch(e){}}
return PlayerVersion;}
com.deconcept.PlayerVersion=function(arrVersion){this.major=parseInt(arrVersion[0])||0;this.minor=parseInt(arrVersion[1])||0;this.rev=parseInt(arrVersion[2])||0;}
com.deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true;}
com.deconcept.util.getRequestParameter=function(param){var q=document.location.search||document.location.href.hash;if(q){var startIndex=q.indexOf(param+"=");var endIndex=(q.indexOf("&",startIndex)>-1)?q.indexOf("&",startIndex):q.length;if(q.length>1&&startIndex>-1){return q.substring(q.indexOf("=",startIndex)+1,endIndex);}}
return"";}
if(Array.prototype.push==null){Array.prototype.push=function(item){this[this.length]=item;return this.length;}}
var getQueryParamValue=com.deconcept.util.getRequestParameter;var FlashObject=com.deconcept.FlashObject;;


function checkObj(SWFID){if(SWFID&&createObj(SWFID)){return createObj(SWFID);}else{return false;}}
function createObj(SWFID){return document.getElementById(SWFID);}
var sendSateChanged={};function onYouTubePlayerReady(SWFID){var obj;if(obj=checkObj(SWFID)){sendSateChanged[SWFID]=function(newState){var obj;if(obj=checkObj(SWFID)){obj.playerStateUpdateHandler(newState);}};obj.addEventListener("onStateChange","sendSateChanged."+SWFID);}}
function destroy(SWFID){var obj;if(obj=checkObj(SWFID)){obj.removeEventListener("onStateChange","sendSateChanged."+SWFID);obj.clearVideo();}}
function loadVideoById(SWFID,id,startSeconds){var obj;if(obj=checkObj(SWFID)){obj.loadVideoById(id,startSeconds);}}
function cueNewVideo(SWFID,id,startSeconds){var obj;if(obj=checkObj(SWFID)){obj.cueVideoById(id,startSeconds);}}
function clearVideo(SWFID){var obj;if(obj=checkObj(SWFID)){obj.clearVideo();}}
function setSize(SWFID,w,h){var obj;if(obj=checkObj(SWFID)){obj.setSize(w,h);}}
function play(SWFID){var obj;if(obj=checkObj(SWFID)){obj.playVideo();}}
function pause(SWFID){var obj;if(obj=checkObj(SWFID)){obj.pauseVideo();}}
function stop(SWFID){var obj;if(obj=checkObj(SWFID)){obj.stopVideo();}}
function seekTo(SWFID,seconds){var obj;if(obj=checkObj(SWFID)){obj.seekTo(seconds,true);}}
function getPlayerState(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getPlayerState();}}
function getBytesLoaded(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getVideoBytesLoaded();}}
function getBytesTotal(SWFID){var obj;if(obj=checkObj(SWFID)){return""+(obj.getVideoBytesTotal().toString());}}
function getCurrentTime(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getCurrentTime();}}
function getDuration(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getDuration();}}
function getStartBytes(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getVideoStartBytes();}}
function setVolume(SWFID,newVolume){var obj;if(obj=checkObj(SWFID)){obj.setVolume(newVolume);}}
function getVolume(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getVolume();}}
function mute(SWFID){var obj;if(obj=checkObj(SWFID)){obj.mute();}}
function unMute(SWFID){var obj;if(obj=checkObj(SWFID)){obj.unMute();}}
function getEmbedCode(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getVideoEmbedCode();}}
function getVideoUrl(SWFID){var obj;if(obj=checkObj(SWFID)){return obj.getVideoUrl();}};


$.shadow={defaults:{corners:"tl tr bl br",edges:"top bottom left right",size:"medium",ignore:false}}
$.fn.shadow=$.browser.msie&&$.browser.version<5?function(){return this;}:function(options){options=$.extend(true,{},$.shadow.defaults,options||{});return this.each(function(){var self=$(this);if(options.ignore||!self.hasClass("hasShadow")){$.each(options.corners.split(" "),function(){if(this!=""){var item=$("<div class='shadow_"+options.size+"_corner_"+this+"'></div>");setTimeout(function(){self.append(item);},5);}});$.each(options.edges.split(" "),function(){if(this=="")
return;var item=$("<div class='shadow_"+options.size+"_edge_"+this+"'></div>");setTimeout(function(){self.append($(item));},5);if($.browser.msie&&$.browser.version<7){if(this=="left"||this=="right"){item.css({height:self.outerHeight()+"px"});}else{item.css({width:self.outerWidth()+"px"});}}});self.addClass("hasShadow");}});}
$.corner={defaults:{corners:"tl tr bl br",size:"small",edges:"",edge:false,ignore:false}}
$.fn.corner=$.browser.msie&&$.browser.version<5?function(){return this;}:function(options){options=$.extend(true,{},$.corner.defaults,options||{});var self=$(this);return this.each(function(){var self=$(this);if(options.ignore||!self.hasClass("hasCorner")){if(options.edge){$.each(options.corners.split(" "),function(){var item=this;setTimeout(function(){self.append("<div class='border_corner_"+options.size+"_"+item+"'></div>");},5);});$.each(options.edges.split(" "),function(){var edge=this;if(edge!=""){var item=$("<div class='border_edge_"+options.size+"_"+edge+"'></div>");setTimeout(function(){self.append(item);if($.browser.msie){if(edge=="left"||edge=="right"){item.css({height:(1+self.outerHeight()-2*parseInt($(item).css("top")))});}else{item.css({width:(self.outerWidth()-2*parseInt($(item).css("left")))});}}},5);}});}else{$.each(options.corners.split(" "),function(){var item=this;setTimeout(function(){self.append("<div class='corner_"+options.size+"_"+item+"'></div>");},5);});}
self.addClass("hasCorner");}});};


var opentags;var crlf2br=true;var noparse=false;var urlstart=-1;var tagname_re=/^\/?(?:b|i|u|url|)$/;var color_re=/^(:?black|silver|gray|white|maroon|red|purple|fuchsia|green|lime|olive|yellow|navy|blue|teal|aqua|#(?:[0-9a-f]{3})?[0-9a-f]{3})$/i;var number_re=/^[\\.0-9]{1,8}$/i;var uri_re=/^[-;#\/\?:@&=\+\$,_\.!~\*'\(\)%0-9a-z]{1,512}$/i;var postfmt_re=/([\r\n])|(?:\[([a-z]{1,16})(?:=([^\x00-\x1F"'\(\)<>\[\]]{1,256}))?\])|(?:\[\/([a-z]{1,16})\])/ig;function taginfo_t(bbtag,etag)
{this.bbtag=bbtag;this.etag=etag;}
function isValidTag(str)
{if(!str||!str.length)
return false;return tagname_re.test(str);}
function textToHtmlCB(mstr,m1,m2,m3,m4,offset,string)
{if(m1&&m1.length){if(!crlf2br)
return mstr;switch(m1){case'\r':return"";case'\n':return"<br>";}}
if(isValidTag(m2)){if(noparse)
return"["+m2+"]";if(opentags.length&&opentags[opentags.length-1].bbtag=="url"&&urlstart>=0)
return"["+m2+"]";switch(m2){case"code":opentags.push(new taginfo_t(m2,"</code></pre>"));crlf2br=false;return"<pre><code>";case"pre":opentags.push(new taginfo_t(m2,"</pre>"));crlf2br=false;return"<pre>";case"color":case"colour":if(!m3||!color_re.test(m3))
m3="inherit";opentags.push(new taginfo_t(m2,"</span>"));return"<span style=\"color: "+m3+"\">";case"size":if(!m3||!number_re.test(m3))
m3="1";opentags.push(new taginfo_t(m2,"</span>"));return"<span style=\"font-size: "+Math.min(Math.max(m3,0.7),3)+"em\">";case"s":opentags.push(new taginfo_t(m2,"</span>"));return"<span style=\"text-decoration: line-through\">";case"noparse":noparse=true;return"";case"url":opentags.push(new taginfo_t(m2,"</a>"));if(m3&&uri_re.test(m3)){urlstart=-1;if(m3.match(document.domain))
return"<a rel='history' href=\""+m3+"\">";else
return"<a target='_blank' href=\""+m3+"\">";}
urlstart=mstr.length+offset;return"<a href=\"";case"q":case"blockquote":opentags.push(new taginfo_t(m2,"</"+m2+">"));return m3&&m3.length&&uri_re.test(m3)?"<"+m2+" cite=\""+m3+"\">":"<"+m2+">";default:opentags.push(new taginfo_t(m2,"</"+m2+">"));return"<"+m2+">";}}
if(isValidTag(m4)){if(noparse){if(m4=="noparse"){noparse=false;return"";}
return"[/"+m4+"]";}
if(!opentags.length||opentags[opentags.length-1].bbtag!=m4)
return"<span style=\"color: red\">[/"+m4+"]</span>";if(m4=="url"){if(urlstart>0)
return"\">"+string.substr(urlstart,offset-urlstart)+opentags.pop().etag;return opentags.pop().etag;}
else if(m4=="code"||m4=="pre")
crlf2br=true;return opentags.pop().etag;}
return mstr;}
function parseBBCode(post)
{var result,endtags,tag;crlf2br=true;if(opentags==null||opentags.length)
opentags=new Array(0);result=post.replace(postfmt_re,textToHtmlCB);if(noparse)
noparse=false;if(opentags.length){endtags=new String();if(opentags[opentags.length-1].bbtag=="url"){opentags.pop();endtags+="\">"+post.substr(urlstart,post.length-urlstart)+"</a>";}
while(opentags.length)
endtags+=opentags.pop().etag;}
return endtags?result+endtags:result;}
$.fn.bbcode=function(){return $(this).each(function(){$(this).html(parseBBCode($(this).html().replace(/<\S[^><]*>/g,"").replace(/(.*)?(\r?\n)(\r?\n)/g,"<p style='margin-bottom: 10px;'>$1</p>").replace(/(\r?\n)/g,"<br/>")));});};


