var capextra="";
/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
 * $Rev: 5685 $
 */
(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);};});})();

/*answers*/	
;(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-resizable-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(e){e.unselectable="on";e.onselectstart=function(){return false;};if(e.style){e.style.MozUserSelect="none";}},enableSelection:function(e){e.unselectable="off";e.onselectstart=function(){return true;};if(e.style){e.style.MozUserSelect="";}},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).trigger("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args);}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options));}});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({disabled:false},$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value);}).bind('getData.'+name,function(e,key){return self.getData(key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(key){return this.options[key];},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this.setData('disabled',false);},disable:function(){this.setData('disabled',true);}};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).is(this.options.cancel):false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true;}
this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true;},this.options.delay);}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
this._mouseMoveDelegate=function(e){return self.mouseMove(e);};this._mouseUpDelegate=function(e){return self.mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e);}
if(this._mouseStarted){this.mouseDrag(e);return false;}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));}
return!this._mouseStarted;},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e);}
return false;},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},mouseDelayMet:function(e){return this._mouseDelayMet;},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.accordion",{init:function(){var options=this.options;if(options.navigation){var current=this.element.find("a").filter(options.navigationFilter);if(current.length){if(current.filter(options.header).length){options.active=current;}else{options.active=current.parent().parent().prev();current.addClass("current");}}}
options.headers=this.element.find(options.header);options.active=findActive(options.headers,options.active);if($.browser.msie){this.element.find('a').css('zoom','1');}
if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");$("<span class='ui-accordion-left'/>").insertBefore(options.headers);$("<span class='ui-accordion-right'/>").appendTo(options.headers);options.headers.addClass("ui-accordion-header").attr("tabindex","0");}
var maxHeight;if(options.fillSpace){maxHeight=this.element.parent().height();options.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;options.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(maxHeight-maxPadding);}else if(options.autoHeight){maxHeight=0;options.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}
options.headers.not(options.active||"").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if(options.event){this.element.bind((options.event)+".accordion",clickHandler);}},activate:function(index){clickHandler.call(this.element[0],{target:findActive(this.options.headers,index)[0]});},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","");}
$.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion");}});function scopeCallback(callback,scope){return function(){return callback.apply(scope,arguments);};};function completed(cancel){if(!$.data(this,"accordion")){return;}
var instance=$.data(this,"accordion");var options=instance.options;options.running=cancel?0:--options.running;if(options.running){return;}
if(options.clearStyle){options.toShow.add(options.toHide).css({height:"",overflow:""});}
$(this).triggerHandler("accordionchange",[options.data],options.change);}
function toggle(toShow,toHide,data,clickedActive,down){var options=$.data(this,"accordion").options;options.toShow=toShow;options.toHide=toHide;options.data=data;var complete=scopeCallback(completed,this);options.running=toHide.size()===0?toShow.size():toHide.size();if(options.animated){if(!options.alwaysOpen&&clickedActive){$.ui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight});}else{$.ui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight});}}else{if(!options.alwaysOpen&&clickedActive){toShow.toggle();}else{toHide.hide();toShow.show();}
complete(true);}}
function clickHandler(event){var options=$.data(this,"accordion").options;if(options.disabled){return false;}
if(!event.target&&!options.alwaysOpen){options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide=options.active.next(),data={options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=(options.active=$([]));toggle.call(this,toShow,toHide,data);return false;}
var clicked=$(event.target);if(clicked.parents(options.header).length){while(!clicked.is(options.header)){clicked=clicked.parent();}}
var clickedActive=clicked[0]==options.active[0];if(options.running||(options.alwaysOpen&&clickedActive)){return false;}
if(!clicked.is(options.header)){return;}
options.active.parent().andSelf().toggleClass(options.selectedClass);if(!clickedActive){clicked.parent().andSelf().addClass(options.selectedClass);}
var toShow=clicked.next(),toHide=options.active.next(),data={options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false;};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)");}
$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}
var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if($.browser.msie||$.browser.opera){current=Math.ceil(current);}
options.toShow.height(current);},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","auto");}
options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700});}}});$.fn.activate=function(index){return this.accordion("activate",index);};})(jQuery);(function($){$.widget("ui.tabs",{init:function(){this.options.event+='.tabs';this.tabify(true);},setData:function(key,value){if((/^selected/).test(key))
this.select(value);else{this.options[key]=value;this.tabify();}},length:function(){return this.$tabs.length;},tabId:function(a){return a.title&&a.title.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+$.data(a);},ui:function(tab,panel){return{options:this.options,tab:tab,panel:panel};},tabify:function(init){this.$lis=$('li:has(a[href])',this.element);this.$tabs=this.$lis.map(function(){return $('a',this)[0];});this.$panels=$([]);var self=this,o=this.options;this.$tabs.each(function(i,a){if(a.hash&&a.hash.replace('#',''))
self.$panels=self.$panels.add(a.hash);else if($(a).attr('href')!='#'){$.data(a,'href.tabs',a.href);$.data(a,'load.tabs',a.href);var id=self.tabId(a);a.href='#'+id;var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.panelClass).insertAfter(self.$panels[i-1]||self.element);$panel.data('destroy.tabs',true);}
self.$panels=self.$panels.add($panel);}
else
o.disabled.push(i+1);});if(init){this.element.addClass(o.navClass);this.$panels.each(function(){var $this=$(this);$this.addClass(o.panelClass);});if(o.selected===undefined){if(location.hash){this.$tabs.each(function(i,a){if(a.hash==location.hash){o.selected=i;if($.browser.msie||$.browser.opera){var $toShow=$(location.hash),toShowId=$toShow.attr('id');$toShow.attr('id','');setTimeout(function(){$toShow.attr('id',toShowId);},500);}
scrollTo(0,0);return false;}});}
else if(o.cookie){var index=parseInt($.cookie('ui-tabs'+$.data(self.element)),10);if(index&&self.$tabs[index])
o.selected=index;}
else if(self.$lis.filter('.'+o.selectedClass).length)
o.selected=self.$lis.index(self.$lis.filter('.'+o.selectedClass)[0]);}
o.selected=o.selected===null||o.selected!==undefined?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.$lis.filter('.'+o.disabledClass),function(n,i){return self.$lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1)
o.disabled.splice($.inArray(o.selected,o.disabled),1);this.$panels.addClass(o.hideClass);this.$lis.removeClass(o.selectedClass);if(o.selected!==null){this.$panels.eq(o.selected).show().removeClass(o.hideClass);this.$lis.eq(o.selected).addClass(o.selectedClass);var onShow=function(){$(self.element).triggerHandler('tabsshow',[self.ui(self.$tabs[o.selected],self.$panels[o.selected])],o.show);};if($.data(this.$tabs[o.selected],'load.tabs'))
this.load(o.selected,onShow);else
onShow();}
$(window).bind('unload',function(){self.$tabs.unbind('.tabs');self.$lis=self.$tabs=self.$panels=null;});}
for(var i=0,li;li=this.$lis[i];i++)
$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass(o.selectedClass)?'addClass':'removeClass'](o.disabledClass);if(o.cache===false)
this.$tabs.removeData('cache.tabs');var hideFx,showFx,baseFx={'min-width':0,duration:1},baseDuration='normal';if(o.fx&&o.fx.constructor==Array)
hideFx=o.fx[0]||baseFx,showFx=o.fx[1]||baseFx;else
hideFx=showFx=o.fx||baseFx;var resetCSS={display:'',overflow:'',height:''};if(!$.browser.msie)
resetCSS.opacity='';function hideTab(clicked,$hide,$show){$hide.animate(hideFx,hideFx.duration||baseDuration,function(){$hide.addClass(o.hideClass).css(resetCSS);if($.browser.msie&&hideFx.opacity)
$hide[0].style.filter='';if($show)
showTab(clicked,$show,$hide);});}
function showTab(clicked,$show,$hide){if(showFx===baseFx)
$show.css('display','block');$show.animate(showFx,showFx.duration||baseDuration,function(){$show.removeClass(o.hideClass).css(resetCSS);if($.browser.msie&&showFx.opacity)
$show[0].style.filter='';$(self.element).triggerHandler('tabsshow',[self.ui(clicked,$show[0])],o.show);});}
function switchTab(clicked,$li,$hide,$show){$li.addClass(o.selectedClass).siblings().removeClass(o.selectedClass);hideTab(clicked,$hide,$show);}
this.$tabs.unbind('.tabs').bind(o.event,function(){var $li=$(this).parents('li:eq(0)'),$hide=self.$panels.filter(':visible'),$show=$(this.hash);if(($li.hasClass(o.selectedClass)&&!o.unselect)||$li.hasClass(o.disabledClass)||$(this).hasClass(o.loadingClass)||$(self.element).triggerHandler('tabsselect',[self.ui(this,$show[0])],o.select)===false){this.blur();return false;}
self.options.selected=self.$tabs.index(this);if(o.unselect){if($li.hasClass(o.selectedClass)){self.options.selected=null;$li.removeClass(o.selectedClass);self.$panels.stop();hideTab(this,$hide);this.blur();return false;}else if(!$hide.length){self.$panels.stop();var a=this;self.load(self.$tabs.index(this),function(){$li.addClass(o.selectedClass).addClass(o.unselectClass);showTab(a,$show);});this.blur();return false;}}
if(o.cookie)
$.cookie('ui-tabs'+$.data(self.element),self.options.selected,o.cookie);self.$panels.stop();if($show.length){var a=this;self.load(self.$tabs.index(this),$hide.length?function(){switchTab(a,$li,$hide,$show);}:function(){$li.addClass(o.selectedClass);showTab(a,$show);});}else
throw'jQuery UI Tabs: Mismatching fragment identifier.';if($.browser.msie)
this.blur();return false;});if(!(/^click/).test(o.event))
this.$tabs.bind('click.tabs',function(){return false;});},add:function(url,label,index){if(index==undefined)
index=this.$tabs.length;var o=this.options;var $li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label));$li.data('destroy.tabs',true);var id=url.indexOf('#')==0?url.replace('#',''):this.tabId($('a:first-child',$li)[0]);var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.hideClass).data('destroy.tabs',true);}
$panel.addClass(o.panelClass);if(index>=this.$lis.length){$li.appendTo(this.element);$panel.appendTo(this.element[0].parentNode);}else{$li.insertBefore(this.$lis[index]);$panel.insertBefore(this.$panels[index]);}
o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this.tabify();if(this.$tabs.length==1){$li.addClass(o.selectedClass);$panel.removeClass(o.hideClass);var href=$.data(this.$tabs[0],'load.tabs');if(href)
this.load(index,href);}
this.element.triggerHandler('tabsadd',[this.ui(this.$tabs[index],this.$panels[index])],o.add);},remove:function(index){var o=this.options,$li=this.$lis.eq(index).remove(),$panel=this.$panels.eq(index).remove();if($li.hasClass(o.selectedClass)&&this.$tabs.length>1)
this.select(index+(index+1<this.$tabs.length?1:-1));o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n});this.tabify();this.element.triggerHandler('tabsremove',[this.ui($li.find('a')[0],$panel[0])],o.remove);},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1)
return;var $li=this.$lis.eq(index).removeClass(o.disabledClass);if($.browser.safari){$li.css('display','inline-block');setTimeout(function(){$li.css('display','block');},0);}
o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this.element.triggerHandler('tabsenable',[this.ui(this.$tabs[index],this.$panels[index])],o.enable);},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.$lis.eq(index).addClass(o.disabledClass);o.disabled.push(index);o.disabled.sort();this.element.triggerHandler('tabsdisable',[this.ui(this.$tabs[index],this.$panels[index])],o.disable);}},select:function(index){if(typeof index=='string')
index=this.$tabs.index(this.$tabs.filter('[href$='+index+']')[0]);this.$tabs.eq(index).trigger(this.options.event);},load:function(index,callback){var self=this,o=this.options,$a=this.$tabs.eq(index),a=$a[0],bypassCache=callback==undefined||callback===false,url=$a.data('load.tabs');callback=callback||function(){};if(!url||!bypassCache&&$.data(a,'cache.tabs')){callback();return;}
var inner=function(parent){var $parent=$(parent),$inner=$parent.find('*:last');return $inner.length&&$inner||$parent;};var cleanup=function(){self.$tabs.filter('.'+o.loadingClass).removeClass(o.loadingClass).each(function(){if(o.spinner)
inner(this).parent().html(inner(this).data('label.tabs'));});self.xhr=null;};if(o.spinner){var label=inner(a).html();inner(a).wrapInner('<em></em>').find('em').data('label.tabs',label).html(o.spinner);}
var ajaxOptions=$.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(a.hash).html(r);cleanup();if(o.cache)
$.data(a,'cache.tabs',true);$(self.element).triggerHandler('tabsload',[self.ui(self.$tabs[index],self.$panels[index])],o.load);o.ajaxOptions.success&&o.ajaxOptions.success(r,s);callback();}});if(this.xhr){this.xhr.abort();cleanup();}
$a.addClass(o.loadingClass);setTimeout(function(){self.xhr=$.ajax(ajaxOptions);},0);},url:function(index,url){this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs',url);},destroy:function(){var o=this.options;this.element.unbind('.tabs').removeClass(o.navClass).removeData('tabs');this.$tabs.each(function(){var href=$.data(this,'href.tabs');if(href)
this.href=href;var $this=$(this).unbind('.tabs');$.each(['href','load','cache'],function(i,prefix){$this.removeData(prefix+'.tabs');});});this.$lis.add(this.$panels).each(function(){if($.data(this,'destroy.tabs'))
$(this).remove();else
$(this).removeClass([o.selectedClass,o.unselectClass,o.disabledClass,o.panelClass,o.hideClass].join(' '));});}});$.ui.tabs.defaults={unselect:false,event:'click',disabled:[],cookie:null,spinner:'Loading&#8230;',cache:false,idPrefix:'ui-tabs-',ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:'<div></div>',navClass:'ui-tabs-nav',selectedClass:'ui-tabs-selected',unselectClass:'ui-tabs-unselect',disabledClass:'ui-tabs-disabled',panelClass:'ui-tabs-panel',hideClass:'ui-tabs-hide',loadingClass:'ui-tabs-loading'};$.ui.tabs.getter="length";$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){continuing=continuing||false;var self=this,t=this.options.selected;function start(){self.rotation=setInterval(function(){t=++t<self.$tabs.length?t:0;self.select(t);},ms);}
function stop(e){if(!e||e.clientX){clearInterval(self.rotation);}}
if(ms){start();if(!continuing)
this.$tabs.bind(this.options.event,stop);else
this.$tabs.bind(this.options.event,function(){stop();t=self.options.selected;start();});}
else{stop();this.$tabs.unbind(this.options.event,stop);}}});})(jQuery);

/* linked select */
(function($){
   $.fn.linkedSelect = function(url,destination,params) {
      var params = $.extend({
         firstOption : 'Please Select',
         loadingText : 'Loading...'
      },params);
      var $dest = $(destination);
      return this.each(function(){
         $(this).bind('change', function() {
            var $$ = $(this);
            $dest.attr('disabled','false')
                 .append('<option value="">' +params.loadingText+ '</option>')
                 .ajaxStart(function(){
                    $$.show();
            });
            $.getJSON(url,{str: $$.val() }, function(j){
               if (j.length > 0) {
									var options = '<option value="">' +params.firstOption+ '</option>';
                  var open = false;
                  for (var i = 0; i < j.length; i++) {
                     if(j[i].optionGroupValue!=null){
                        if(open) {
                           options += '</optgroup>';
                        }
                        options += '<optgroup label="' + j[i].optionGroupDisplay + '">';
                        open = true;
                     } else {
                        options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
                     }
                  }
                  if(open) {
                     options += '</optgroup>';
                  }
               } else {
                  var options = '<option value="">No Results Found</option>';
               }
               $dest.removeAttr('disabled')
                    .html(options)
                    .find('option:first')
                    .attr('selected', 'selected');
            }); // end getJSON
         });  // end change
      }); // end return each
   };  // end function
})(jQuery);

(function($){
   $.fn.linkedSelectSearch = function(url,destination,search,search2) {
      var $dest = $(destination);
      $.getJSON(url,{str: search}, function(j){
               if (j.length > 0) {
                  var options = '<option value="">' +params.firstOption+ '</option>';
                  var open = false;
                  for (var i = 0; i < j.length; i++) {
                     if(j[i].optionGroupValue!=null){
                        if(open) {
                           options += '</optgroup>';
                        }
                        options += '<optgroup label="' + j[i].optionGroupDisplay + '">';
                        open = true;
                     } else {
                        options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
                     }
                  }
                  if(open) {
                     options += '</optgroup>';
                  }
               } else {
         var options = '<option value="">No Results Found<\/option>';
      }
      $dest.removeAttr('disabled')
           .html(options);
      $(""+destination+" option[value='"+search2+"']").attr("selected","selected");
      });
   };  // end function
})(jQuery);

function showPage(div,url){
	$(div).load(url);
}
function getJson(url,strval,div,str2) {
   var randomnumber=Math.floor(Math.random()*9999999999999);
	$.getJSON(url+"&r="+randomnumber,{str: strval}, function(j){

	if (j.length > 0) {
		var options = '<option value="">Please Select<\/option>';
		var open = false;
		for (var i = 0; i < j.length; i++) {
			if(j[i].optionGroupValue!=null){
				if(open) {
					options += '<\/optgroup>';
				}
				options += '<optgroup label="' + j[i].optionGroupDisplay + '">';
				open = true;
			} else {
				options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '<\/option>';
			}
		}
		if(open) {
			options += '<\/optgroup>';
		}
	} else {
		var options = '<option value="">No Results Found<\/option>';
	}
	$(div).removeAttr('disabled')
		  .html(options);
	$(div+" option[value='"+str2+"']").attr("selected","selected");
	});
}

/*livequery*/
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;$.livequery.run(q.id);return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)this.elements.unbind(this.type,this.fn);else if(this.fn2)this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)$.event.remove(el,query.type,query.fn);});}else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id);}else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)r.context=a.context,r.selector=a.selector;if(typeof a=='string')r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);

/*pngfix*/
(function($) {

jQuery.fn.pngFix = function(settings) {

	// Settings
	settings = jQuery.extend({
		blankgif: 'blank.gif'
	}, settings);

	var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
	var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

	if (jQuery.browser.msie && (ie55 || ie6)) {

		//fix images with png-source
		jQuery(this).find("img[@src$=.png]").each(function() {

			jQuery(this).attr('width',jQuery(this).width());
			jQuery(this).attr('height',jQuery(this).height());

			var prevStyle = '';
			var strNewHTML = '';
			var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
			var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
			var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
			var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
			var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
			var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
			if (this.style.border) {
				prevStyle += 'border:'+this.style.border+';';
				this.style.border = '';
			}
			if (this.style.padding) {
				prevStyle += 'padding:'+this.style.padding+';';
				this.style.padding = '';
			}
			if (this.style.margin) {
				prevStyle += 'margin:'+this.style.margin+';';
				this.style.margin = '';
			}
			var imgStyle = (this.style.cssText);

			strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt;
			strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;
			strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
			strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');';
			strNewHTML += imgStyle+'"></span>';
			if (prevStyle != ''){
				strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'+'">' + strNewHTML + '</span>';
			}

			jQuery(this).hide();
			jQuery(this).after(strNewHTML);

		});

		// fix css background pngs
		jQuery(this).find("*").each(function(){
			var bgIMG = jQuery(this).css('background-image');
			if(bgIMG.indexOf(".png")!=-1){
				var iebg = bgIMG.split('url("')[1].split('")')[0];
				jQuery(this).css('background-image', 'none');
				jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
			}
		});
		
		//fix input with png-source
		jQuery(this).find("input[@src$=.png]").each(function() {
			var bgIMG = jQuery(this).attr('src');
			jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
   		jQuery(this).attr('src', settings.blankgif)
		});
	}
	return jQuery;

};

})(jQuery);

/*cycle*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4($){8 n=\'2.26\';8 q=$.22.23&&/30 6.0/.1t(31.32);4 1p(){7(24.25&&24.25.1p)24.25.1p(\'[B] \'+33.34.35.36(37,\'\'))};$.E.B=4(m){O A.1q(4(){7(m===38||m===P)m={};7(m.27==2w){39(m){28\'3a\':7(A.U)1D(A.U);A.U=0;$(A).1K(\'B.29\',\'\');O;28\'2a\':A.1l=1;O;28\'3b\':A.1l=0;O;3c:m={1r:m}}}Q 7(m.27==3d){8 c=m;m=$(A).1K(\'B.29\');7(!m){1p(\'3e 1u 3f, 3g 1u 1L 2x\');O}7(c<0||c>=m.2b.L){1p(\'3h 2x 1E: \'+c);O}m.N=c;7(A.U){1D(A.U);A.U=0}1m(m.2b,m,1,c>=m.1d);O}7(A.U)1D(A.U);A.U=0;A.1l=0;8 d=$(A);8 e=m.2c?$(m.2c,A):d.3i();8 f=e.3j();7(f.L<2){1p(\'3k; 3l 3m 3n: \'+f.L);O}8 g=$.3o({},$.E.B.2y,m||{},$.2z?d.2z():$.3p?d.1K():{});7(g.2d)g.2e=g.2f||f.L;d.1K(\'B.29\',g);g.1M=A;g.2b=f;g.H=g.H?[g.H]:[];g.1i=g.1i?[g.1i]:[];g.1i.2A(4(){g.2g=0});7(g.1v)g.1i.J(4(){1m(f,g,0,!g.1w)});7(q&&g.1N&&!g.2B)2h(e);8 h=A.3q;g.D=W((h.1F(/w:(\\d+)/)||[])[1])||g.D;g.C=W((h.1F(/h:(\\d+)/)||[])[1])||g.C;g.X=W((h.1F(/t:(\\d+)/)||[])[1])||g.X;7(d.u(\'1O\')==\'3r\')d.u(\'1O\',\'3s\');7(g.D)d.D(g.D);7(g.C&&g.C!=\'1P\')d.C(g.C);7(g.1j){g.1n=[];1G(8 i=0;i<f.L;i++)g.1n.J(i);g.1n.3t(4(a,b){O 3u.1j()-0.5});g.Y=0;g.1f=g.1n[0]}Q 7(g.1f>=f.L)g.1f=0;8 j=g.1f||0;e.u({1O:\'2C\',x:0,9:0}).T().1q(4(i){8 z=j?i>=j?f.L-(i-j):j-i:f.L-i;$(A).u(\'z-1E\',z)});$(f[j]).u(\'1g\',1).S();7($.22.23)f[j].2D.2E(\'2i\');7(g.1k&&g.D)e.D(g.D);7(g.1k&&g.C&&g.C!=\'1P\')e.C(g.C);7(g.2a)d.3v(4(){A.1l=1},4(){A.1l=0});8 k=$.E.B.M[g.1r];7($.2F(k))k(d,e,g);Q 7(g.1r!=\'2j\')1p(\'3w 3x: \'+g.1r);e.1q(4(){8 a=$(A);A.Z=(g.1k&&g.C)?g.C:a.C();A.11=(g.1k&&g.D)?g.D:a.D()});g.y=g.y||{};g.I=g.I||{};g.G=g.G||{};e.1u(\':2k(\'+j+\')\').u(g.y);7(g.1e)$(e[j]).u(g.1e);7(g.X){7(g.19.27==2w)g.19={3y:3z,3A:3B}[g.19]||3C;7(!g.1Q)g.19=g.19/2;3D((g.X-g.19)<3E)g.X+=g.19}7(g.2l)g.1R=g.1S=g.2l;7(!g.1x)g.1x=g.19;7(!g.1H)g.1H=g.19;g.2G=f.L;g.1d=j;7(g.1j){g.N=g.1d;7(++g.Y==f.L)g.Y=0;g.N=g.1n[g.Y]}Q g.N=g.1f>=(f.L-1)?0:g.1f+1;8 l=e[j];7(g.H.L)g.H[0].1T(l,[l,l,g,2H]);7(g.1i.L>1)g.1i[1].1T(l,[l,l,g,2H]);7(g.1I&&!g.18)g.18=g.1I;7(g.18)$(g.18).2m(\'1I\',4(){O 1L(f,g,g.1w?-1:1)});7(g.2n)$(g.2n).2m(\'1I\',4(){O 1L(f,g,g.1w?1:-1)});7(g.1o)2I(f,g);g.3F=4(a){8 b=$(a),s=b[0];7(!g.2f)g.2e++;f.J(s);7(g.1a)g.1a.J(s);g.2G=f.L;b.u(\'1O\',\'2C\').2J(d);7(q&&g.1N&&!g.2B)2h(b);7(g.1k&&g.D)b.D(g.D);7(g.1k&&g.C&&g.C!=\'1P\')e.C(g.C);s.Z=(g.1k&&g.C)?g.C:b.C();s.11=(g.1k&&g.D)?g.D:b.D();b.u(g.y);7(g.1o)$.E.B.2o(f.L-1,s,$(g.1o),f,g);7(1U g.12==\'4\')g.12(b)};7(g.X||g.1v)A.U=1V(4(){1m(f,g,0,!g.1w)},g.1v?10:g.X+(g.2K||0))})};4 1m(a,b,c,d){7(b.2g)O;8 p=b.1M,1y=a[b.1d],18=a[b.N];7(p.U===0&&!c)O;7(!c&&!p.1l&&((b.2d&&(--b.2e<=0))||(b.1W&&!b.1j&&b.N<b.1d))){7(b.2p)b.2p(b);O}7(c||!p.1l){7(b.H.L)$.1q(b.H,4(i,o){o.1T(18,[1y,18,b,d])});8 e=4(){7($.22.23&&b.1N)A.2D.2E(\'2i\');$.1q(b.1i,4(i,o){o.1T(18,[1y,18,b,d])})};7(b.N!=b.1d){b.2g=1;7(b.1X)b.1X(1y,18,b,e,d);Q 7($.2F($.E.B[b.1r]))$.E.B[b.1r](1y,18,b,e);Q $.E.B.2j(1y,18,b,e,c&&b.2L)}7(b.1j){b.1d=b.N;7(++b.Y==a.L)b.Y=0;b.N=b.1n[b.Y]}Q{8 f=(b.N+1)==a.L;b.N=f?0:b.N+1;b.1d=f?a.L-1:b.N-1}7(b.1o)$.E.B.2q(b.1o,b.1d)}7(b.X&&!b.1v)p.U=1V(4(){1m(a,b,0,!b.1w)},b.X);Q 7(b.1v&&p.1l)p.U=1V(4(){1m(a,b,0,!b.1w)},10)};$.E.B.2q=4(a,b){$(a).3G(\'a\').3H(\'2M\').2i(\'a:2k(\'+b+\')\').3I(\'2M\')};4 1L(a,b,c){8 p=b.1M,X=p.U;7(X){1D(X);p.U=0}7(b.1j&&c<0){b.Y--;7(--b.Y==-2)b.Y=a.L-2;Q 7(b.Y==-1)b.Y=a.L-1;b.N=b.1n[b.Y]}Q 7(b.1j){7(++b.Y==a.L)b.Y=0;b.N=b.1n[b.Y]}Q{b.N=b.1d+c;7(b.N<0){7(b.1W)O 1Y;b.N=a.L-1}Q 7(b.N>=a.L){7(b.1W)O 1Y;b.N=0}}7(b.1Z&&1U b.1Z==\'4\')b.1Z(c>0,b.N,a[b.N]);1m(a,b,1,c>=0);O 1Y};4 2I(a,b){8 c=$(b.1o);$.1q(a,4(i,o){$.E.B.2o(i,o,c,a,b)});$.E.B.2q(b.1o,b.1f)};$.E.B.2o=4(i,a,b,c,d){8 e=(1U d.2r==\'4\')?$(d.2r(i,a)):$(\'<a 3J="#">\'+(i+1)+\'</a>\');7(e.3K(\'3L\').L==0)e.2J(b);e.2m(d.2N,4(){d.N=i;8 p=d.1M,X=p.U;7(X){1D(X);p.U=0}7(1U d.2s==\'4\')d.2s(d.N,c[d.N]);1m(c,d,1,d.1d<i);O 1Y})};4 2h(b){4 20(s){8 s=W(s).3M(16);O s.L<2?\'0\'+s:s};4 2O(e){1G(;e&&e.3N.3O()!=\'3P\';e=e.3Q){8 v=$.u(e,\'2P-2Q\');7(v.3R(\'3S\')>=0){8 a=v.1F(/\\d+/g);O\'#\'+20(a[0])+20(a[1])+20(a[2])}7(v&&v!=\'3T\')O v}O\'#3U\'};b.1q(4(){$(A).u(\'2P-2Q\',2O(A))})};$.E.B.2j=4(a,b,c,d,e){8 f=$(a),$n=$(b);$n.u(c.y);8 g=e?1:c.1x;8 h=e?1:c.1H;8 i=e?P:c.1R;8 j=e?P:c.1S;8 k=4(){$n.21(c.I,g,i,d)};f.21(c.G,h,j,4(){7(c.K)f.u(c.K);7(!c.1Q)k()});7(c.1Q)k()};$.E.B.M={2R:4(a,b,c){b.1u(\':2k(\'+c.1f+\')\').u(\'1g\',0);c.H.J(4(){$(A).S()});c.I={1g:1};c.G={1g:0};c.y={1g:0};c.K={R:\'V\'}}};$.E.B.3V=4(){O n};$.E.B.2y={1r:\'2R\',X:3W,1v:0,19:3X,1x:P,1H:P,18:P,2n:P,1Z:P,1o:P,2s:P,2N:\'1I\',2r:P,H:P,1i:P,2p:P,2l:P,1R:P,1S:P,1J:P,I:P,G:P,y:P,K:P,1X:P,C:\'1P\',1f:0,1Q:1,1j:0,1k:0,2a:0,2d:0,2f:0,2K:0,2c:P,1N:0,1W:0,2L:0}})(2S);(4($){$.E.B.M.3Y=4(d,e,f){d.u(\'17\',\'1b\');f.H.J(4(a,b,c){$(A).S();c.y.x=b.1z;c.G.x=0-a.1z});f.1e={x:0};f.I={x:0};f.K={R:\'V\'}};$.E.B.M.3Z=4(d,e,f){d.u(\'17\',\'1b\');f.H.J(4(a,b,c){$(A).S();c.y.x=0-b.1z;c.G.x=a.1z});f.1e={x:0};f.I={x:0};f.K={R:\'V\'}};$.E.B.M.40=4(d,e,f){d.u(\'17\',\'1b\');f.H.J(4(a,b,c){$(A).S();c.y.9=b.1A;c.G.9=0-a.1A});f.1e={9:0};f.I={9:0}};$.E.B.M.41=4(d,e,f){d.u(\'17\',\'1b\');f.H.J(4(a,b,c){$(A).S();c.y.9=0-b.1A;c.G.9=a.1A});f.1e={9:0};f.I={9:0}};$.E.B.M.42=4(f,g,h){f.u(\'17\',\'1b\').D();h.H.J(4(a,b,c,d){$(A).S();8 e=a.1A,2t=b.1A;c.y=d?{9:2t}:{9:-2t};c.I.9=0;c.G.9=d?-e:e;g.1u(a).u(c.y)});h.1e={9:0};h.K={R:\'V\'}};$.E.B.M.43=4(f,g,h){f.u(\'17\',\'1b\');h.H.J(4(a,b,c,d){$(A).S();8 e=a.1z,2u=b.1z;c.y=d?{x:-2u}:{x:2u};c.I.x=0;c.G.x=d?e:-e;g.1u(a).u(c.y)});h.1e={x:0};h.K={R:\'V\'}};$.E.B.M.44=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.12=4(a){a.T()};f.y={F:2};f.I={D:\'S\'};f.G={D:\'T\'}};$.E.B.M.45=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.12=4(a){a.T()};f.y={F:2};f.I={C:\'S\'};f.G={C:\'T\'}};$.E.B.M.1J=4(g,h,j){8 w=g.u(\'17\',\'2T\').D();h.u({9:0,x:0});j.H.J(4(){$(A).S()});j.19=j.19/2;j.1j=0;j.1J=j.1J||{9:-w,x:15};j.1a=[];1G(8 i=0;i<h.L;i++)j.1a.J(h[i]);1G(8 i=0;i<j.1f;i++)j.1a.J(j.1a.2U());j.1X=4(a,b,c,d,e){8 f=e?$(a):$(b);f.21(c.1J,c.1x,c.1R,4(){e?c.1a.J(c.1a.2U()):c.1a.2A(c.1a.46());7(e)1G(8 i=0,2v=c.1a.L;i<2v;i++)$(c.1a[i]).u(\'z-1E\',2v-i);Q{8 z=$(a).u(\'z-1E\');f.u(\'z-1E\',W(z)+1)}f.21({9:0,x:0},c.1H,c.1S,4(){$(e?A:a).T();7(d)d()})})};j.12=4(a){a.T()}};$.E.B.M.47=4(d,e,f){f.H.J(4(a,b,c){$(A).S();c.y.x=b.Z;c.I.C=b.Z});f.12=4(a){a.T()};f.1e={x:0};f.y={C:0};f.I={x:0};f.G={C:0};f.K={R:\'V\'}};$.E.B.M.48=4(d,e,f){f.H.J(4(a,b,c){$(A).S();c.I.C=b.Z;c.G.x=a.Z});f.12=4(a){a.T()};f.1e={x:0};f.y={x:0,C:0};f.G={C:0};f.K={R:\'V\'}};$.E.B.M.49=4(d,e,f){f.H.J(4(a,b,c){$(A).S();c.y.9=b.11;c.I.D=b.11});f.12=4(a){a.T()};f.y={D:0};f.I={9:0};f.G={D:0};f.K={R:\'V\'}};$.E.B.M.4a=4(d,e,f){f.H.J(4(a,b,c){$(A).S();c.I.D=b.11;c.G.9=a.11});f.12=4(a){a.T()};f.y={9:0,D:0};f.I={9:0};f.G={D:0};f.K={R:\'V\'}};$.E.B.M.2V=4(d,e,f){f.1e={x:0,9:0};f.K={R:\'V\'};f.H.J(4(a,b,c){$(A).S();c.y={D:0,C:0,x:b.Z/2,9:b.11/2};c.K={R:\'V\'};c.I={x:0,9:0,D:b.11,C:b.Z};c.G={D:0,C:0,x:a.Z/2,9:a.11/2};$(a).u(\'F\',2);$(b).u(\'F\',1)});f.12=4(a){a.T()}};$.E.B.M.4b=4(d,e,f){f.H.J(4(a,b,c){c.y={D:0,C:0,1g:1,9:b.11/2,x:b.Z/2,F:1};c.I={x:0,9:0,D:b.11,C:b.Z}});f.G={1g:0};f.K={F:0}};$.E.B.M.4c=4(d,e,f){8 w=d.u(\'17\',\'1b\').D();e.S();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.y={9:w,F:2};f.K={F:1};f.I={9:0};f.G={9:w}};$.E.B.M.4d=4(d,e,f){8 h=d.u(\'17\',\'1b\').C();e.S();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.y={x:h,F:2};f.K={F:1};f.I={x:0};f.G={x:h}};$.E.B.M.4e=4(d,e,f){8 h=d.u(\'17\',\'1b\').C();8 w=d.D();e.S();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.y={x:h,9:w,F:2};f.K={F:1};f.I={x:0,9:0};f.G={x:h,9:w}};$.E.B.M.4f=4(d,e,f){f.H.J(4(a,b,c){c.y={9:A.11/2,D:0,F:2};c.I={9:0,D:A.11};c.G={9:0};$(a).u(\'F\',1)});f.12=4(a){a.T().u(\'F\',1)}};$.E.B.M.4g=4(d,e,f){f.H.J(4(a,b,c){c.y={x:A.Z/2,C:0,F:2};c.I={x:0,C:A.Z};c.G={x:0};$(a).u(\'F\',1)});f.12=4(a){a.T().u(\'F\',1)}};$.E.B.M.4h=4(d,e,f){f.H.J(4(a,b,c){c.y={9:b.11/2,D:0,F:1,R:\'1B\'};c.I={9:0,D:A.11};c.G={9:a.11/2,D:0};$(a).u(\'F\',2)});f.12=4(a){a.T()};f.K={F:1,R:\'V\'}};$.E.B.M.4i=4(d,e,f){f.H.J(4(a,b,c){c.y={x:b.Z/2,C:0,F:1,R:\'1B\'};c.I={x:0,C:A.Z};c.G={x:a.Z/2,C:0};$(a).u(\'F\',2)});f.12=4(a){a.T()};f.K={F:1,R:\'V\'}};$.E.B.M.4j=4(e,f,g){8 d=g.2W||\'9\';8 w=e.u(\'17\',\'1b\').D();8 h=e.C();g.H.J(4(a,b,c){c.y=c.y||{};c.y.F=2;c.y.R=\'1B\';7(d==\'2X\')c.y.9=-w;Q 7(d==\'2Y\')c.y.x=h;Q 7(d==\'2Z\')c.y.x=-h;Q c.y.9=w;$(a).u(\'F\',1)});7(!g.I)g.I={9:0,x:0};7(!g.G)g.G={9:0,x:0};g.K=g.K||{};g.K.F=2;g.K.R=\'V\'};$.E.B.M.4k=4(e,f,g){8 d=g.2W||\'9\';8 w=e.u(\'17\',\'1b\').D();8 h=e.C();g.H.J(4(a,b,c){c.y.R=\'1B\';7(d==\'2X\')c.G.9=w;Q 7(d==\'2Y\')c.G.x=-h;Q 7(d==\'2Z\')c.G.x=h;Q c.G.9=-w;$(a).u(\'F\',2);$(b).u(\'F\',1)});g.12=4(a){a.T()};7(!g.I)g.I={9:0,x:0};g.y=g.y||{};g.y.x=0;g.y.9=0;g.K=g.K||{};g.K.F=1;g.K.R=\'V\'};$.E.B.M.4l=4(d,e,f){8 w=d.u(\'17\',\'2T\').D();8 h=d.C();f.H.J(4(a,b,c){$(a).u(\'F\',2);c.y.R=\'1B\';7(!c.G.9&&!c.G.x)c.G={9:w*2,x:-h/2,1g:0};Q c.G.1g=0});f.12=4(a){a.T()};f.y={9:0,x:0,F:1,1g:1};f.I={9:0};f.K={F:2,R:\'V\'}};$.E.B.M.4m=4(o,p,q){8 w=o.u(\'17\',\'1b\').D();8 h=o.C();q.y=q.y||{};8 s;7(q.1h){7(/4n/.1t(q.1h))s=\'1s(1c 1c \'+h+\'14 1c)\';Q 7(/4o/.1t(q.1h))s=\'1s(1c \'+w+\'14 \'+h+\'14 \'+w+\'14)\';Q 7(/4p/.1t(q.1h))s=\'1s(1c \'+w+\'14 1c 1c)\';Q 7(/4q/.1t(q.1h))s=\'1s(\'+h+\'14 \'+w+\'14 \'+h+\'14 1c)\';Q 7(/2V/.1t(q.1h)){8 t=W(h/2);8 l=W(w/2);s=\'1s(\'+t+\'14 \'+l+\'14 \'+t+\'14 \'+l+\'14)\'}}q.y.1h=q.y.1h||s||\'1s(1c 1c 1c 1c)\';8 d=q.y.1h.1F(/(\\d+)/g);8 t=W(d[0]),r=W(d[1]),b=W(d[2]),l=W(d[3]);q.H.J(4(g,i,j){7(g==i)O;8 k=$(g).u(\'F\',2);8 m=$(i).u({F:3,R:\'1B\'});8 n=1,1C=W((j.1x/13))-1;4 f(){8 a=t?t-W(n*(t/1C)):0;8 c=l?l-W(n*(l/1C)):0;8 d=b<h?b+W(n*((h-b)/1C||1)):h;8 e=r<w?r+W(n*((w-r)/1C||1)):w;m.u({1h:\'1s(\'+a+\'14 \'+e+\'14 \'+d+\'14 \'+c+\'14)\'});(n++<=1C)?1V(f,13):k.u(\'R\',\'V\')}f()});q.K={};q.I={9:0};q.G={9:0}}})(2S);',62,275,'||||function|||if|var|left|||||||||||||||||||||css|||top|cssBefore||this|cycle|height|width|fn|zIndex|animOut|before|animIn|push|cssAfter|length|transitions|nextSlide|return|null|else|display|show|hide|cycleTimeout|none|parseInt|timeout|randomIndex|cycleH||cycleW|onAddSlide||px|||overflow|next|speed|els|hidden|0px|currSlide|cssFirst|startingSlide|opacity|clip|after|random|fit|cyclePause|go|randomMap|pager|log|each|fx|rect|test|not|continuous|rev|speedIn|curr|offsetHeight|offsetWidth|block|count|clearTimeout|index|match|for|speedOut|click|shuffle|data|advance|container|cleartype|position|auto|sync|easeIn|easeOut|apply|typeof|setTimeout|nowrap|fxFn|false|prevNextClick|hex|animate|browser|msie|window|console||constructor|case|opts|pause|elements|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|bind|prev|createPagerAnchor|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|nextW|nextH|len|String|slide|defaults|metadata|unshift|cleartypeNoBg|absolute|style|removeAttribute|isFunction|slideCount|true|buildPager|appendTo|delay|fastOnEvent|activeSlide|pagerEvent|getBg|background|color|fade|jQuery|visible|shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|arguments|undefined|switch|stop|resume|default|Number|options|found|can|invalid|children|get|terminating|too|few|slides|extend|meta|className|static|relative|sort|Math|hover|unknown|transition|slow|600|fast|200|400|while|250|addSlide|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|parentNode|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t'.split('|'),0,{}));
	
/* idTabs ~ Sean Catchpole - Version 2.2 - MIT/GPL */
(function(){var dep={"jQuery":"http://code.jquery.com/jquery-latest.min.js"};var init=function(){(function($){$.fn.idTabs=function(){var s={};for(var i=0;i<arguments.length;++i){var a=arguments[i];switch(a.constructor){case Object:$.extend(s,a);break;case Boolean:s.change=a;break;case Number:s.start=a;break;case Function:s.click=a;break;case String:if(a.charAt(0)=='.')s.selected=a;else if(a.charAt(0)=='!')s.event=a;else s.start=a;break;}}
if(typeof s['return']=="function")
s.change=s['return'];return this.each(function(){$.idTabs(this,s);});}
$.idTabs=function(tabs,options){var meta=($.metadata)?$(tabs).metadata():{};var s=$.extend({},$.idTabs.settings,meta,options);if(s.selected.charAt(0)=='.')s.selected=s.selected.substr(1);if(s.event.charAt(0)=='!')s.event=s.event.substr(1);if(s.start==null)s.start=-1;var showId=function(){if($(this).is('.'+s.selected))
return s.change;var id="#"+this.href.split('#')[1];var aList=[];var idList=[];$("a",tabs).each(function(){if(this.href.match(/#/)){aList.push(this);idList.push("#"+this.href.split('#')[1]);}});if(s.click&&!s.click.apply(this,[id,idList,tabs,s]))return s.change;for(i in aList)$(aList[i]).removeClass(s.selected);for(i in idList)$(idList[i]).hide();$(this).addClass(s.selected);$(id).show();return s.change;}
var list=$("a[href*='#']",tabs).unbind(s.event,showId).bind(s.event,showId);list.each(function(){$("#"+this.href.split('#')[1]).hide();});var test=false;if((test=list.filter('.'+s.selected)).length);else if(typeof s.start=="number"&&(test=list.eq(s.start)).length);else if(typeof s.start=="string"&&(test=list.filter("[href*='#"+s.start+"']")).length);if(test){test.removeClass(s.selected);test.trigger(s.event);}
return s;}
$.idTabs.settings={start:0,change:false,click:null,selected:".selected",event:"!click"};$.idTabs.version="2.2";$(function(){$(".idTabs").idTabs();});})(jQuery);}
var check=function(o,s){s=s.split('.');while(o&&s.length)o=o[s.shift()];return o;}
var head=document.getElementsByTagName("head")[0];var add=function(url){var s=document.createElement("script");s.type="text/javascript";s.src=url;head.appendChild(s);}
var s=document.getElementsByTagName('script');var src=s[s.length-1].src;var ok=true;for(d in dep){if(check(this,d))continue;ok=false;add(dep[d]);}if(ok)return init();add(src);})();
	
/*clutip*/
;(function($) { 

  var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow, imgCount;
  $.fn.cluetip = function(js, options) {
    if (typeof js == 'object') {
      options = js;
      js = null;
    }
    return this.each(function(index) {
      var $this = $(this);      
      
      var opts = $.extend(false, {}, $.fn.cluetip.defaults, options || {}, $.metadata ? $this.metadata() : $.meta ? $this.data() : {});

      // start out with no contents (for ajax activation)
      var cluetipContents = false;
      var cluezIndex = parseInt(opts.cluezIndex, 10)-1;
      var isActive = false, closeOnDelay = 0;

      // create the cluetip divs
      if (!$('#cluetip').length) {
        $cluetipInner = $('<div id="cluetip-inner"></div>');
        $cluetipTitle = $('<h3 id="cluetip-title"></h3>');        
        $cluetipOuter = $('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);
        $cluetip = $('<div id="cluetip"></div>').css({zIndex: opts.cluezIndex})
        .append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();
        $('<div id="cluetip-waitimage"></div>').css({position: 'absolute', zIndex: cluezIndex-1})
        .insertBefore('#cluetip').hide();
        $cluetip.css({position: 'absolute', zIndex: cluezIndex});
        $cluetipOuter.css({position: 'relative', zIndex: cluezIndex+1});
        $cluetipArrows = $('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex: cluezIndex+1}).appendTo('#cluetip');
      }
      var dropShadowSteps = (opts.dropShadow) ? +opts.dropShadowSteps : 0;
      if (!$dropShadow) {
        $dropShadow = $([]);
        for (var i=0; i < dropShadowSteps; i++) {
          $dropShadow = $dropShadow.add($('<div></div>').css({zIndex: cluezIndex-i-1, opacity:.1, top: 1+i, left: 1+i}));
        };
        $dropShadow.css({position: 'absolute', backgroundColor: '#000'})
        .prependTo($cluetip);
      }
      var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass;
      if (!tipAttribute && !opts.splitTitle && !js) return true;
      // if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip      
      if (opts.local && opts.hideLocal) { $(tipAttribute + ':first').hide(); }
      var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10);
      // vertical measurement variables
      var tipHeight, wHeight;
      var defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px';
      var sTop, linkTop, posY, tipY, mouseY, baseline;
      // horizontal measurement variables
      var tipInnerWidth = isNaN(parseInt(opts.width, 10)) ? 275 : parseInt(opts.width, 10);
      var tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft'))||0) + (parseInt($cluetip.css('paddingRight'))||0) + dropShadowSteps;
      var linkWidth = this.offsetWidth;
      var linkLeft, posX, tipX, mouseX, winWidth;
            
      // parse the title
      var tipParts;
      var tipTitle = (opts.attribute != 'title') ? $this.attr(opts.titleAttribute) : '';
      if (opts.splitTitle) {
        if(tipTitle == undefined) {tipTitle = '';}
        tipParts = tipTitle.split(opts.splitTitle);
        tipTitle = tipParts.shift();
      }
      var localContent;

/***************************************      
* ACTIVATION
****************************************/
    
//activate clueTip
    var activate = function(event) {
      if (!opts.onActivate($this)) {
        return false;
      }
      isActive = true;
      $cluetip.removeClass().css({width: tipInnerWidth});
      if (tipAttribute == $this.attr('href')) {
        $this.css('cursor', opts.cursor);
      }
      $this.attr('title','');
      if (opts.hoverClass) {
        $this.addClass(opts.hoverClass);
      }
      linkTop = posY = $this.offset().top;
      linkLeft = $this.offset().left;
      mouseX = event.pageX;
      mouseY = event.pageY;
      if ($this[0].tagName.toLowerCase() != 'area') {
        sTop = $(document).scrollTop();
        winWidth = $(window).width();
      }
// position clueTip horizontally
      if (opts.positionBy == 'fixed') {
        posX = linkWidth + linkLeft + lOffset;
        $cluetip.css({left: posX});
      } else {
        posX = (linkWidth > linkLeft && linkLeft > tipWidth)
          || linkLeft + linkWidth + tipWidth + lOffset > winWidth 
          ? linkLeft - tipWidth - lOffset 
          : linkWidth + linkLeft + lOffset;
        if ($this[0].tagName.toLowerCase() == 'area' || opts.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse
          if (mouseX + 20 + tipWidth > winWidth) {  
            $cluetip.addClass(' cluetip-' + ctClass);
            posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'),10) + parseInt($cluetipInner.css('marginRight'),10) :  mouseX - (tipWidth/2);
          } else {
            posX = mouseX + lOffset;
          }
        }
        var pY = posX < 0 ? event.pageY + tOffset : event.pageY;
        $cluetip.css({left: (posX > 0 && opts.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0)});
      }
        wHeight = $(window).height();

      if (js) {
        $cluetipInner.html(js);
        cluetipShow(pY);
      }


      else if (tipParts) {
        var tpl = tipParts.length;
        for (var i=0; i < tpl; i++){
          if (i == 0) {
            $cluetipInner.html(tipParts[i]);
          } else { 
            $cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>');
          }            
        };
        cluetipShow(pY);
      }

      else if (!opts.local && tipAttribute.indexOf('#') != 0) {
        if (cluetipContents && opts.ajaxCache) {
          $cluetipInner.html(cluetipContents);
          cluetipShow(pY);
        }
        else {
          var ajaxSettings = opts.ajaxSettings;
          ajaxSettings.url = tipAttribute;
          ajaxSettings.beforeSend = function() {
            $cluetipOuter.children().empty();
            if (opts.waitImage) {
              $('#cluetip-waitimage')
              .css({top: mouseY+20, left: mouseX+20})
              .show();
            }
          };
         ajaxSettings.error = function() {
            if (isActive) {
              $cluetipInner.html('<i>sorry, the contents could not be loaded</i>');
            }
          };
          ajaxSettings.success = function(data) {
            cluetipContents = opts.ajaxProcess(data);
            if (isActive) {
              $cluetipInner.html(cluetipContents);
            }
          };
          ajaxSettings.complete = function() {
          	imgCount = $('#cluetip-inner img').length;
        		if (imgCount && !$.browser.opera) {
        		  $('#cluetip-inner img').load(function() {
          			imgCount--;
          			if (imgCount<1) {
          				$('#cluetip-waitimage').hide();
          			  if (isActive) cluetipShow(pY);
          			}
        		  }); 
        		} else {
      				$('#cluetip-waitimage').hide();
        		  if (isActive) cluetipShow(pY);    
        		} 
          };
          $.ajax(ajaxSettings);
        }
      } else if (opts.local){
        var $localContent = $(tipAttribute + ':first');
        var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('<div></div>').children().clone(true) : $localContent.html();
        $.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) : $cluetipInner.html(localCluetip);
        cluetipShow(pY);
      }
    };

// get dimensions and options for cluetip and prepare it to be shown
    var cluetipShow = function(bpY) {
      $cluetip.addClass('cluetip-' + ctClass);
      
      if (opts.truncate) { 
        var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...';
        $cluetipInner.html($truncloaded);
      }
      function doNothing() {}; //empty function
      tipTitle ? $cluetipTitle.show().html(tipTitle) : (opts.showTitle) ? $cluetipTitle.show().html('&nbsp;') : $cluetipTitle.hide();
      if (opts.sticky) {
        var $closeLink = $('<div id="cluetip-close"><a href="#">' + opts.closeText + '</a></div>');
        (opts.closePosition == 'bottom') ? $closeLink.appendTo($cluetipInner) : (opts.closePosition == 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner);
        $closeLink.click(function() {
          cluetipClose();
          return false;
        });
        if (opts.mouseOutClose) {
          if ($.fn.hoverIntent && opts.hoverIntent) { 
            $cluetip.hoverIntent({
              over: doNothing, 
              timeout: opts.hoverIntent.timeout,  
              out: function() { $closeLink.trigger('click'); }
            });
          } else {
            $cluetip.hover(doNothing, 
            function() {$closeLink.trigger('click'); });
          }
        } else {
          $cluetip.unbind('mouseout');
        }
      }
// now that content is loaded, finish the positioning 
      var direction = '';
      $cluetipOuter.css({overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight});
      tipHeight = defHeight == 'auto' ? Math.max($cluetip.outerHeight(),$cluetip.height()) : parseInt(defHeight,10);   
      tipY = posY;
      baseline = sTop + wHeight;
      if (opts.positionBy == 'fixed') {
        tipY = posY - opts.dropShadowSteps + tOffset;
      } else if ( (posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || opts.positionBy == 'bottomTop') {
        if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) { 
          tipY = mouseY - tipHeight - tOffset;
          direction = 'top';
        } else { 
          tipY = mouseY + tOffset;
          direction = 'bottom';
        }
      } else if ( posY + tipHeight + tOffset > baseline ) {
        tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset;
      } else if ($this.css('display') == 'block' || $this[0].tagName.toLowerCase() == 'area' || opts.positionBy == "mouse") {
        tipY = bpY - tOffset;
      } else {
        tipY = posY - opts.dropShadowSteps;
      }
      if (direction == '') {
        posX < linkLeft ? direction = 'left' : direction = 'right';
      }
      $cluetip.css({top: tipY + 'px'}).removeClass().addClass('clue-' + direction + '-' + ctClass).addClass(' cluetip-' + ctClass);
      if (opts.arrows) { // set up arrow positioning to align with element
        var bgY = (posY - tipY - opts.dropShadowSteps);
        $cluetipArrows.css({top: (/(left|right)/.test(direction) && posX >=0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : ''}).show();
      } else {
        $cluetipArrows.hide();
      }

      $dropShadow.hide();
      $cluetip.hide()[opts.fx.open](opts.fx.open != 'show' && opts.fx.openSpeed);
      if (opts.dropShadow) $dropShadow.css({height: tipHeight, width: tipInnerWidth}).show();
      if ($.fn.bgiframe) { $cluetip.bgiframe(); }
      // trigger the optional onShow function
      if (opts.delayedClose > 0) {
        closeOnDelay = setTimeout(cluetipClose, opts.delayedClose);
      }
      opts.onShow($cluetip, $cluetipInner);
      
    };

    var inactivate = function() {
      isActive = false;
      $('#cluetip-waitimage').hide();
      if (!opts.sticky || (/click|toggle/).test(opts.activation) ) {
        cluetipClose();
clearTimeout(closeOnDelay);        
      };
      if (opts.hoverClass) {
        $this.removeClass(opts.hoverClass);
      }
      $('.cluetip-clicked').removeClass('cluetip-clicked');
    };
// close cluetip and reset some things
    var cluetipClose = function() {
      $cluetipOuter 
      .parent().hide().removeClass().end()
      .children().empty();
      if (tipTitle) {
        $this.attr(opts.titleAttribute, tipTitle);
      }
      $this.css('cursor','');
      if (opts.arrows) $cluetipArrows.css({top: ''});
    };

  // activate by click
      if ( (/click|toggle/).test(opts.activation) ) {
        $this.click(function(event) {
          if ($cluetip.is(':hidden') || !$this.is('.cluetip-clicked')) {
            activate(event);
            $('.cluetip-clicked').removeClass('cluetip-clicked');
            $this.addClass('cluetip-clicked');

          } else {
            inactivate(event);

          }
          this.blur();
          return false;
        });
  // activate by focus; inactivate by blur    
      } else if (opts.activation == 'focus') {
        $this.focus(function(event) {
          activate(event);
        });
        $this.blur(function(event) {
          inactivate(event);
        });
  // activate by hover
    // clicking is returned false if cluetip url is same as href url
      } else {
        $this.click(function() {
          if ($this.attr('href') && $this.attr('href') == tipAttribute && !opts.clickThrough) {
            return false;
          }
        });
        //set up mouse tracking
        var mouseTracks = function(evt) {
          if (opts.tracking == true) {
            var trackX = posX - evt.pageX;
            var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY;
            $this.mousemove(function(evt) {
              $cluetip.css({left: evt.pageX + trackX, top: evt.pageY + trackY });
            });
          }
        };
        if ($.fn.hoverIntent && opts.hoverIntent) {
          $this.mouseover(function() {$this.attr('title',''); })
          .hoverIntent({
            sensitivity: opts.hoverIntent.sensitivity,
            interval: opts.hoverIntent.interval,  
            over: function(event) {
              activate(event);
              mouseTracks(event);
            }, 
            timeout: opts.hoverIntent.timeout,  
            out: function(event) {inactivate(event); $this.unbind('mousemove');}
          });           
        } else {
          $this.hover(function(event) {
            activate(event);
            mouseTracks(event);
          }, function(event) {
            inactivate(event);
            $this.unbind('mousemove');
          });
        }
      }
    });
  };
  

  $.fn.cluetip.defaults = { 
    width:            275, 
    height:           'auto',
    cluezIndex:       97, 
    positionBy:       'auto',
    topOffset:        15,
    leftOffset:       15,
    local:            false, 
    hideLocal:        true,
    attribute:        'rel', 
    titleAttribute:   'title',
    splitTitle:       '',
    showTitle:        true,
    cluetipClass:     'default',
    hoverClass:       '',
    waitImage:        true,
    cursor:           'help',
    arrows:           false,
    dropShadow:       true,
    dropShadowSteps:  6,
    sticky:           false,
    mouseOutClose:    false, 
    activation:       'hover', 
    clickThrough:     false, 
    tracking:         false,  
    delayedClose:     0,   
    closePosition:    'title',   
    closeText:        'Close',  
    truncate:         0,       

    // effect and speed for opening clueTips
    fx: {             
                      open:       'show', // can be 'show' or 'slideDown' or 'fadeIn'
                      openSpeed:  ''
    },     

    // settings for when hoverIntent plugin is used             
    hoverIntent: {    
                      sensitivity:  3,
              			  interval:     50,
              			  timeout:      0
    },

    // function to run just before clueTip is shown.           
    onActivate:       function(e) {return true;},

    // function to run just after clueTip is shown.
    onShow:           function(ct, c){},
    
    // whether to cache results of ajax request to avoid unnecessary hits to server    
    ajaxCache:        true,  

    // process data retrieved via xhr before it's displayed
    ajaxProcess:      function(data) {
                        data = data.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g, '').replace(/<(link|title)(.|\s)*?\/(link|title)>/g,'');
                        return data;
    },                

    // can pass in standard $.ajax() parameters, not including error, complete, success, and url
    ajaxSettings: {   
                      dataType: 'html'
    },
    debug: false
  };


  var insertionType = 'appendTo', insertionElement = 'body';
  $.cluetip = {};
  $.cluetip.setup = function(options) {
    if (options && options.insertionType && (options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)) {
      insertionType = options.insertionType;
    }
    if (options && options.insertionElement) {
      insertionElement = options.insertionElement;
    }
  };
  
})(jQuery);

/*facebox*/
(function($) {
  $.facebox = function(data, klass) {
    $.facebox.loading()

    if (data.ajax) fillFaceboxFromAjax(data.ajax)
    else if (data.image) fillFaceboxFromImage(data.image)
    else if (data.div) fillFaceboxFromHref(data.div)
    else if ($.isFunction(data)) data.call($)
    else $.facebox.reveal(data, klass)
  }

  /*
   * Public, $.facebox methods
   */

  $.extend($.facebox, {
    settings: {
      opacity      : 1,
      overlay      : true,
      loadingImage : '/facebox/loading.gif',
      closeImage   : '/facebox/bt-close.gif',
      imageTypes   : [ 'png', 'jpg', 'jpeg', 'gif' ],
      faceboxHtml  : '\
    <div id="facebox" style="display:none;"> \
      <div class="popup"> \
        <table> \
          <tbody> \
            <tr> \
              <td class="tl"/><td class="b"/><td class="tr"/> \
            </tr> \
            <tr> \
              <td class="b"/> \
              <td class="body"> \
                <div class="header"> \
                  <a href="#" class="save" rel="savecourse"> \
                    <img src="/facebox/bt-save.gif" title="save" class="save_image" rel="savecourse" /> \
                  </a> \
                  <a href="#" class="export"> \
                    <img src="/facebox/bt-export.gif" title="export" class="export_image" /> \
                  </a> \
                  <a href="#" class="close"> \
                    <img src="/facebox/bt-close.gif" title="close" class="close_image" /> \
                  </a> \
                </div> \
                <div class="content"> \
                </div> \
                <div class="footer"> \
                  <a href="#" class="save" rel="savecourse"> \
                    <img src="/facebox/bt-save.gif" title="save" class="save_image" rel="savecourse" /> \
                  </a> \
                  <a href="#" class="export"> \
                    <img src="/facebox/bt-export.gif" title="export" class="export_image" /> \
                  </a> \
                  <a href="#" class="close"> \
                    <img src="/facebox/bt-close.gif" title="close" class="close_image" /> \
                  </a> \
                </div> \
              </td> \
              <td class="b"/> \
            </tr> \
            <tr> \
              <td class="bl"/><td class="b"/><td class="br"/> \
            </tr> \
          </tbody> \
        </table> \
      </div> \
    </div>'
    },

    loading: function() {
      init()
      if ($('#facebox .loading').length == 1) return true
      showOverlay()

      $('#facebox .content').empty()
      $('#facebox .body').children().hide().end().
        append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>')

      $('#facebox').css({
        top:	getPageScroll()[1] + (getPageHeight() / 10),
        left:	385.5
      }).show()

      $(document).bind('keydown.facebox', function(e) {
        if (e.keyCode == 27) $.facebox.close()
        return true
      })
      $(document).trigger('loading.facebox')
    },

    reveal: function(data, klass) {
      $(document).trigger('beforeReveal.facebox')
      if (klass) $('#facebox .content').addClass(klass)
      $('#facebox .content').append(data)
      $('#facebox .loading').remove()
      $('#facebox .body').children().fadeIn('normal')
      $('#facebox').css('left', $(window).width() / 2 - ($('#facebox table').width() / 2))
      $(document).trigger('reveal.facebox').trigger('afterReveal.facebox')
    },

    close: function() {
      $(document).trigger('close.facebox')
      return false
    }
  })

  /*
   * Public, $.fn methods
   */

  $.fn.facebox = function(settings) {
    init(settings)

    function clickHandler() {
      $.facebox.loading(true)

      // support for rel="facebox.inline_popup" syntax, to add a class
      // also supports deprecated "facebox[.inline_popup]" syntax
      var klass = this.rel.match(/facebox\[?\.(\w+)\]?/)
      if (klass) klass = klass[1]

      fillFaceboxFromHref(this.href, klass)
      return false
    }

    return this.click(clickHandler)
  }

  /*
   * Private methods
   */

  // called one time to setup facebox on this page
  function init(settings) {
    if ($.facebox.settings.inited) return true
    else $.facebox.settings.inited = true

    $(document).trigger('init.facebox')
    makeCompatible()

    var imageTypes = $.facebox.settings.imageTypes.join('|')
    $.facebox.settings.imageTypesRegexp = new RegExp('\.' + imageTypes + '$', 'i')

    if (settings) $.extend($.facebox.settings, settings)
    $('body').append($.facebox.settings.faceboxHtml)

    var preload = [ new Image(), new Image() ]
    preload[0].src = $.facebox.settings.closeImage
    preload[1].src = $.facebox.settings.loadingImage

    $('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function() {
      preload.push(new Image())
      preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1')
    })

    $('#facebox .close').click($.facebox.close)
    $('#facebox .close_image').attr('src', $.facebox.settings.closeImage)
  }
  
  // getPageScroll() by quirksmode.com
  function getPageScroll() {
    var xScroll, yScroll;
    if (self.pageYOffset) {
      yScroll = self.pageYOffset;
      xScroll = self.pageXOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
      yScroll = document.documentElement.scrollTop;
      xScroll = document.documentElement.scrollLeft;
    } else if (document.body) {// all other Explorers
      yScroll = document.body.scrollTop;
      xScroll = document.body.scrollLeft;	
    }
    return new Array(xScroll,yScroll) 
  }

  // Adapted from getPageSize() by quirksmode.com
  function getPageHeight() {
    var windowHeight
    if (self.innerHeight) {	// all except Explorer
      windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
      windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
      windowHeight = document.body.clientHeight;
    }	
    return windowHeight
  }

  // Backwards compatibility
  function makeCompatible() {
    var $s = $.facebox.settings

    $s.loadingImage = $s.loading_image || $s.loadingImage
    $s.closeImage = $s.close_image || $s.closeImage
    $s.imageTypes = $s.image_types || $s.imageTypes
    $s.faceboxHtml = $s.facebox_html || $s.faceboxHtml
  }

  // Figures out what you want to display and displays it
  // formats are:
  //     div: #id
  //   image: blah.extension
  //    ajax: anything else
  function fillFaceboxFromHref(href, klass) {
    // div
    if (href.match(/#/)) {
      var url    = window.location.href.split('#')[0]
      var target = href.replace(url,'')
      $.facebox.reveal($(target).clone().show(), klass)

    // image
    } else if (href.match($.facebox.settings.imageTypesRegexp)) {
      fillFaceboxFromImage(href, klass)
    // ajax
    } else {
      fillFaceboxFromAjax(href, klass)
    }
  }

  function fillFaceboxFromImage(href, klass) {
    var image = new Image()
    image.onload = function() {
      $.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass)
    }
    image.src = href
  }

  function fillFaceboxFromAjax(href, klass) {
    $.get(href, function(data) { $.facebox.reveal(data, klass) })
  }

  function skipOverlay() {
    return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null 
  }

  function showOverlay() {
    if (skipOverlay()) return

    if ($('facebox_overlay').length == 0) 
      $("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')

    $('#facebox_overlay').hide().addClass("facebox_overlayBG")
      .css('opacity', $.facebox.settings.opacity)
      .click(function() { $(document).trigger('close.facebox') })
      .fadeIn(200)
    return false
  }

  function hideOverlay() {
    if (skipOverlay()) return

    $('#facebox_overlay').fadeOut(200, function(){
      $("#facebox_overlay").removeClass("facebox_overlayBG")
      $("#facebox_overlay").addClass("facebox_hide") 
      $("#facebox_overlay").remove()
    })
    
    return false
  }

  /*
   * Bindings
   */

  $(document).bind('close.facebox', function() {
    $(document).unbind('keydown.facebox')
    $('#facebox').fadeOut(function() {
      $('#facebox .content').removeClass().addClass('content')
      hideOverlay()
      $('#facebox .loading').remove()
    })
  })

})(jQuery);


/*custom js */


jQuery().ready(function() {
	//accordion for "questions"
	$('#acclist').accordion({
		 header: 'div.title', 
		 autoHeight: false,
		 alwaysOpen: false,
		 active: false
	});
	$('.acclist').accordion({
		 header: 'div.title', 
		 autoHeight: false,
		 alwaysOpen: false,
		 active: false
	});

	$('#acclist2').accordion({
		 header: 'div.title', 
		 autoHeight: false,
		 alwaysOpen: false
	});
	$('.acclist2').accordion({
		 header: 'div.title', 
		 autoHeight: false,
		 alwaysOpen: false
	});
	
	//tabs for providers and links
	$("#further-info ul").idTabs();
	$("#info-tabs ul").idTabs();

	
	//fade out the ajax loader image on load
	$("#contentLoading").hide("fast");
	$(".contentLoading").hide("fast");
	
   
   
	$(".searchclick").click(function() {
		$("#globalsearchtext").focus();
	});
	
	// add default value to global search box
	var mplSearch_defaultvalue = "Enter search text here...";
	$("#globalsearchtext").focus(function() {
		if ($(this).val() == mplSearch_defaultvalue) {
			$(this).val("");
			$(this).removeClass("inactive");
		}
	}).blur(function() {
		if ($(this).val() == '') {
			$(this).addClass("inactive");
			$(this).val(mplSearch_defaultvalue);
		}
	}).blur();
	
	//fix png's for internet exploror
	$(document).pngFix(); 
	
	
	$('#fadediv').cycle({ 
		 fx:     'fade', 
		 speed:   600, 
		 timeout: 6000, 
		 next:   '#fadediv', 
		 pause:   1 
	});	
	$('#fadetext').cycle({ 
		 fx:     'fade', 
		 speed:   600, 
		 timeout: 6000, 
		 next:   '#fadetext', 
		 pause:   1
	});
	
	$(document).ready(function() {
		$('.Tips1').cluetip({splitTitle: '::',cursor: 'pointer'});
	});
	
});

$('.Tips1').livequery(function(){ 
	$(this).cluetip({splitTitle: '::',cursor: 'pointer'});
});

$('#activateFilters').livequery('click', function(){
	// by calling sibling, we can use same div for all demos
	$(this).parent().parent().parent().hide();
	$(this).parent().parent().parent().siblings('#provfilters').show();
});
$('.activateFilters').livequery('click', function(){
	// by calling sibling, we can use same div for all demos
	$(this).parent().parent().parent().hide();
	$(this).parent().parent().parent().siblings('#provfilters').show();
});

		$('.monthmenu a').click(function() {
			$('#eventslists ul').css('display','none');
			var a = $(this).attr('href');
			a = a+"list";
			$(a).css('display','block');
			$('.monthmenu a').removeClass('selected');
			$(this).addClass('selected');
		});
		

//add facebox popups to courseinfo
$(function() {
	$('a[rel*=courseinfo]').livequery(function(event) { 
		  $(this).facebox({
		  loading_image : 'loading.gif',
		  close_image   : 'closelabel.gif'
		});
		return false;
	 });
});
//add facebox popups to uni
$(function() {
	$('.uni-popup').livequery(function(event) { 
		  $(this).facebox({
		  loading_image : 'loading.gif',
		  close_image   : 'closelabel.gif'
		});
		return false;
	 });
});

//ajax loading field
$().ajaxSend(function(r,s){
	$("#contentLoading").show();
	$(".contentLoading").show();
});
$().ajaxStop(function(r,s){
	$("#contentLoading").hide();
	$(".contentLoading").hide();
	$("#contentLoading2").hide("fast");
	$(".contentLoading2").hide("fast");
	$("#contentLoading3").hide("fast");
	$(".contentLoading3").hide("fast");	
});
/*auto complete*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(3($){$.2e.1u({19:3(b,d){5 c=W b=="1B";d=$.1u({},$.M.1T,{Y:c?b:P,y:c?P:b,1J:c?$.M.1T.1J:10,X:d&&!d.1D?10:48},d);d.1y=d.1y||3(a){6 a};d.1v=d.1v||d.1R;6 A.I(3(){1M $.M(A,d)})},L:3(a){6 A.11("L",a)},1k:3(a){6 A.14("1k",[a])},2b:3(){6 A.14("2b")},28:3(a){6 A.14("28",[a])},24:3(){6 A.14("24")}});$.M=3(o,r){5 t={2Y:38,2S:40,2N:46,2I:9,2E:13,2B:27,2x:3I,2v:33,2p:34,2n:8};5 u=$(o).3r("19","3o").Q(r.2Q);5 p;5 m="";5 n=$.M.3c(r);5 s=0;5 k;5 h={1F:C};5 l=$.M.32(r,o,1Z,h);5 j;$.1Y.2X&&$(o.2U).11("45.19",3(){4(j){j=C;6 C}});u.11(($.1Y.2X?"43":"42")+".19",3(a){s=1;k=a.2M;3V(a.2M){O t.2Y:a.1d();4(l.N()){l.30()}w{12(0,D)}R;O t.2S:a.1d();4(l.N()){l.2D()}w{12(0,D)}R;O t.2v:a.1d();4(l.N()){l.2C()}w{12(0,D)}R;O t.2p:a.1d();4(l.N()){l.2A()}w{12(0,D)}R;O r.17&&$.1c(r.S)==","&&t.2x:O t.2I:O t.2E:4(1Z()){a.1d();j=D;6 C}R;O t.2B:l.Z();R;3J:1P(p);p=1O(12,r.1J);R}}).2t(3(){s++}).3E(3(){s=0;4(!h.1F){2r()}}).2q(3(){4(s++>1&&!l.N()){12(0,D)}}).11("1k",3(){5 c=(1r.7>1)?1r[1]:P;3 1N(q,a){5 b;4(a&&a.7){16(5 i=0;i<a.7;i++){4(a[i].L.J()==q.J()){b=a[i];R}}}4(W c=="3")c(b);w u.14("L",b&&[b.y,b.F])}$.I(15(u.K()),3(i,a){21(a,1N,1N)})}).11("2b",3(){n.1o()}).11("28",3(){$.1u(r,1r[1]);4("y"2h 1r[1])n.1e()}).11("24",3(){l.1p();u.1p();$(o.2U).1p(".19")});3 1Z(){5 e=l.2g();4(!e)6 C;5 v=e.L;m=v;4(r.17){5 b=15(u.K());4(b.7>1){5 f=r.S.7;5 c=$(o).18().1I;5 d,1H=0;$.I(b,3(i,a){1H+=a.7;4(c<=1H){d=i;6 C}1H+=f});b[d]=v;v=b.3f(r.S)}v+=r.S}u.K(v);1l();u.14("L",[e.y,e.F]);6 D}3 12(b,c){4(k==t.2N){l.Z();6}5 a=u.K();4(!c&&a==m)6;m=a;a=1m(a);4(a.7>=r.29){u.Q(r.26);4(!r.1s)a=a.J();21(a,3a,1l)}w{1q();l.Z()}};3 15(b){4(!b)6[""];4(!r.17)6[$.1c(b)];6 $.4h(b.23(r.S),3(a){6 $.1c(b).7?$.1c(a):P})}3 1m(a){4(!r.17)6 a;5 c=15(a);4(c.7==1)6 c[0];5 b=$(o).18().1I;4(b==a.7){c=15(a)}w{c=15(a.22(a.37(b),""))}6 c[c.7-1]}3 1G(q,a){4(r.1G&&(1m(u.K()).J()==q.J())&&k!=t.2n){u.K(u.K()+a.37(1m(m).7));$(o).18(m.7,m.7+a.7)}};3 2r(){1P(p);p=1O(1l,4g)};3 1l(){5 c=l.N();l.Z();1P(p);1q();4(r.36){u.1k(3(a){4(!a){4(r.17){5 b=15(u.K()).1n(0,-1);u.K(b.3f(r.S)+(b.7?r.S:""))}w{u.K("");u.14("L",P)}}})}};3 3a(q,a){4(a&&a.7&&s){1q();l.35(a,q);1G(q,a[0].F);l.20()}w{1l()}};3 21(f,d,g){4(!r.1s)f=f.J();5 e=n.31(f);4(e&&e.7){d(f,e)}w 4((W r.Y=="1B")&&(r.Y.7>0)){5 c={4f:+1M 4e()};$.I(r.2Z,3(a,b){c[a]=W b=="3"?b():b});$.4d({4c:"4b",4a:"19"+o.49,2V:r.2V,Y:r.Y,y:$.1u({q:1m(f),47:r.X},c),44:3(a){5 b=r.1A&&r.1A(a)||1A(a);n.1i(f,b);d(f,b)}})}w{l.2T();g(f)}};3 1A(c){5 d=[];5 b=c.23("\\n");16(5 i=0;i<b.7;i++){5 a=$.1c(b[i]);4(a){a=a.23("|");d[d.7]={y:a,F:a[0],L:r.1z&&r.1z(a,a[0])||a[0]}}}6 d};3 1q(){u.1h(r.26)}};$.M.1T={2Q:"41",2P:"3Z",26:"3Y",29:1,1J:3W,1s:C,1f:D,1w:C,1g:10,X:3U,36:C,2Z:{},1X:D,1R:3(a){6 a[0]},1v:P,1G:C,E:0,17:C,S:", ",1y:3(b,a){6 b.22(1M 3T("(?![^&;]+;)(?!<[^<>]*)("+a.22(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/2K,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","2K"),"<2J>$1</2J>")},1D:D,1E:3S};$.M.3c=3(g){5 h={};5 j=0;3 1f(s,a){4(!g.1s)s=s.J();5 i=s.2H(a);4(g.1w=="3R"){i=s.J().1k("\\\\b"+a.J())}4(i==-1)6 C;6 i==0||g.1w};3 1i(q,a){4(j>g.1g){1o()}4(!h[q]){j++}h[q]=a}3 1e(){4(!g.y)6 C;5 f={},2G=0;4(!g.Y)g.1g=1;f[""]=[];16(5 i=0,2F=g.y.7;i<2F;i++){5 c=g.y[i];c=(W c=="1B")?[c]:c;5 d=g.1v(c,i+1,g.y.7);4(d===C)1V;5 e=d.3Q(0).J();4(!f[e])f[e]=[];5 b={F:d,y:c,L:g.1z&&g.1z(c)||d};f[e].1U(b);4(2G++<g.X){f[""].1U(b)}};$.I(f,3(i,a){g.1g++;1i(i,a)})}1O(1e,25);3 1o(){h={};j=0}6{1o:1o,1i:1i,1e:1e,31:3(q){4(!g.1g||!j)6 P;4(!g.Y&&g.1w){5 a=[];16(5 k 2h h){4(k.7>0){5 c=h[k];$.I(c,3(i,x){4(1f(x.F,q)){a.1U(x)}})}}6 a}w 4(h[q]){6 h[q]}w 4(g.1f){16(5 i=q.7-1;i>=g.29;i--){5 c=h[q.3O(0,i)];4(c){5 a=[];$.I(c,3(i,x){4(1f(x.F,q)){a[a.7]=x}});6 a}}}6 P}}};$.M.32=3(e,g,f,k){5 h={H:"3N"};5 j,z=-1,y,1t="",1S=D,G,B;3 2y(){4(!1S)6;G=$("<3M/>").Z().Q(e.2P).T("3L","3K").1Q(1K.2w);B=$("<3H/>").1Q(G).3G(3(a){4(U(a).2u&&U(a).2u.3F()==\'2s\'){z=$("1L",B).1h(h.H).3D(U(a));$(U(a)).Q(h.H)}}).2q(3(a){$(U(a)).Q(h.H);f();g.2t();6 C}).3C(3(){k.1F=D}).3B(3(){k.1F=C});4(e.E>0)G.T("E",e.E);1S=C}3 U(a){5 b=a.U;3A(b&&b.3z!="2s")b=b.3y;4(!b)6[];6 b}3 V(b){j.1n(z,z+1).1h(h.H);2o(b);5 a=j.1n(z,z+1).Q(h.H);4(e.1D){5 c=0;j.1n(0,z).I(3(){c+=A.1a});4((c+a[0].1a-B.1b())>B[0].3x){B.1b(c+a[0].1a-B.3w())}w 4(c<B.1b()){B.1b(c)}}};3 2o(a){z+=a;4(z<0){z=j.1j()-1}w 4(z>=j.1j()){z=0}}3 2m(a){6 e.X&&e.X<a?e.X:a}3 2l(){B.2z();5 b=2m(y.7);16(5 i=0;i<b;i++){4(!y[i])1V;5 a=e.1R(y[i].y,i+1,b,y[i].F,1t);4(a===C)1V;5 c=$("<1L/>").3v(e.1y(a,1t)).Q(i%2==0?"3u":"3P").1Q(B)[0];$.y(c,"2k",y[i])}j=B.3t("1L");4(e.1X){j.1n(0,1).Q(h.H);z=0}4($.2e.2W)B.2W()}6{35:3(d,q){2y();y=d;1t=q;2l()},2D:3(){V(1)},30:3(){V(-1)},2C:3(){4(z!=0&&z-8<0){V(-z)}w{V(-8)}},2A:3(){4(z!=j.1j()-1&&z+8>j.1j()){V(j.1j()-1-z)}w{V(8)}},Z:3(){G&&G.Z();j&&j.1h(h.H);z=-1},N:3(){6 G&&G.3s(":N")},3q:3(){6 A.N()&&(j.2j("."+h.H)[0]||e.1X&&j[0])},20:3(){5 a=$(g).3p();G.T({E:W e.E=="1B"||e.E>0?e.E:$(g).E(),2i:a.2i+g.1a,1W:a.1W}).20();4(e.1D){B.1b(0);B.T({2L:e.1E,3n:\'3X\'});4($.1Y.3m&&W 1K.2w.3l.2L==="1x"){5 c=0;j.I(3(){c+=A.1a});5 b=c>e.1E;B.T(\'3k\',b?e.1E:c);4(!b){j.E(B.E()-2R(j.T("2O-1W"))-2R(j.T("2O-3j")))}}}},2g:3(){5 a=j&&j.2j("."+h.H).1h(h.H);6 a&&a.7&&$.y(a[0],"2k")},2T:3(){B&&B.2z()},1p:3(){G&&G.3i()}}};$.2e.18=3(b,f){4(b!==1x){6 A.I(3(){4(A.2d){5 a=A.2d();4(f===1x||b==f){a.4n("2c",b);a.3h()}w{a.4m(D);a.4l("2c",b);a.4k("2c",f);a.3h()}}w 4(A.3g){A.3g(b,f)}w 4(A.1C){A.1C=b;A.3e=f}})}5 c=A[0];4(c.2d){5 e=1K.18.4j(),3d=c.F,2a="<->",2f=e.3b.7;e.3b=2a;5 d=c.F.2H(2a);c.F=3d;A.18(d,d+2f);6{1I:d,39:d+2f}}w 4(c.1C!==1x){6{1I:c.1C,39:c.3e}}}})(4i);',62,272,'|||function|if|var|return|length|||||||||||||||||||||||||else||data|active|this|list|false|true|width|value|element|ACTIVE|each|toLowerCase|val|result|Autocompleter|visible|case|null|addClass|break|multipleSeparator|css|target|moveSelect|typeof|max|url|hide||bind|onChange||trigger|trimWords|for|multiple|selection|autocomplete|offsetHeight|scrollTop|trim|preventDefault|populate|matchSubset|cacheLength|removeClass|add|size|search|hideResultsNow|lastWord|slice|flush|unbind|stopLoading|arguments|matchCase|term|extend|formatMatch|matchContains|undefined|highlight|formatResult|parse|string|selectionStart|scroll|scrollHeight|mouseDownOnSelect|autoFill|progress|start|delay|document|li|new|findValueCallback|setTimeout|clearTimeout|appendTo|formatItem|needsInit|defaults|push|continue|left|selectFirst|browser|selectCurrent|show|request|replace|split|unautocomplete||loadingClass||setOptions|minChars|teststring|flushCache|character|createTextRange|fn|textLength|selected|in|top|filter|ac_data|fillList|limitNumberOfItems|BACKSPACE|movePosition|PAGEDOWN|click|hideResults|LI|focus|nodeName|PAGEUP|body|COMMA|init|empty|pageDown|ESC|pageUp|next|RETURN|ol|nullData|indexOf|TAB|strong|gi|maxHeight|keyCode|DEL|padding|resultsClass|inputClass|parseInt|DOWN|emptyList|form|dataType|bgiframe|opera|UP|extraParams|prev|load|Select|||display|mustMatch|substring||end|receiveData|text|Cache|orig|selectionEnd|join|setSelectionRange|select|remove|right|height|style|msie|overflow|off|offset|current|attr|is|find|ac_even|html|innerHeight|clientHeight|parentNode|tagName|while|mouseup|mousedown|index|blur|toUpperCase|mouseover|ul|188|default|absolute|position|div|ac_over|substr|ac_odd|charAt|word|180|RegExp|100|switch|400|auto|ac_loading|ac_results||ac_input|keydown|keypress|success|submit||limit|150|name|port|abort|mode|ajax|Date|timestamp|200|map|jQuery|createRange|moveEnd|moveStart|collapse|move'.split('|'),0,{}))

jQuery(function(){
        $(".chkpass").blur(function(){                                         
        $(".error").hide();
        var hasError = false;
        var passwordVal = $("#newPassword").val();
        var checkVal = $("#newPasswordR").val();
        if (passwordVal == '') {
            $("#newPassword").after('<p><span class="error">Please enter a password.</span></p>');
            hasError = true;
        } else if (checkVal == '') {
            $("#newPasswordR").after('<p><span class="error">Please re-enter your password.</span></p>');
            hasError = true;
        } else if (passwordVal != checkVal ) {   
            $("#newPasswordR").after('<p><span class="error">New passwords do not match.</span></p>');
            hasError = true;
        }
        if(hasError == true) { return false; } else { return true; }
	});	
});






$(document).ready(function() { 
			$('#contentp').css('display', 'block');
			$('.contentLoading3').remove();
			$('.contentLoading').hide();
			$('#eventslists ul').css('display','none');
			$('#eventslists ul.currentmonth').css('display','block');
		});
		// change page for each mplSearch section
		$(".mplSearch-pages div a").attr("href","#mplSearch-pages").click(function () {
			$(this).parents(".mplSearch-pages").children("div.selected").removeClass("selected");
			$(this).parent().addClass("selected");
			
			var page = $(this).attr("title");
			var section = $(this).parents(".mplSearch-tab").attr("id");
			
			var mplSection = $(this).parents(".mplSearch-section");
			var mplresults = mplSection.children(".mplSearch-results");
			
			mplresults.hide("slow");
			
			$.ajax({
				method: "post", 
				url: capextra+"/ajax-loader.php?m=gsearch", 
				data: "page="+page+"&"+"section="+section,
				success: function (html) {
					mplresults.show("slow");
					mplresults.html(html);
				}
			});
		});
		
		// add facebox popups savecourse
		$(function() {
			$("a[rel*=savecourse]").livequery(function(event) { 
				$(this).facebox({
					loading_image : 'loading.gif',
					close_image   : 'closelabel.gif'
				});
				return false;
			});
			$(document).bind('reveal.facebox', function() { $("#savedcourses").load(capextra+"/ajax-loader.php?m=savedcs");
			if ( $("#providers-courses").length > 0 ) {
				$("#providers-courses").load(capextra+"/ajax-loader.php?m=savedcsacc");
			}
			});
		});

		$("#previous_statements").change(function() {
			if($(this).val() > 0) {
				$('#pstate').load(capextra+"/ajax-loader.php?m=pstat&"+"p="+$(this).val());
			} else {
				
			}
		});


		//linked provider lists
		$(function(){
			//16+
			 $('#prov-area').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=prov-area','#job-area',{firstOption: 'Please Select'});
			 $('#job-area').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=job-area','#prov-types',{firstOption: 'Please Select'});
			 $('#prov-types').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=prov-types','#providers',{firstOption: 'Please Select', loadingText: 'Loading Please Wait...'});
			 
			 $("#providers").change(function() {
				  $("#providertext").empty();
				  if ($("#providers").val() > 0) {
						$("#providers").blur();
						$("#providertext").load(capextra+"/ajax-loader.php?m=provdata&"+"str="+$("#providers").val()+"&"+"ct="+$("#prov-types").val());
						$('#provfilters').slideToggle();
					} else {
						$("#providertext").html('');
					}
			 });
			 $('#job-area').change(function() {
				$('#prov-types').get(0).disabled = true;
				$("#prov-types").html("<"+"option value=''>--  --<\/option>");
				$('#providers').get(0).disabled = true;
				$("#providers").html("<"+"option value=''>--  --<\/option>");
				$("#providertext").html('');
			 });
			 $('#prov-area').change(function() {
				$('#job-area').get(0).disabled = true;
				$("#job-area").html("<"+"option value=''>--  --<\/option>");
				$('#prov-types').get(0).disabled = true;
				$("#prov-types").html("<"+"option value=''>--  --<\/option>");
				$('#providers').get(0).disabled = true;
				$("#providers").html("<"+"option value=''>--  --<\/option>");
				$("#providertext").html('');
			 });
			$('#prov-types').change(function() {
				$("#providertext").html('');
			});
			
			//14+
			$('#sch-area').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=sch-area','#cotype',{firstOption: 'Please Select'});
			$('#cotype').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=cotype','#providers',{firstOption: 'Please Select'});
			
			$('#cotype').change(function() {
				$("#providertext").html('');
			});
			
			 $('#sch-area').change(function() {
				$('#cotype').get(0).disabled = true;
				$("#cotype").html("<"+"option value=''>--  --<\/option>");
				$('#providers').get(0).disabled = true;
				$("#providers").html("<"+"option value=''>--  --<\/option>");
				$("#providertext").html('');
			 });
		});
      
		//linked provider lists
		$(function(){
			//16+ Provider Search
			 $('#prov-area2').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=prov-types2','#providers2',{firstOption: 'Please Select', loadingText: 'Loading Please Wait...'});			 
			 $("#providers2").change(function() {
				  $("#providertext2").empty();
				  if ($("#providers2").val() > 0) {
						$("#providers2").blur();
						$("#providertext2").load(capextra+"/ajax-loader.php?m=provdataNEW&"+"str="+$("#providers2").val());
						$('#provfilters').slideToggle();
					} else {
						$("#providertext2").html('');
					}
			 });
			 $('#prov-area2').change(function() {
				$('#job-area2').get(0).disabled = true;
				$("#job-area2").html("<"+"option value=''>--  --<\/option>");
				$('#providers2').get(0).disabled = true;
				$("#providers2").html("<"+"option value=''>--  --<\/option>");
				$("#providertext2").html('');
			 });
			 //16+ Course Search
			 $('#prov-area3').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=prov-types3','#prov-types2',{firstOption: 'Please Select', loadingText: 'Loading Please Wait...'});
			 $('#prov-types2').linkedSelect(capextra+'/ajax-loader.php?m=provsearch&'+'search=job-area2','#job-area2',{firstOption: 'Please Select', loadingText: 'Loading Please Wait...'});
			 $("#job-area2").change(function() {
				  $("#providertext2").empty();
				  if ($("#job-area2").val() > 0) {
						$("#job-area2").blur();
						$("#providertext2").load(capextra+"/ajax-loader.php?m=coursedataNEW&"+"str="+$("#job-area2").val());
						$('#provfilters').slideToggle();
					} else {
						$("#providertext2").html('');
					}
			 });
			 $('#prov-area3').change(function() {
				$('#job-area2').get(0).disabled = true;
				$("#job-area2").html("<"+"option value=''>--  --<\/option>");
				$('#providers2').get(0).disabled = true;
				$("#providers2").html("<"+"option value=''>--  --<\/option>");
				$("#providertext2").html('');
			 });
			 $('#prov-types2').change(function() {
				$('#job-area2').get(0).disabled = true;
				$("#job-area2").html("<"+"option value=''>--  --<\/option>");
				$('#providers2').get(0).disabled = true;
				$("#providers2").html("<"+"option value=''>--  --<\/option>");
				$("#providertext2").html('');
			 });
		});
		
//#############################
	// select a course
	//#############################
	$('.blocker').livequery('click', function(event) {
      var settings = ($(this).parent().parent().parent().attr("rel")).split("-");
		//var settings = settings.split("-");
		minappcount = settings[0];
		maxappcount = settings[1];
		fromblockcount = parseInt(settings[2])-1;
		newsettings = minappcount+"-"+maxappcount+"-"+fromblockcount+"-"+parseInt(settings[3]);
		//set the new block count
      $(this).parent().parent().parent().attr("rel",newsettings);
		
		selectedCourses = parseInt($('#routerules').attr("rel"));
		
		//if the count is zero (max picked from this route... block the rest of the courses in this route
		if(fromblockcount==0) {
			$(this).parent().parent().children().children(".blocker").removeClass().addClass("blocked");
		}
		//block all of the courses with this same ID as this... will need to check this against joins!
		$('a[rel*='+$(this).attr("rel")+']:not(.joinedcourse)').removeClass().addClass("blocked duplicate");
		
		//subject blocks
		if ($(this).attr("subjectblock") !== undefined) {
			var subj = ($(this).attr("subjectblock")).split(",");
			for ( var i in subj )
			{
				//block all subjects linked to this...
				$('a[rel*='+subj[i]+']:not(.jb)').removeClass().addClass("blocked duplicate");
			}
		}
		//subject join
		if ($(this).attr("subjectjoin") !== undefined) {
			var subj = ($(this).attr("subjectjoin")).split(",");
			for ( var i in subj )
			{
				//join all subjects linked to this... except itself
				$('a[rel*='+subj[i]+']:not("#'+$(this).attr("id")+'")').removeClass().addClass("joinedcourse");
				$('a[rel*='+subj[i]+']:not("#'+$(this).attr("id")+'")').each(function(idx, item) {
					var idblock = item.getAttribute('id');
					//join the rel that is the same
					$('a[id*='+idblock+']').removeClass().addClass("joinedcourse");
					//there is only going to be one of these as its linked by ID
					var linksettings = ($('a[id*='+idblock+']').parent().parent().parent().attr("rel")).split("-");
					//get the settings for this column
					mina = linksettings[0];
					maxa = linksettings[1];
					blkc = parseInt(linksettings[2])-1;
					ns = mina+"-"+maxa+"-"+blkc+"-"+linksettings[3];
					$('a[id*='+idblock+']').parent().parent().parent().attr("rel",ns);
					if(blkc==0) {
						$('a[id*='+idblock+']').parent().parent().children().children(".blocker").removeClass().addClass("blocked");
					}
					$('a[id*='+idblock+']').parent().parent().parent().removeClass().addClass("blockcol selected");
					selectedCourses++;
				});
			}
		}

		if ($(this).attr("blocks") !== undefined) {
			var subj = ($(this).attr("blocks")).split(",");
			for ( var i in subj )
			{
				//block the id that is the same
				$('a[id*='+subj[i]+']').removeClass().addClass("blocked duplicate");
			}
		}
		if ($(this).attr("joins") !== undefined) {
			var subj = ($(this).attr("joins")).split(",");
			for ( var i in subj )
			{
				//join the id that is the same
				$('a[id*='+subj[i]+']').removeClass().addClass("joinedcourse");
				//there is only going to be one of these as its linked by ID
				var linksettings = ($('a[id*='+subj[i]+']').parent().parent().parent().attr("rel")).split("-");
				//get the settings for this column
				mina = linksettings[0];
				maxa = linksettings[1];
				blkc = parseInt(linksettings[2])-1;
				ns = mina+"-"+maxa+"-"+blkc+"-"+linksettings[3];
				$('a[id*='+subj[i]+']').parent().parent().parent().attr("rel",ns);
				if(blkc==0) {
					$('a[id*='+subj[i]+']').parent().parent().children().children(".blocker").removeClass().addClass("blocked");
				}
				$('a[id*='+subj[i]+']').parent().parent().parent().removeClass().addClass("blockcol selected");
				selectedCourses++;
			}
		}
		
		//select this course
      $(this).removeClass().addClass("selectedcourse");
		//make this column blocked
		$(this).parent().parent().parent().removeClass().addClass("blockcol selected");
		
		$(".selected a[joins]").each(function(idx, item) {
			var idblock = (item.getAttribute('joins')).split(",");
			for ( var i in idblock )
			{
				$(".notselected a[id*='"+idblock[i]+"']").removeClass().addClass("blocked duplicate jb");
			}
		});
		$(".selected a[subjectjoin]").each(function(idx, item) {
			var idblock = (item.getAttribute('subjectjoin')).split(",");
			for ( var i in idblock )
			{
				$(".notselected a[rel*='"+idblock[i]+"']").removeClass().addClass("blocked duplicate jb");
			}
		});
		
		//increase the count of selected ones. (if not subject joined)
		selectedCourses++;
		
		$('#routerules').attr("rel",selectedCourses);
		//alert how many courses left to count.
		if(selectedCourses>=minappcount && selectedCourses<=maxappcount) {
			$("#applycontrol").show();
			$("#applycontrol").html("<"+"h1>You can now apply!<\/h1><"+"p><"+"a href='#apply' title='Apply Here' id='applybutton'>CLICK HERE TO APPLY<\/a><\/p>");
		} else {
			$("#applycontrol").hide();
		}
		//block all once we have reached the max allowed
		if(selectedCourses==maxappcount) {
			$(".blocker").removeClass().addClass("blocked");
		}
   });
	//#############################
	// de select
	//#############################
	$('.selectedcourse').livequery('click', function(event) {
      var settings = ($(this).parent().parent().parent().attr("rel")).split("-");
		//var settings = settings.split("-");
		minappcount = settings[0];
		maxappcount = settings[1];
		fromblockcount = parseInt(settings[2])+1;
		fromblockmax = parseInt(settings[3]);
		newsettings = minappcount+"-"+maxappcount+"-"+fromblockcount+"-"+fromblockmax;
		
		//get the amount of currently selected courses
		selectedCourses = parseInt($('#routerules').attr("rel"));
		//decrease the count of selected ones.
		selectedCourses--;
		
		//set the new block count (subtract)
      $(this).parent().parent().parent().attr("rel",newsettings);
		//deselect this course
      $(this).removeClass().addClass("blocker green");
		
		if(fromblockcount==fromblockmax){
			$(this).parent().parent().parent().removeClass().addClass("blockcol notselected");
			//deselect the rest of the ones in this row (except the duplicates/selected ones)
			$(this).parent().parent().children().children("a:not(.duplicate)").removeClass().addClass("blocker green");
		}
		//deselect all of the courses that are the same as this in the blocks with nothing selected
		$(".notselected").children().children().children('a[rel*='+$(this).attr("rel")+']').removeClass().addClass("blocker green");
		//change the status of the duplicates in the columns with something selected so that we can 
		$(".selected").children().children().children('a[rel*='+$(this).attr("rel")+']').removeClass().addClass("blocked");
		$(this).removeClass().addClass("blocker green");
		
		//subject blocks - remove all of the subjectblocks in columns with nothing selected and remove "duplicate" status from those with something selected, so if they deselect from 
		//that column it will deselect...
		if ($(this).attr("subjectblock") !== undefined) {
			var subj = ($(this).attr("subjectblock")).split(",");
			for ( var i in subj )
			{
				//deselect all of the courses that are the same as this in the blocks with nothing selected
				$(".notselected").children().children().children('a[rel*='+subj[i]+']:not(.jb)').removeClass().addClass("blocker green");
				//change the status of the duplicates in the columns with something selected so that we can 
				$(".selected").children().children().children('a[rel*='+subj[i]+']:not(.jb)').removeClass().addClass("blocked");
			}
		}
		if ($(this).attr("blocks") !== undefined) {
			var subj = ($(this).attr("blocks")).split(",");
			for ( var i in subj )
			{
				//deselect all of the courses that are the same as this in the blocks with nothing selected
				$(".notselected").children().children().children('a[id*='+subj[i]+']').removeClass().addClass("blocker green");
				//change the status of the duplicates in the columns with something selected so that we can 
				$(".selected").children().children().children('a[id*='+subj[i]+']').removeClass().addClass("blocked");
			}
		}
		if ($(this).attr("joins") !== undefined) {
			var subj = ($(this).attr("joins")).split(",");
			for ( var i in subj )
			{
				//deselect the ids that are the same
				$('a[id*='+subj[i]+']').removeClass().addClass("blocker green");
				//there is only going to be one of these as its linked by ID
				var linksettings = ($('a[id*='+subj[i]+']').parent().parent().parent().attr("rel")).split("-");
				//get the settings for this column
				mina = linksettings[0];
				maxa = linksettings[1];
				blkc = parseInt(linksettings[2])+1;
				ns = mina+"-"+maxa+"-"+blkc+"-"+linksettings[3];
				$('a[id*='+subj[i]+']').parent().parent().parent().attr("rel",ns);
				$('a[id*='+subj[i]+']').parent().parent().parent().removeClass().addClass("blockcol notselected");
				//change the status of the duplicates in the columns with something selected so that we can 
				$(".selected").children().children().children('a[id*='+subj[i]+']').removeClass().addClass("blocked");
				//deselect all of the courses that are the same as this in the blocks with nothing selected
				$(".notselected").children().children().children('a:not(.duplicate .jb)').removeClass().addClass("blocker green");
				selectedCourses--;
			}
		}
		if ($(this).attr("subjectjoin") !== undefined) {
			var subj = ($(this).attr("subjectjoin")).split(",");
			for ( var i in subj )
			{
				//deselect the ids that are the same
				$('a[rel*='+subj[i]+']:not("#'+$(this).attr("id")+'")').removeClass().addClass("blocker green");
				$('a[rel*='+subj[i]+']:not("#'+$(this).attr("id")+'")').each(function(idx, item) {
					var idblock = item.getAttribute('id');

					//there is only going to be one of these as its linked by ID
					var linksettings = ($('a[id*='+idblock+']').parent().parent().parent().attr("rel")).split("-");
					//get the settings for this column
					mina = linksettings[0];
					maxa = linksettings[1];
					blkc = parseInt(linksettings[2])+1;
					ns = mina+"-"+maxa+"-"+blkc+"-"+linksettings[3];
					
					$('a[id*='+idblock+']').parent().parent().parent().attr("rel",ns);
					$('a[id*='+idblock+']').parent().parent().parent().removeClass().addClass("blockcol notselected");
					//change the status of the duplicates in the columns with something selected so that we can 
					$(".selected").children().children().children('a[id*='+idblock+']').removeClass().addClass("blocked");
					//deselect all of the courses that are the same as this in the blocks with nothing selected
					$(".notselected").children().children().children('a:not(.duplicate .jb)').removeClass().addClass("blocker green");
					selectedCourses--;
				});
			}
		}
		
		$(".notselected a[joins]:not(.duplicate)").each(function(idx, item) {
			var idblock = (item.getAttribute('joins')).split(",");
			for ( var i in idblock )
			{
				$(".notselected a[id*='"+idblock+"']").removeClass().addClass("blocker green");
			}
		});
		
		$(".notselected a[subjectjoin]:not(.duplicate)").each(function(idx, item) {
			var idblock = (item.getAttribute('subjectjoin')).split(",");
			for ( var i in idblock )
			{
				$(".notselected a[rel*='"+idblock+"']").removeClass().addClass("blocker green");
			}
		});
		
		$(".selected a[joins]").each(function(idx, item) {
			var idblock = (item.getAttribute('joins')).split(",");
			for ( var i in idblock )
			{
				$(".notselected a[id*='"+idblock+"']").removeClass().addClass("blocked duplicate jb");
			}
		});
		
		$(".selected a[subjectjoin]").each(function(idx, item) {
			var idblock = (item.getAttribute('subjectjoin')).split(",");
			for ( var i in idblock )
			{
				$(".notselected a[rel*='"+idblock+"']").removeClass().addClass("blocked duplicate jb");
			}
		});
		
		$('#routerules').attr("rel",selectedCourses);
		if(selectedCourses==0) {
			//clean up any loose courses
			$(".notselected").children().children().children().removeClass().addClass("blocker green");
		}
		//deselect from all columns IF we have previously locked out all courses... ie selectedCourses==maxappcount
		if(selectedCourses < maxappcount) {
			$(".notselected").children().children().children('a:not(.duplicate)').removeClass().addClass("blocker green");
		}
		//reset apply html
		if(selectedCourses>=minappcount && selectedCourses<=maxappcount) {
			$("#applycontrol").show();
			$("#applycontrol").html("<"+"h1>You can now apply!<\/h1><"+"p><"+"a href='#apply' title='Apply Here' id='applybutton'>CLICK HERE TO APPLY<\/a><\/p>");
		} else {
			$("#applycontrol").hide();
		}
   });
	//#############################
	// apply
	//#############################
	$('#applybutton').livequery('click', function(event) {	
		if($(".selectedcourse") !== undefined) {
			var upd = [];
			$(".selectedcourse,.joinedcourse").each(function(idx, item) {
				upd.push(item.getAttribute('id'));
			});
			$("#rc").val( upd.join('--') );
			$('#applyforcoursesform').submit();
		}
	});
	
	
/**
 * jquery.qtip. The jQuery tooltip plugin
 * 
 * Copyright (c) 2009 Craig Thompson
 * http://craigsworks.com
 *
 * Licensed under MIT
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Launch  : February 2009
 * Version : 1.0.0-beta4
 * Released: Monday 6th April, 2009 - 20:12
 */

(function($)
{$.fn.qtip=function(options)
{if(typeof options=='string')
{if(options=='api')return $(this).eq(0).data('qtip');}
else
{if(!options)options={};if(typeof options.content!=='object')options.content={text:options.content};if(typeof options.content.title!=='object')options.content.title={text:options.content.title};if(typeof options.position!=='object')options.position={corner:options.position};if(typeof options.position.corner!=='object')options.position.corner={target:options.position.corner,tooltip:options.position.corner};if(typeof options.show!=='object')options.show={when:options.show};if(typeof options.show.when!=='object')options.show.when={event:options.show.when};if(typeof options.show.effect!=='object')options.show.effect={type:options.show.effect};if(typeof options.hide!=='object')options.hide={when:options.hide};if(typeof options.hide.when!=='object')options.hide.when={event:options.hide.when};if(typeof options.hide.effect!=='object')options.hide.effect={type:options.hide.effect};if(typeof options.style!=='object')options.style={name:options.style};options.style=sanitizeStyle(options.style);var opts=$.extend(true,{},$.fn.qtip.defaults,options);opts.style=buildStyle.call({options:opts},opts.style);opts.user=$.extend(true,{},options);}
return $(this).each(function()
{if(typeof options=='string')
{switch(options)
{case'show':$(this).data('qtip').show();break;case'hide':$(this).data('qtip').hide();break;case'focus':$(this).data('qtip').focus();break;case'disable':$(this).data('qtip').disable(true);break;case'enable':$(this).data('qtip').disable(false);break;case'destroy':$(this).data('qtip').destroy();break;}}
else
{var config=$.extend(true,{},opts);config.hide.effect.length=opts.hide.effect.length;config.show.effect.length=opts.show.effect.length;if(config.position.container===false)config.position.container=$(document.body);if(config.position.target===false)config.position.target=$(this);if(config.show.when.target===false)config.show.when.target=$(this);if(config.hide.when.target===false)config.hide.when.target=$(this);var obj=new qTip($(this),config);$(this).data('qtip',obj);}});}
function qTip(target,options)
{var self=this;self.options=options;self.elements={target:target.addClass(self.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,tip:null};self.mouse={};self.timers={};$.extend(self,self.options.api,{show:function(event)
{self.elements.tooltip.stop(true,true);var returned=self.beforeShow.call(self,event);if(returned===false)return;function afterShow(){self.onShow.call(self,event);}
if(typeof self.options.show.when.target.data('qtip-toggle')=='number')
self.options.show.when.target.data('qtip-toggle',1);self.updatePosition(event);if(typeof self.options.show.solo=='object')var solo=$(self.options.show.solo);else if(self.options.show.solo===true)var solo=$('div.qtip').not(self.elements.tooltip);if(solo)solo.each(function(){$(this).qtip('api').hide();});if(typeof self.options.show.effect.type=='function')
{self.options.show.effect.type.call(self.elements.tooltip,self.options.show.effect.length);self.elements.tooltip.queue(function(){afterShow();$(this).dequeue();});}
else
{switch(self.options.show.effect.type)
{case'fade':self.elements.tooltip.fadeIn(self.options.show.effect.length,afterShow);break;case'slide':self.elements.tooltip.slideDown(self.options.show.effect.length,function()
{afterShow();self.updatePosition(event,true);});break;case'grow':self.elements.tooltip.show(self.options.show.effect.length,afterShow);break;default:self.elements.tooltip.show(null,afterShow);break;}
self.elements.tooltip.addClass(self.options.style.classes.active);}
if(self.options.position.type.search(/(fixed|absolute)/)!==-1)self.focus();self.onShow.call(self,event);return self;},hide:function(event)
{clearTimeout(self.timers.show);self.elements.tooltip.stop(true,true);var returned=self.beforeHide.call(self,event);if(returned===false)return false;function afterHide(){self.onHide.call(self,event);}
if(typeof self.options.show.when.target.data('qtip-toggle')=='number')
self.options.show.when.target.data('qtip-toggle',0);if(typeof self.options.hide.effect.type=='function')
{self.options.hide.effect.type.call(self.elements.tooltip,self.options.hide.effect.length);self.elements.tooltip.queue(function(){afterHide();$(this).dequeue();});}
else
{switch(self.options.hide.effect.type)
{case'fade':self.elements.tooltip.fadeOut(self.options.hide.effect.length,afterHide);break;case'slide':self.elements.tooltip.slideUp(self.options.hide.effect.length,function()
{self.updatePosition(event,true);afterHide();});break;case'grow':self.elements.tooltip.hide(self.options.hide.effect.length,afterHide);break;default:self.elements.tooltip.hide(null,afterHide);break;}
self.elements.tooltip.removeClass(self.options.style.classes.active);}
self.onHide.call(self,event);return self;},updatePosition:function(event,animate)
{var returned=self.beforePositionUpdate.call(self,event);if(returned===false)return false;if(self.options.position.target=='mouse')
{var targetPos={left:self.mouse.x,top:self.mouse.y};var targetLength={height:1,width:1};}
else
{if(self.options.position.target.get(0).nodeName=='AREA')
{var coords=self.options.position.target.attr('coords').split(',');for(var i=0;i<coords.length;i++)coords[i]=parseInt(coords[i]);var mapName=self.options.position.target.parent("map").attr('name');var imagePos=$('img[usemap="#'+mapName+'"]:first').offset();var targetPos={left:Math.floor(imagePos.left+coords[0]),top:Math.floor(imagePos.top+coords[1])};switch(self.options.position.target.attr('shape'))
{case'rect':var targetLength={width:Math.floor(Math.abs(coords[2]-coords[0])),height:Math.floor(Math.abs(coords[3]-coords[1]))};break;case'circle':var targetLength={width:coords[2],height:coords[2]};targetPos.left+=coords[2]+2;targetPos.top+=coords[2]+2;break;case'poly':var targetLength={width:coords[0],height:coords[1]};for(var i=0;i<coords.length;i++)
{if(i%2==0)
{if(coords[i]>targetLength.width)
targetLength.width=coords[i];if(coords[i]<coords[0])
targetPos.left=Math.floor(imagePos.left+coords[i]);}
else
{if(coords[i]>targetLength.height)
targetLength.height=coords[i];if(coords[i]<coords[1])
{targetPos.top=Math.floor(imagePos.top+coords[i]);}}}
targetLength.width=targetLength.width-(targetPos.left-imagePos.left);targetLength.height=targetLength.height-(targetPos.top-imagePos.top);break;}
targetLength.width-=2;targetLength.height-=2;}
else if(self.options.position.target.add(document.body).length!==1)
{var targetPos=self.options.position.target.offset();var targetLength={height:self.options.position.target.outerHeight(),width:self.options.position.target.outerWidth()};}
else
{var targetPos={left:$(document).scrollLeft(),top:$(document).scrollTop()};var targetLength={height:$(window).height(),width:$(window).width()};}
var targetCorner=self.options.position.corner.target;if(targetCorner.search(/right/i)!==-1)targetPos.left+=targetLength.width;if(targetCorner.search(/bottom/i)!==-1)targetPos.top+=targetLength.height;if(targetCorner.search(/((top|bottom)Middle)|center/)!==-1)
targetPos.left+=targetLength.width/2;if(targetCorner.search(/((left|right)Middle)|center/)!==-1)
targetPos.top+=targetLength.height/2;}
var tooltipCorner=self.options.position.corner.tooltip;if(tooltipCorner.search(/right/i)!==-1)
targetPos.left-=self.elements.tooltip.outerWidth();if(tooltipCorner.search(/bottom/i)!==-1)targetPos.top-=self.elements.tooltip.outerHeight();if(tooltipCorner.search(/((top|bottom)Middle)|center/)!==-1)
targetPos.left-=self.elements.tooltip.outerWidth()/2;if(tooltipCorner.search(/((left|right)Middle)|center/)!==-1)
targetPos.top-=(self.elements.tooltip.outerHeight()/2)
targetPos.left+=self.options.position.adjust.x;targetPos.top+=self.options.position.adjust.y;if(self.options.position.adjust.screen)
targetPos=screenAdjust.call(self,targetPos,targetLength,event);if(self.options.position.target=='mouse')
{targetPos.left+=(self.options.style.tip.corner.search(/right/i)!==-1)?-6:6;targetPos.top+=(self.options.style.tip.corner.search(/bottom/i)!==-1)?-6:6;}
if(animate===true)
self.elements.tooltip.animate({left:targetPos.left,top:targetPos.top},200,'swing');else
self.elements.tooltip.css({left:targetPos.left,top:targetPos.top});self.onPositionUpdate.call(self,event);return self;},updateWidth:function(newWidth)
{if(newWidth&&typeof newWidth!=='number')return;var borderWidth=Math.max(self.options.style.border.width,self.options.style.border.radius);if(!newWidth)
{if(typeof self.options.style.width.value=='number')
var newWidth=self.options.style.width.value;else
{var prevWidth=self.elements.tooltip.outerWidth();self.elements.tooltip.css({width:'auto'});if(($.support&&!$.support.cssFloat)||$.browser.msie)
{self.elements.wrapper.css({position:'static',zoom:'normal'});if(self.elements.tip)self.elements.tip.hide();}
var newWidth=self.elements.tooltip.outerWidth()+(borderWidth*2)+1;if(!self.options.style.width.value)
{if(newWidth>self.options.style.width.max)newWidth=self.options.style.width.max
if(newWidth<self.options.style.width.min)newWidth=self.options.style.width.min}}}
if(newWidth%2!==0)newWidth-=1;self.elements.tooltip.width(newWidth);if(self.options.style.border.radius)
{self.elements.tooltip.find('.qtip-betweenCorners').each(function(i)
{$(this).width(newWidth-(self.options.style.border.radius*2));})}
if(($.support&&!$.support.cssFloat)||$.browser.msie)
{self.elements.wrapper.css({position:'relative',zoom:'1'}).width(newWidth);if(self.elements.tip)self.elements.tip.show();}
return self;},updateStyle:function(name)
{if(typeof name!=='string'||!$.fn.qtip.styles[name])
return debug('No such style is defined');self.options.style=buildStyle.call(self,$.fn.qtip.styles[name],self.options.user.style);self.elements.content.css(jQueryStyle(self.options.style));if(self.options.content.title.text!==false)
self.elements.title.css(jQueryStyle(self.options.style.title,true));self.elements.contentWrapper.css({borderColor:self.options.style.border.color})
if(self.options.style.tip.corner!==false)
{if(document.createElement('canvas').getContext)
{var tip=self.elements.tooltip.find('.qtip-tip canvas:first');var context=tip.get(0).getContext('2d');context.clearRect(0,0,300,300);drawTip.call(self,tip,tip.parent('div[rel]:first').attr('rel'),self.options.style.tip.color||self.options.style.border.color);}
else if(($.support&&!$.support.cssFloat)||$.browser.msie)
{var tip=self.elements.tooltip.find('.qtip-tip [nodeName="shape"]');tip.attr('fillcolor',self.options.style.tip.color||self.options.style.border.color)}}
if(self.options.style.border.radius>0)
{self.elements.tooltip.find('.qtip-betweenCorners').css({backgroundColor:self.options.style.border.color})
if(document.createElement('canvas').getContext)
{var borders=calculateBorders(self.options.style.border.radius)
self.elements.tooltip.find('.qtip-wrapper canvas').each(function()
{var context=$(this).get(0).getContext('2d');context.clearRect(0,0,300,300);var corner=$(this).parent('div[rel]:first').attr('rel')
drawBorder.call(self,$(this),borders[corner],self.options.style.border.radius,self.options.style.border.color);});}
else if(($.support&&!$.support.cssFloat)||$.browser.msie)
{self.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function()
{$(this).attr('fillcolor',self.options.style.border.color)});}}
return self;},updateContent:function(content,reposition)
{if(!content)return false;var parsedContent=self.beforeContentUpdate.call(self,content);if(typeof parsedContent=='string')content=parsedContent;else if(parsedContent===false)return;self.elements.content.html(content);var images=self.elements.content.find('img');if(images.length>0)
{var loadedImages=0;images.each(function(i)
{$('<img src="'+$(this).attr('src')+'" />').load(function(){if(++loadedImages==images.length)reposition();});});}
else reposition();function reposition()
{self.updateWidth();if(reposition!==false)
{self.updatePosition(self.elements.tooltip.is(':visible'));if(self.options.style.tip.corner!==false)positionTip.call(self);}}
self.onContentUpdate.call(self);return self;},loadContent:function(url,data,method)
{var returned=self.beforeContentLoad.call(self);if(returned===false)return;if(method=='post')
$.post(url,data,setupContent);else
$.get(url,data,setupContent);function setupContent(content)
{self.updateContent(content);self.onContentLoad.call(self);}
return self;},focus:function(event)
{var returned=self.beforeFocus.call(self,event);if(returned===false)return;var baseIndex=6000;var curIndex=parseInt(self.elements.tooltip.css('z-index'));var newIndex=baseIndex+$('.qtip').length-1;if(curIndex!==newIndex)
{$('.qtip').not(self.elements.tooltip).each(function()
{$(this).css({zIndex:parseInt($(this).css('z-index'))-1});})
self.elements.tooltip.css({zIndex:newIndex});}
self.onFocus.call(self,event);return self;},disable:function(state)
{if(state)
{self.options.show.when.target.unbind('mousemove.qtip',self.updatePosition);self.options.show.when.target.unbind('mouseout.qtip',self.hide);self.options.show.when.target.unbind(self.options.show.when.event+'.qtip');self.options.show.when.target.removeData("qtip-toggle");self.options.hide.when.target.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind('mouseover.qtip',self.focus);}
else assignEvents.call(self);return self;},destroy:function()
{var returned=self.beforeDestroy.call(self);if(returned===false)return;self.disable(true);self.elements.tooltip.remove();self.elements.target.removeData("qtip");self.onDestroy.call(self);return self.elements.target;},getPosition:function()
{var show=(!self.elements.tooltip.is(':visible'))?true:false;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();var offset=self.elements.tooltip.offset();if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return offset;}});construct.call(self);};function construct()
{var self=this;function render(event)
{self.beforeRender.call({options:self.options,elements:{target:self.elements.target}});self.elements.tooltip=$(document.createElement('div')).addClass('qtip').addClass(self.options.style.classes.tooltip||self.options.style).css('-moz-border-radius','').css('-webkit-border-radius','').css({position:self.options.position.type,zIndex:6000+$('.qtip').length}).appendTo(self.options.position.container).hide().data('qtip',self);self.elements.wrapper=$(document.createElement('div')).addClass('qtip-wrapper').css({position:'relative',overflow:'hidden',textAlign:'left'}).appendTo(self.elements.tooltip);self.elements.contentWrapper=$(document.createElement('div')).addClass('qtip-contentWrapper').css({overflow:'hidden'}).appendTo(self.elements.wrapper);self.elements.content=$(document.createElement('div')).addClass(self.options.style.classes.content).css(jQueryStyle(self.options.style)).appendTo(self.elements.contentWrapper);if(($.support&&!$.support.cssFloat)||$.browser.msie)
{$(self.elements.wrapper,self.elements.contentWrapper).css({lineHeight:'100%'});$(self.elements.wrapper).css({zoom:'1'});if(parseInt($.browser.version.charAt(0))==6)
{if($('select, object').length)bgiframe.call(self);var adjust=(self.options.style.border.radius<6)?-1:-2;self.elements.content.css({marginTop:adjust});}}
if(typeof self.options.style.width.value=='number')self.updateWidth();createBorder.call(self);createTip.call(self);if(self.options.content.text===false)
{var content=self.elements.target.attr('title').replace("\\n",'<br />');self.elements.target.attr('title','');}
else if(typeof $(self.options.content.text).length>0)
var content=$(self.options.content.text).clone(true);else var content=self.options.content.text;self.updateContent(content);if(self.options.content.title.text!==false)createTitle.call(self);if(self.options.content.url!==false)
{var url=self.options.content.url;var data=self.options.content.data;var method=self.options.content.method||'get';self.loadContent(url,data,method);}
assignEvents.call(self);if(self.options.show.ready===true)
{var tempLength=self.options.show.effect.length;self.elements.tooltip.show();self.options.show.effect.length=tempLength;}
self.onRender.call(self);}
if(self.options.content.prerender===false&&self.options.show.when.event!==false&&self.options.show.ready!==true)
{var showTarget=self.options.show.when.target;var showEvent=self.options.show.when.event;showTarget.bind(showEvent+'.qtip-create',function(event)
{showTarget.unbind(showEvent+'.qtip-create');render();self.mouse={x:event.pageX,y:event.pageY};showTarget.trigger(event);});}
else render();};function createBorder()
{var self=this;self.elements.tooltip.find('.qtip-borderTop, .qtip-borderBottom').remove();var width=self.options.style.border.width;var radius=self.options.style.border.radius;var color=self.options.style.border.color||self.options.style.tip.color;if(radius===0)
self.elements.contentWrapper.css({border:width+'px solid '+color})
else
{var borders=calculateBorders(radius);var shapes={};for(var i in borders)
{shapes[i]=$(document.createElement('div')).css({height:radius,width:radius,overflow:'hidden',position:'absolute',lineHeight:0.1,fontSize:1}).css((i.search(/Left/)!==-1)?'left':'right',0).attr('rel',i);}
if(document.createElement('canvas').getContext)
{for(var i in borders)
{var canvas=$(document.createElement('canvas')).attr('height',radius).attr('width',radius).css({verticalAlign:'top'}).appendTo(shapes[i]);drawBorder.call(self,canvas,borders[i],radius,color)}}
else if(($.support&&!$.support.cssFloat)||$.browser.msie)
{for(var i in borders)
{var arc=$('<v:arc style="behavior: url(#default#VML)"></v:arc>').attr('stroked',false).attr('fillcolor',color).attr('startangle',borders[i][0]).attr('endangle',borders[i][1]).css({width:radius*2+3,height:radius*2+3,marginLeft:(i.search(/Right/)!==-1)?borders[i][2]-3.5:-1,marginTop:(i.search(/bottom/)!==-1)?-2:-1,verticalAlign:'top',display:'inline-block'}).appendTo(shapes[i]);}}
var betweenCorners=$(document.createElement('div')).addClass('qtip-betweenCorners').css({height:radius,width:self.elements.tooltip.outerWidth()-(Math.max(width,radius)*2),overflow:'hidden',backgroundColor:color,lineHeight:0.1,fontSize:1})
var borderTop=$(document.createElement('div')).addClass('qtip-borderTop').css({height:radius,marginLeft:radius,lineHeight:0.1,fontSize:1,padding:0}).append(shapes['topLeft']).append(shapes['topRight']).append(betweenCorners).prependTo(self.elements.wrapper);var borderBottom=$(document.createElement('div')).addClass('qtip-borderBottom').css({height:radius,marginLeft:radius,lineHeight:0.1,fontSize:1,padding:0,clear:'both'}).append(shapes['bottomLeft']).append(shapes['bottomRight']).append(betweenCorners.clone()).appendTo(self.elements.wrapper);var sideWidth=Math.max(radius,(radius+(width-radius)))
var vertWidth=Math.max(width-radius,0);self.elements.contentWrapper.css({margin:0,border:'0px solid '+color,borderWidth:vertWidth+'px '+sideWidth+'px',position:'relative',clear:'both'})}};function drawBorder(canvas,coordinates,radius,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.arc(coordinates[0],coordinates[1],radius,0,Math.PI*2,false);context.fill();}
function createTip(corner)
{var self=this;var color=self.options.style.tip.color||self.options.style.border.color;if(self.options.style.tip.corner===false)return;else if(!corner)corner=self.options.style.tip.corner;if(self.elements.tip!==null)self.elements.tip.remove();$(self.elements.tooltip).find('.'+self.options.style.classes.tip).remove();self.elements.tip=$(document.createElement('div')).addClass(self.options.style.classes.tip).css({width:self.options.style.tip.size.x,height:self.options.style.tip.size.y,margin:'0 auto',lineHeight:0.1,fontSize:1}).attr('rel',corner)
if(document.createElement('canvas').getContext)
{var canvas=$(document.createElement('canvas')).attr('width',self.options.style.tip.size.x).attr('height',self.options.style.tip.size.y).appendTo(self.elements.tip);drawTip.call(self,canvas,corner,color);}
else if(($.support&&!$.support.cssFloat)||$.browser.msie)
{var coordinates=calculateTip(corner,self.options.style.tip.size.x,self.options.style.tip.size.y);var path='m'+coordinates[0][0]+','+coordinates[0][1];path+=' l'+coordinates[1][0]+','+coordinates[1][1];path+=' '+coordinates[2][0]+','+coordinates[2][1];path+=' xe';$('<v:shape style="behavior: url(#default#VML)"></v:shape>').attr('fillcolor',color).attr('stroked','false').attr('coordsize',self.options.style.tip.size.x+','+self.options.style.tip.size.y).attr('path',path).css({width:self.options.style.tip.size.x,height:self.options.style.tip.size.y,lineHeight:0.1,verticalAlign:(corner.search(/top/)!==-1)?'bottom':'top',display:'inline-block'}).appendTo(self.elements.tip)
if(($.support&&!$.support.cssFloat)||$.browser.msie)
self.elements.content.css({position:'relative'})}
else return debug('Canvas/VML unsupported, cannot draw the tip!');if(corner.search(/left|top|right/)!==-1)
self.elements.tip.prependTo(self.elements.tooltip);else
self.elements.tip.appendTo(self.elements.tooltip);positionTip.call(self,corner);};function drawTip(canvas,corner,color)
{var self=this;var coordinates=calculateTip(corner,self.options.style.tip.size.x,self.options.style.tip.size.y);var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.moveTo(coordinates[0][0],coordinates[0][1]);context.lineTo(coordinates[1][0],coordinates[1][1]);context.lineTo(coordinates[2][0],coordinates[2][1]);context.fill();}
function positionTip(corner)
{var self=this;if(self.options.style.tip.corner===false||!self.elements.tip)return;if(!corner)var corner=self.elements.tip.attr('rel');var radiusAdjust=self.options.style.border.radius;var pixelAdjust=(($.support&&!$.support.cssFloat)||$.browser.msie)?1:0;self.elements.tip.css(corner.match(/left|right|top|bottom/)[0],0);if(corner.search(/top|bottom/)!==-1)
{if(corner.search(/Middle/)!==-1)
{self.elements.tooltip.css({textAlign:'center'})}
else if(corner.search(/Left/)!==-1)
{self.elements.tip.css({marginLeft:radiusAdjust-pixelAdjust});self.elements.tooltip.css({marginLeft:-radiusAdjust});}
else if(corner.search(/Right/)!==-1)
{self.elements.tip.css({marginLeft:self.elements.tooltip.outerWidth()-self.options.style.tip.size.x-radiusAdjust-pixelAdjust});self.elements.tooltip.css({marginLeft:radiusAdjust})}
if(($.support&&!$.support.cssFloat)||$.browser.msie)
{if(corner.search(/bottom/)!==-1)
self.elements.tip.css({marginTop:-2});}}
else if(corner.search(/left|right/)!==-1)
{if(corner.search(/Middle/)!==-1)
{self.elements.tip.css({position:'absolute',top:"50%",marginTop:-(self.options.style.tip.size.y/2)});}
else if(corner.search(/Top/)!==-1)
{self.elements.tip.css({position:'absolute',top:radiusAdjust-pixelAdjust});self.elements.tooltip.css({marginTop:-radiusAdjust});}
else if(corner.search(/Bottom/)!==-1)
{self.elements.tip.css({position:'absolute',bottom:radiusAdjust+pixelAdjust});self.elements.tooltip.css({marginTop:radiusAdjust});}
if(($.support&&!$.support.cssFloat)||$.browser.msie)
{if(corner.search(/left/)!==-1)
self.elements.tip.css({marginLeft:-1});else
self.elements.tip.css({marginRight:1});}
var paddingCorner='padding-'+corner.match(/left|right/)[0];var paddingSize=(paddingCorner.search(/left/)!==-1)?self.options.style.tip.size.x:self.options.style.tip.size.y
if(paddingCorner!=='padding-bottom')self.elements.tooltip.css(paddingCorner,paddingSize-1);}};function createTitle()
{var self=this;if(self.elements.title!==null)self.elements.title.remove();self.elements.title=$(document.createElement('div')).addClass(self.options.style.classes.title).css(jQueryStyle(self.options.style.title,true)).html(self.options.content.title.text).prependTo(self.elements.contentWrapper);if(self.options.content.title.button!==false&&typeof self.options.content.title.button=='string')
{var button=$(document.createElement('a')).attr('href','#').css({'float':'right',position:'relative'}).addClass(self.options.style.classes.button).html(self.options.content.title.button).prependTo(self.elements.title).click(self.hide);}};function assignEvents()
{var self=this;var showTarget=self.options.show.when.target;var hideTarget=self.options.hide.when.target;if(self.options.hide.fixed)hideTarget=hideTarget.add(self.elements.tooltip);if(self.options.hide.when.event=='inactive')
{var inactiveEvents=['click','dblclick','mousedown','mouseup','mousemove','mouseout','mouseenter','mouseleave','mouseover'];function inactiveMethod()
{clearTimeout(self.timers.inactive);self.timers.inactive=setTimeout(function()
{$(inactiveEvents).each(function()
{hideTarget.unbind(this+'.qtip-inactive');self.elements.content.unbind(this+'.qtip-inactive');});self.hide();},self.options.hide.delay);}}
else if(self.options.hide.fixed===true)
{self.elements.tooltip.bind('mouseover.qtip',function()
{clearTimeout(self.timers.hide);});}
function showMethod(event)
{if(self.options.hide.when.event=='inactive')
{$(inactiveEvents).each(function()
{hideTarget.bind(this+'.qtip-inactive',inactiveMethod);self.elements.content.bind(this+'.qtip-inactive',inactiveMethod);});inactiveMethod();}
clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.timers.show=setTimeout(function(){self.show(event);},self.options.show.delay);}
function hideMethod(event)
{if(self.options.hide.fixed===true&&self.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&$(event.relatedTarget).parents('.qtip').length>0)
{event.stopPropagation();event.preventDefault();clearTimeout(self.timers.hide);return false;}
clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.timers.hide=setTimeout(function(){self.hide(event);},self.options.hide.delay);}
if((self.options.show.when.target.add(self.options.hide.when.target).length===1&&self.options.show.when.event==self.options.hide.when.event&&self.options.hide.when.event!=='inactive')||self.options.hide.when.event=='unfocus')
{showTarget.data('qtip-toggle',0);if(self.options.hide.when.event=='unfocus')
self.elements.tooltip.attr('unfocus',true);showTarget.bind(self.options.show.when.event+'.qtip',function(event)
{if(parseInt($(this).data('qtip-toggle'))===0)
showMethod(event);else
hideMethod(event);});}
else
{showTarget.bind(self.options.show.when.event+'.qtip',showMethod);if(self.options.hide.when.event!=='inactive')
hideTarget.bind(self.options.hide.when.event+'.qtip',hideMethod);}
if(self.options.position.type.search(/(fixed|absolute)/)!==-1)
self.elements.tooltip.bind('mouseover.qtip',self.focus);if(self.options.position.target=='mouse')
{showTarget.bind('mousemove.qtip',function(event)
{self.mouse={x:event.pageX,y:event.pageY};if(self.elements.tip.css('display')!=='none')
self.updatePosition(event,false);});}};function screenAdjust(currentPos,targetLength,event)
{var self=this;var corner=self.options.position.corner.tooltip;if(corner=='center')return
var tooltipLength={height:self.elements.tooltip.outerHeight(),width:self.elements.tooltip.outerWidth()};var newPos=$.extend(true,{},currentPos);if(self.options.position.target!=='mouse')
var targetPos=self.options.position.target.offset();var overflow={leftMin:(currentPos.left<$(window).scrollLeft()),leftMax:(newPos.left+tooltipLength.width+2>=$(window).width()+$(window).scrollLeft()),topMin:(currentPos.top<$(window).scrollTop()),topMax:(newPos.top+tooltipLength.height+2>=$(window).height()+$(window).scrollTop())};if(overflow.leftMin||overflow.leftMax)
{if(overflow.leftMin&&((corner.search(/right/i)===-1&&!overflow.leftMax)||corner.search(/right/i)!==-1))
{if(self.options.position.target=='mouse')
newPos.left=self.mouse.x
else
newPos.left=targetPos.left+targetLength.width;}
else if(overflow.leftMax&&((corner.search(/left/i)===-1&&!overflow.leftMin)||corner.search(/left/i)!==-1))
{if(corner.search(/(top|bottom)Middle/)!==-1)
newPos.left-=(targetLength.width/2)+(tooltipLength.width/2)+(self.options.position.adjust.x*2);else
newPos.left-=tooltipLength.width+targetLength.width+(self.options.position.adjust.x*2);}}
if(overflow.topMin||overflow.topMax)
{if(overflow.topMin&&corner.search(/top/i)===-1)
{if(self.options.position.target=='mouse')
newPos.top=self.mouse.y
else
newPos.top=targetPos.top+targetLength.height;}
else if(overflow.topMax&&corner.search(/bottom/i)===-1)
{if(corner.search(/(left|right)Middle/)!==-1)
newPos.top-=(targetLength.height/2)+(tooltipLength.height/2)+(self.options.position.adjust.y*2);else
newPos.top-=tooltipLength.height+targetLength.height+(self.options.position.adjust.y*2);}}
if(newPos.left<0)newPos.left=currentPos.left;if(newPos.top<0)newPos.top=currentPos.top;if(self.options.style.tip.corner!==false)
{corner=invertCornerString(corner,newPos.left!==currentPos.left,newPos.top!==currentPos.top,overflow)
if(corner!==self.elements.tip.attr('rel'))
{self.options.style.tip.corner=corner;createTip.call(self);}}
return newPos;};function jQueryStyle(style,title)
{var styleObj=$.extend(true,{},style);for(var i in styleObj)
{if(title===true&&i.search(/(tip|classes)/i)!==-1)
delete styleObj[i];else if(i.search(/(width|border|tip|title|classes|user)/i)!==-1)
delete styleObj[i];}
return styleObj;}
function sanitizeStyle(style)
{if(typeof style.tip!=='object')style.tip={corner:style.tip};if(typeof style.tip.size!=='object')style.tip.size={x:style.tip.size,y:style.tip.size};if(typeof style.border!=='object')style.border={width:style.border};if(typeof style.width!=='object')style.width={value:style.width};if(typeof style.width.max=='string')style.width.max=parseInt(style.width.max.replace(/([0-9]+)/i,"$1"));if(typeof style.width.min=='string')style.width.min=parseInt(style.width.min.replace(/([0-9]+)/i,"$1"));return style;}
function buildStyle()
{var self=this;var styleArray=[true,{}];for(var i=0;i<arguments.length;i++)
styleArray.push(arguments[i]);var styleExtend=[$.extend.apply($,styleArray)];while(typeof styleExtend[0].name=='string')
{var nextStyle=sanitizeStyle($.fn.qtip.styles[styleExtend[0].name]);styleExtend.unshift(nextStyle);}
styleExtend.unshift(true,{classes:{tooltip:'qtip-'+arguments[0].name}},$.fn.qtip.styles.defaults);var final=$.extend.apply($,styleExtend);var pixelAdjust=(($.support&&!$.support.cssFloat)||$.browser.msie)?1:0;final.tip.size.x+=pixelAdjust;final.tip.size.y+=pixelAdjust;if(final.tip.size.x%2>0)final.tip.size.x+=1;if(final.tip.size.y%2>0)final.tip.size.y+=1;if(final.tip.corner===true)
final.tip.corner=(self.options.position.corner.tooltip==='center')?false:self.options.position.corner.tooltip;return final;};function calculateTip(corner,width,height)
{var tips={bottomRight:[[0,0],[width,height],[width,0]],bottomLeft:[[0,0],[width,0],[0,height]],topRight:[[0,height],[width,0],[width,height]],topLeft:[[0,0],[0,height],[width,height]],topMiddle:[[0,height],[width/2,0],[width,height]],bottomMiddle:[[0,0],[width,0],[width/2,height]],rightMiddle:[[0,0],[width,height/2],[0,height]],leftMiddle:[[width,0],[width,height],[0,height/2]]}
tips.leftTop=tips.bottomRight;tips.rightTop=tips.bottomLeft;tips.leftBottom=tips.topRight;tips.rightBottom=tips.topLeft;return tips[corner];};function calculateBorders(radius)
{if(document.createElement('canvas').getContext)
{var borders={topLeft:[radius,radius],topRight:[0,radius],bottomLeft:[radius,0],bottomRight:[0,0]}}
else if(($.support&&!$.support.cssFloat)||$.browser.msie)
{var borders={topLeft:[-90,90,0],topRight:[-90,90,-radius],bottomLeft:[90,270,0],bottomRight:[90,270,-radius]}}
return borders;};function invertCornerString(corner,x,y,overflow)
{if(x)
{if(corner.search(/(top|bottom)Middle/)!==-1)
{if(overflow.leftMin)
corner=corner.replace('Middle','Left');else if(overflow.leftMax)
corner=corner.replace('Middle','Right');}
else if(corner.search(/right/)!==-1)corner=corner.replace('right','left');else if(corner.search(/Right/)!==-1)corner=corner.replace('Right','Left');else if(corner.search(/left/)!==-1)corner=corner.replace('left','right');else if(corner.search(/Left/)!==-1)corner=corner.replace('Left','Right');}
if(y)
{if(corner.search(/(left|right)Middle/)!==-1)
{if(overflow.topMin)
corner=corner.replace('Middle','Top');else if(overflow.topMax)
corner=corner.replace('Middle','Bottom');}
else if(corner.search(/top/)!==-1)corner=corner.replace('top','bottom');else if(corner.search(/Top/)!==-1)corner=corner.replace('Top','Bottom');else if(corner.search(/bottom/)!==-1)corner=corner.replace('bottom','top');else if(corner.search(/Bottom/)!==-1)corner=corner.replace('Bottom','Top');}
return corner;};function bgiframe()
{var self=this;var html='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" '+'style="display:block; position:absolute; z-index:-1; filter:Alpha(Opacity=\'0\'); '+'top:expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\'); '+'left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\'); '+'width:expression(this.parentNode.offsetWidth+\'px\'); '+'height:expression(this.parentNode.offsetHeight+\'px\');"/>';$(html).prependTo(self.elements.tooltip);}
function debug(text)
{if(window.console&&window.console.log)
window.console.log('qTip: '+text);};$.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:'bottomRight',tooltip:'topLeft'},adjust:{x:0,y:0,screen:false,scroll:true,resize:true},type:'absolute',container:false},show:{when:{target:false,event:'mouseover'},effect:{type:'fade',length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:'mouseout'},effect:{type:'fade',length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};$.fn.qtip.styles={defaults:{background:'white',color:'#111',overflow:'hidden',textAlign:'left',width:{min:0,max:250},padding:'5px 9px',border:{width:1,radius:0,color:'#d3d3d3'},tip:{corner:false,color:false,size:{x:13,y:13},opacity:1},title:{background:'#e1e1e1',fontWeight:'bold',padding:'7px 12px'},classes:{target:'',tip:'qtip-tip',title:'qtip-title',content:'qtip-content',active:'qtip-active'}},cream:{border:{width:3,radius:0,color:'#F9E98E'},title:{background:'#F0DE7D',color:'#A27D35'},background:'#FBF7AA',color:'#A27D35',classes:{tooltip:'qtip-cream'}},light:{border:{width:3,radius:0,color:'#E2E2E2'},title:{background:'#f1f1f1',color:'#454545'},background:'white',color:'#454545',classes:{tooltip:'qtip-light'}},dark:{border:{width:3,radius:0,color:'#303030'},title:{background:'#404040',color:'#f3f3f3'},background:'#505050',color:'#f3f3f3',classes:{tooltip:'qtip-dark'}},red:{border:{width:3,radius:0,color:'#CE6F6F'},title:{background:'#f28279',color:'#9C2F2F'},background:'#F79992',color:'#9C2F2F',classes:{tooltip:'qtip-red'}},green:{border:{width:3,radius:0,color:'#A9DB66'},title:{background:'#b9db8c',color:'#58792E'},background:'#CDE6AC',color:'#58792E',classes:{tooltip:'qtip-green'}},blue:{border:{width:3,radius:0,color:'#ADD9ED'},title:{background:'#D0E9F5',color:'#5E99BD'},background:'#E5F6FE',color:'#4D9FBF',classes:{tooltip:'qtip-blue'}}}
var adjustTimer;$(window).bind('resize scroll',function(event)
{clearTimeout(adjustTimer);adjustTimer=setTimeout(function()
{$('.qtip').each(function()
{var api=$(this).qtip("api");if(api.options.position.adjust.scroll&&event.type==='scroll'||api.options.position.adjust.resize&&event.type==='resize')
api.updatePosition(event);})},100);})
$(document).bind('mousedown.qtip',function(event)
{if($(event.target).parents('div.qtip').length===0)
{$('.qtip[unfocus]').each(function()
{var api=$(this).qtip("api");if($(this).is(':visible')&&$(event.target).add(api.elements.target).length>1)
api.hide();})}});})(jQuery);
	
	$(document).ready(function() {
		$('.xform .holder .input-text[help]').each(function(i){ $(this).attr("title", $(this).attr("help")); });
		$('.xform .holder .input-text[help]').qtip({
			content: { prerender: true, text: false },
			show: { when: 'focus' },
			hide: { when: 'blur' },
			name: 'light',
			position: {
				corner: { target: 'rightMiddle', tooltip: 'leftMiddle' }
			},
			style: {
				color: '#000000',
				border: { color: '#ff8400', width: 1 },
				name: 'light',
				padding: '5px 10px',
				tip: 'leftMiddle',
				width: 245
			}
		});
		$('.xform .holder .input-text[help2]').each(function(i){ $(this).attr("title", $(this).attr("help2")); });
		$('.xform .holder .input-text[help2]').qtip({
			content: { prerender: true, text: false },
			show: { when: 'focus' },
			hide: { when: 'blur' },
			name: 'light',
			position: {
				corner: { target: 'leftMiddle', tooltip: 'rightMiddle' }
			},
			style: {
				color: '#000000',
				border: { color: '#ff8400', width: 1 },
				name: 'light',
				padding: '5px 10px',
				tip: 'rightMiddle',
				width: 245
			}
		});
		
		$(".hoverhome").hover(
		  function () {
			$('.'+$(this).attr("rel")).show();
		  },
		  function () {
		    $('.'+$(this).attr("rel")).hide();
		  }
		);
	});
	
$('.ch').livequery('click', function(event) {
	if($('.ch[value='+$(this).val()+']:checked').length>1) {
		$('.ch[value='+$(this).val()+']:checked').removeAttr('checked');
		$( this ).attr('checked','checked')
	}
});
