(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)}})})();var Drupal=Drupal||{};Drupal.jsEnabled=document.getElementsByTagName&&document.createElement&&document.createTextNode&&document.documentElement&&document.getElementById;Drupal.extend=function(c){for(var a in c){if(this[a]){Drupal.extend.apply(this[a],[c[a]])}else{this[a]=c[a]}}};Drupal.redirectFormButton=function(d,a,c){a.onmouseover=a.onfocus=function(){a.onclick=function(){Drupal.createIframe();var g=this;var h=g.form.action;var j=g.form.target;this.form.action=d;this.form.target="redirect-target";c.onsubmit();window.iframeHandler=function(){var k=$("#redirect-target").get(0);g.form.action=h;g.form.target=j;try{response=(k.contentWindow||k.contentDocument||k).document.body.innerHTML;response=response.replace(/[\f\n\r\t]/g," ");if(window.opera){response=response.replace(/&quot;/g,'"')}}catch(l){response=null}response=Drupal.parseJson(response);if(response.status==0){c.onerror(response.data);return}c.oncomplete(response.data);return true};return true}};a.onmouseout=a.onblur=function(){a.onclick=null}};Drupal.absolutePosition=function(h){var c=0,a=0;var g=/^div$/i.test(h.tagName);if(g&&h.scrollLeft){c=h.scrollLeft}if(g&&h.scrollTop){a=h.scrollTop}var j={x:h.offsetLeft-c,y:h.offsetTop-a};if(h.offsetParent){var d=Drupal.absolutePosition(h.offsetParent);j.x+=d.x;j.y+=d.y}return j};Drupal.dimensions=function(a){return{width:a.offsetWidth,height:a.offsetHeight}};Drupal.mousePosition=function(a){return{x:a.clientX+document.documentElement.scrollLeft,y:a.clientY+document.documentElement.scrollTop}};Drupal.parseJson=function(data){if((data.substring(0,1)!="{")&&(data.substring(0,1)!="[")){return{status:0,data:data.length?data:"Unspecified error"}}return eval("("+data+");")};Drupal.createIframe=function(){if($("#redirect-holder").size()){return}window.iframeHandler=function(){};var c=document.createElement("div");c.id="redirect-holder";$(c).html('<iframe name="redirect-target" id="redirect-target" class="redirect" onload="window.iframeHandler();"></iframe>');var a=c.firstChild;$(a).attr({name:"redirect-target",id:"redirect-target"}).css({position:"absolute",height:"1px",width:"1px",visibility:"hidden"});$("body").append(c)};Drupal.deleteIframe=function(){$("#redirect-holder").remove()};Drupal.freezeHeight=function(){Drupal.unfreezeHeight();var a=document.createElement("div");$(a).css({position:"absolute",top:"0px",left:"0px",width:"1px",height:$("body").css("height")}).attr("id","freeze-height");$("body").append(a)};Drupal.unfreezeHeight=function(){$("#freeze-height").remove()};Drupal.encodeURIComponent=function(c,a){a=a||location.href;c=encodeURIComponent(c).replace(/%2F/g,"/");return(a.indexOf("?q=")!=-1)?c:c.replace(/%26/g,"%2526").replace(/%23/g,"%2523").replace(/\/\//g,"/%252F")};if(Drupal.jsEnabled){document.documentElement.className="js"}jQuery.each(["id","title","name","href","src","rel"],function(a,c){jQuery.fn[c]=function(d){return d==undefined?this.length?this[0][c]:null:this.attr(c,d)}});jQuery.each("top,left,position,float,overflow,color,background".split(","),function(a,c){jQuery.fn[c]=function(d){return d==undefined?(this.length?jQuery.css(this[0],c):null):this.css(c,d)}});var e=("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select,submit,keydown,keypress,keyup,error").split(",");for(var i=0;i<e.length;i++){new function(){var a=e[i];jQuery.fn["un"+a]=function(c){return this.unbind(a,c)};jQuery.fn["one"+a]=function(g){var c=jQuery(this);var d=function(){c.unbind(a,d);c=null;return g.apply(this,arguments)};return this.bind(a,d)}}}jQuery.fn.ancestors=jQuery.fn.parents;jQuery.expr[":"]["nth-child"]="jQuery.nth(a.parentNode.firstChild,parseInt(m[3])+1,'nextSibling')==a";jQuery.fn._filter=jQuery.fn.filter;jQuery.fn.filter=function(a){return this._filter(a.constructor==Array?a.join(","):a)};(function(a){a.each(["eq","lt","gt","contains"],function(c,d){a.fn[d]=function(g,h){return this.filter(":"+d+"("+g+")",h)}});a.fn.evalScripts=function(){};a.fn.loadIfModified=function(){var c=a.ajaxSettings.ifModified;a.ajaxSettings.ifModified=true;var d=a.fn.load.apply(this,arguments);a.ajaxSettings.ifModified=c;return d};a.getIfModified=function(){var c=a.ajaxSettings.ifModified;a.ajaxSettings.ifModified=true;var d=a.get.apply(a,arguments);a.ajaxSettings.ifModified=c;return d};a.ajaxTimeout=function(c){a.ajaxSettings.timeout=c}})(jQuery);Drupal.toJson=function(c){switch(typeof c){case"boolean":return c==true?"true":"false";case"number":return c;case"string":return'"'+c+'"';case"object":var a=[];if(c instanceof Array){for(var d=0;d<c.length;d++){a.push(Drupal.toJson(c[d]))}return"["+a.join(",")+"]"}else{for(var d in c){a.push('"'+d+'":'+Drupal.toJson(c[d]))}return"{"+a.join(",")+"}"}default:return"null"}};Drupal.service=function(d,a,c){a=$.extend({method:d},a);args_done={};for(i in a){args_done[i]=Drupal.toJson(a[i])}$.post(Drupal.settings.baseurl+"?q=services/json",args_done,function(g){parsed_data=Drupal.parseJson(g);c(!parsed_data["#error"],parsed_data["#data"])})};(function(c){c.fn.extend({offset:function(h,o){if(!this[0]){error()}var n=0,m=0,z=0,s=0,A=this[0],l=this[0],k,g,w=c.css(A,"position"),v=c.browser.mozilla,p=c.browser.msie,u=c.browser.opera,C=c.browser.safari,j=c.browser.safari&&parseInt(c.browser.version)>520,q=false,t=false,h=c.extend({margin:true,border:false,padding:false,scroll:true,lite:false,relativeTo:document.body},h||{});if(h.lite){return this.offsetLite(h,o)}if(h.relativeTo.jquery){h.relativeTo=h.relativeTo[0]}if(A.tagName=="BODY"){n=A.offsetLeft;m=A.offsetTop;if(v){n+=a(A,"marginLeft")+(a(A,"borderLeftWidth")*2);m+=a(A,"marginTop")+(a(A,"borderTopWidth")*2)}else{if(u){n+=a(A,"marginLeft");m+=a(A,"marginTop")}else{if((p&&jQuery.boxModel)){n+=a(A,"borderLeftWidth");m+=a(A,"borderTopWidth")}else{if(j){n+=a(A,"marginLeft")+a(A,"borderLeftWidth");m+=a(A,"marginTop")+a(A,"borderTopWidth")}}}}}else{do{g=c.css(l,"position");n+=l.offsetLeft;m+=l.offsetTop;if((v&&!l.tagName.match(/^t[d|h]$/i))||p||j){n+=a(l,"borderLeftWidth");m+=a(l,"borderTopWidth");if(v&&g=="absolute"){q=true}if(p&&g=="relative"){t=true}}k=l.offsetParent||document.body;if(h.scroll||v){do{if(h.scroll){z+=l.scrollLeft;s+=l.scrollTop}if(u&&(c.css(l,"display")||"").match(/table-row|inline/)){z=z-((l.scrollLeft==l.offsetLeft)?l.scrollLeft:0);s=s-((l.scrollTop==l.offsetTop)?l.scrollTop:0)}if(v&&l!=A&&c.css(l,"overflow")!="visible"){n+=a(l,"borderLeftWidth");m+=a(l,"borderTopWidth")}l=l.parentNode}while(l!=k)}l=k;if(l==h.relativeTo&&!(l.tagName=="BODY"||l.tagName=="HTML")){if(v&&l!=A&&c.css(l,"overflow")!="visible"){n+=a(l,"borderLeftWidth");m+=a(l,"borderTopWidth")}if(((C&&!j)||u)&&g!="static"){n-=a(k,"borderLeftWidth");m-=a(k,"borderTopWidth")}break}if(l.tagName=="BODY"||l.tagName=="HTML"){if(((C&&!j)||(p&&c.boxModel))&&w!="absolute"&&w!="fixed"){n+=a(l,"marginLeft");m+=a(l,"marginTop")}if(j||(v&&!q&&w!="fixed")||(p&&w=="static"&&!t)){n+=a(l,"borderLeftWidth");m+=a(l,"borderTopWidth")}break}}while(l)}var B=d(A,h,n,m,z,s);if(o){c.extend(o,B);return this}else{return B}}});var a=function(g,h){return parseInt(c.css(g.jquery?g[0]:g,h))||0};var d=function(l,k,h,m,g,j){if(!k.margin){h-=a(l,"marginLeft");m-=a(l,"marginTop")}if(k.border&&((c.browser.safari&&parseInt(c.browser.version)<520)||c.browser.opera)){h+=a(l,"borderLeftWidth");m+=a(l,"borderTopWidth")}else{if(!k.border&&!((c.browser.safari&&parseInt(c.browser.version)<520)||c.browser.opera)){h-=a(l,"borderLeftWidth");m-=a(l,"borderTopWidth")}}if(k.padding){h+=a(l,"paddingLeft");m+=a(l,"paddingTop")}if(k.scroll&&(!c.browser.opera||l.offsetLeft!=l.scrollLeft&&l.offsetTop!=l.scrollLeft)){g-=l.scrollLeft;j-=l.scrollTop}return k.scroll?{top:m-j,left:h-g,scrollTop:j,scrollLeft:g}:{top:m,left:h}}})(jQuery);function booktree_attach_handlers(a){$(".book-tree-top",a).click(booktree_click_handler);$(".book-tree-short",a).mouseover(function(c){booktree_overout_handler(c,true)});$(".book-tree-short",a).mouseout(function(c){booktree_overout_handler(c,false)})}booktree_is_loaded={};function booktree_toggle(a){var k=a.className.split(/\s+/);var j;for(var d=0;d<k.length;d++){if(k[d].match(/^book-tree-\d+$/)){j=k[d].substring("book-tree-".length);break}}if(!j){throw"No id?!?"}if(booktree_is_loaded[j]||a.getElementsByTagName("UL").length){booktree_toggle_loaded(a);return}jQuery.className.add(a,"loading");var g=a.parentNode;var h=null;while(g&&h===null){if(jQuery.className.has(g,"book-tree-long")){h=false}else{if(jQuery.className.has(g,"book-tree-short")){h=true}}g=g.parentNode}Drupal.service("book.getChildren",{parent_id:j,options:{is_short:h,hide:true,is_nested:true}},function(c,l){var m;jQuery.className.remove(a,"loading");if(c==false){alert("Fatal error: could not load content");return}while(m=a.firstChild.nextSibling){a.removeChild(m)}a.innerHTML+=l;booktree_is_loaded[j]=true;booktree_toggle_loaded(a)})}function booktree_toggle_loaded(a){if(jQuery.className.has(a,"collapsed")){jQuery.className.remove(a,"collapsed");jQuery.className.add(a,"expanded")}else{jQuery.className.remove(a,"expanded");jQuery.className.add(a,"collapsed")}$(a.childNodes[1]).toggle()}function booktree_click_handler(g){var d=g.target;while(d&&d.tagName!="UL"&&d.tagName!="LI"){d=d.parentNode}if(!d){alert("Strange bug - target has no li parent");return}var a=function(k,l){return parseInt($.css(k.jquery?k[0]:k,l))||0};var h=function(l){var k=l.offsetHeight;var m=a(l,"marginBottom");if(l.nextSibling){m=Math.max(m,a(l,"marginTop"))}return k+m};if(d.tagName=="UL"){var j=d.firstChild;var c=$(j).offset().top;while(true){height=h(j);if(c+height>=g.pageY){break}c+=height;j=j.nextSibling}d=j}if(!booktree_li_fits(g,d)){return}d&&booktree_toggle(d);g.preventDefault();g.stopPropagation()}function booktree_li_fits(c,a){if(!jQuery.className.has(a,"expanded")&&!jQuery.className.has(a,"collapsed")){return}var d=$(a.firstChild).offset();if(c.pageX>d.left){return}if(c.pageY>d.top+a.firstChild.offsetHeight||c.pageY<d.top){return}return true}function find_teaser_parent(a){if(!a){return}while(!a.tagName){a=a.parentNode}while(a.tagName!="BODY"&&a.tagName){if(a.className.match(/(^|\s)toc-teaser(\s|$)/)){return a}a=a.parentNode}return false}function booktree_overout_handler(d,a){var c=d.target;if(!c){return}if(c.tagName=="A"&&c.className.match(/^book-tree-link/)){booktree_toc_handler(d,a)}if(!a){}}function booktree_toc_handler(j,g){var k=j.target;var c;for(var d=0;d<k.parentNode.childNodes.length;d++){if(k.parentNode.childNodes[d].className.match(/(^|\s)toc-teaser(\s|$)/)){var c=k.parentNode.childNodes[d];break}}if(!g){var h=j.relatedTarget||j.toElement;if(!find_teaser_parent(h)){hide_teaser()}return}if(!c){return}var a=$(k).offset();var l=a.top-20;var m=a.left+k.offsetWidth-1;if(!c.prepared){c.style.margin=0;$(c).mouseout(function(n){if(this==find_teaser_parent(n.relatedTarget||n.toElement)){return}hide_teaser()});c.prepared=true}c.style.top=l+"px";c.style.left=m+"px";show_teaser(c)}function show_teaser(a){window.currentTeaser=a;a.style.display="block"}function hide_teaser(){if(window.currentTeaser){window.currentTeaser.style.display="none";delete window.currentTeaser}}$(document).ready(booktree_attach_handlers);var editor={instances:[],buttons:[],popups:[],path:"",dialog:{},bpr:20,mode:(window.getSelection||document.getSelection)?1:(document.selection&&document.selection.createRange?2:0)};editor.initiate=function(){var c,a,d=document.getElementsByTagName("textarea");for(c=0;a=d[c];c++){if(editor.hasClass(a,"editor-textarea")){editor.processTextarea(a)}}};editor.instance=function(c,a){this.index=a;this.textArea=c;this.textArea.editor=this;this.buttons=document.getElementById("editor-"+a).getElementsByTagName("input");this.bindex=null;this.focus=function(){this.textArea.focus()};this.getContent=function(){return editor.processText(this.textArea.value)};this.setContent=function(g){var d=this.textArea.scrollTop;this.textArea.value=g;this.textArea.scrollTop=d};this.getSelection=function(){var d=this.posSelection();return this.getContent().substring(d.start,d.end)};this.replaceSelection=function(d,j){var d=editor.processText(d);var l=this.posSelection();var h=this.getContent();this.setContent(h.substr(0,l.start)+d+h.substr(l.end));var g=j=="start"?l.start:l.start+d.length;var k=j=="end"?g:l.start;this.makeSelection(k,g)};this.tagSelection=function(k,g,l){var k=editor.processText(k);var g=editor.processText(g);var j=k.length;var n=this.posSelection();var h=this.getContent();this.setContent(h.substr(0,n.start)+k+h.substring(n.start,n.end)+g+h.substr(n.end));var d=l=="start"?n.start+j:n.end+j;var m=l=="end"?d:n.start+j;this.makeSelection(m,d)};this.makeSelection=function(g,d){if(d<g){d=g}editor.selMake(this.textArea,g,d);if(editor.dialog.esp){editor.dialog.esp={start:g,end:d}}};this.posSelection=function(){return editor.dialog.esp?editor.dialog.esp:editor.selPos(this.textArea)};this.buttonsDisabled=function(h,g){for(var d=0;b=this.buttons[d];d++){b.disabled=d==g?!h:h}};this.accesskeys=function(g){for(var d=0;b=this.buttons[d];d++){b.accessKey=g?editor.buttons[d][3]:""}}};editor.buttonClick=function(d,h){try{var j=editor.active=editor.instances[d];j.bindex=h;var c=editor.buttons[h];var g=c[1];editor.dialog.close();if(c[4]){c[4](j)}else{if(g){var a=g.split("%TEXT%");if(a.length==2){j.tagSelection(a[0],a[1])}else{j.replaceSelection(a.length==1?g:a.join(j.getSelection()),"end")}}}if(!editor.hasClass(j.buttons[h],"stay-clicked")){j.focus()}}catch(k){alert(k.name+": "+k.message)}return false};editor.template=function(){if(typeof editor.tplHTML!="undefined"){return editor.tplHTML}editor.tplHTML="";for(var c=0;b=editor.buttons[c];c++){if(c&&c%editor.bpr==0){editor.tplHTML+="<br />"}if(b[1].substr(0,3)=="js:"){b[4]=new Function("E",b[1].substr(3))}var a=b[2].search(/\.(png|gif|jpg|jpeg)$/i)!=-1?('type="image" src="'+editor.path+"icons/"+b[2]+'" class="editor-image-button"'):('type="button" value="'+b[2]+'" class="editor-text-button"');editor.tplHTML+="<input "+a+' onclick="editor.buttonClick(%n, '+c+'); return false;" id="editor-%n-button-'+c+'" title="'+b[0]+'" accesskey="'+b[3]+'" />'}return editor.tplHTML};editor.processTextarea=function(d){if(d.editor||d.style.display=="none"||d.style.visibility=="hidden"){return}var c=editor.instances.length;var a=document.createElement("div");a.id="editor-"+c;a.className="editor-container";a.innerHTML=editor.template().replace(/\%n/g,c);d.parentNode.insertBefore(a,d);var g=editor.instances[c]=new editor.instance(d,c);d.onfocus=function(){if(!(editor.active==this.editor||editor.dialog.editor)){editor.active.accesskeys(false);this.editor.accesskeys(true);editor.active=this.editor}};if(c==0){editor.active=g;editor.dialog.popup=editor.createPopup("editor-dialog");editor.dialog.popup.close=function(){editor.dialog.close()}}else{g.accesskeys(false)}};editor.openPopup=function(g,d,c){var a=editor.createPopup(g);a.open(d,c);return a};editor.createPopup=function(pid,ptitle,pcontent){if(editor.popups[pid]){return editor.popups[pid]}var popup=editor.popups[pid]=document.createElement("table");with(popup){with(insertRow(0)){className="head even";with(insertCell(0)){className="title";innerHTML=ptitle||""}with(insertCell(1)){className="close";innerHTML="<a>x</a>"}}with(insertRow(1)){className="body odd";with(insertCell(0)){className="content";colSpan=2;innerHTML=pcontent||""}}rows[0].onmousedown=function(e){var e=e||window.event;var P=editor.popups[pid];var X=e.clientX-parseInt(P.style.left||0);var Y=e.clientY-parseInt(P.style.top||0);document.onmousemove=function(e){var e=e||window.event;P.style.left=(e.clientX-X)+"px";P.style.top=(e.clientY-Y)+"px";return false};document.onmouseup=function(e){document.onmousemove=null;document.onmouseup=null};return false};rows[0].cells[1].firstChild.onclick=function(){editor.popups[pid].close()};id=pid;className="editor-popup";style.position="absolute";style.display="none"}popup.open=function(title,content,keeppos){if(typeof(title)=="string"){this.rows[0].cells[0].innerHTML=title}if(typeof(content)=="string"){this.rows[1].cells[0].innerHTML=content}if(!keeppos){this.style.left=editor.absPos(editor.active.textArea,"x")+"px";this.style.top=editor.absPos(editor.active.textArea,"y")-25+"px"}this.style.display="block";this.ed=editor.active};popup.close=function(){this.style.display="none"};document.body.appendChild(popup);return popup};editor.dialog.open=function(c,a){if(this.editor){this.close()}this.editor=editor.active;this.editor.buttonsDisabled(true);editor.addClass(this.editor.buttons[this.editor.bindex],"stay-clicked");this.esp=this.editor.posSelection();this.popup.open(c,a);this.oldfocus=this.editor.textArea.onfocus;this.editor.textArea.onfocus=function(){this.blur()}};editor.dialog.close=function(){if(this.editor){this.editor.textArea.onfocus=this.oldfocus;this.editor.buttonsDisabled(false);editor.delClass(this.editor.buttons[this.editor.bindex],"stay-clicked");if(this.editor==editor.active){if(editor.mode==2){this.editor.makeSelection(this.esp.start,this.esp.end)}else{this.editor.focus()}}this.editor=null;this.esp=null;this.popup.style.display="none"}};editor.absPos=function(c,a){var g=a=="x"?"offsetLeft":"offsetTop";var d=c[g]||0;while(c=c.offsetParent){d+=c[g]}return d};editor.hasClass=function(c,a){return c.className&&(" "+c.className+" ").indexOf(" "+a+" ")!=-1};editor.addClass=function(c,a){if(!editor.hasClass(c,a)){c.className+=" "+a}};editor.delClass=function(c,a){if(editor.hasClass(c,a)){c.className=c.className.replace(new RegExp("(^| +)"+a+"( +|$)","g")," ")}};editor.inArray=function(d,a){for(var c in a){if(a[c]==d){return true}}};editor.regEsc=function(a){return a.replace(/([\\\^\$\*\+\?\.\(\)\[\]\{\}\|])/g,"\\$1")};if(editor.mode==0){editor.selPos=function(a){return{start:a.value.length,end:a.value.length}};editor.selMake=function(c,d,a){}}else{if(editor.mode==1){editor.selPos=function(a){return{start:a.selectionStart||0,end:a.selectionEnd||0}};editor.selMake=function(c,d,a){c.setSelectionRange(d,a)}}else{if(editor.mode==2){editor.selPos=function(k){k.focus();var g=k.value.replace(/\r\n/g,"\n");var j="~`^";for(var m=0;g.indexOf(j)!=-1;m++){j+=j.charAt(m)}var c=j.length;var n=document.selection.createRange();var d=n.getBookmark();var o=n.text.replace(/\r\n/g,"\n").length;n.text=j;var l=k.value.replace(/\r\n/g,"\n");var a=l.indexOf(j);for(var m=0;l.charAt(a+m+c)=="\n";m++){}var h=a+o;for(;g.charAt(h)=="\n";h++){}h-=m;k.value=g;if(a==h&&!g.charAt(h)){n.collapse(false)}else{n.moveToBookmark(d)}n.select();return{start:a,end:h}};editor.selMake=function(c,d,a){range=c.createTextRange();range.collapse();range.moveEnd("character",a);range.moveStart("character",d);range.select()}}}}editor.processText=function(a){return editor.mode==2?a.replace(/\r\n/g,"\n"):a};if(document.getElementsByTagName&&document.createElement&&document.getElementById){var wload=window.onload;window.onload=typeof(wload)=="function"?function(a){wload(a);editor.initiate()}:editor.initiate}Drupal.dhtmlMenu={};Drupal.dhtmlMenu.autoAttach=function(){var c=Drupal.dhtmlMenu.getCookie("dhtml_menu");if(c!=""){var a=c.split(",");for(var d=0;d<a.length;d++){$("#"+a[d]).show();$("#"+a[d]).removeClass("sub-collapsed").addClass("sub-expanded");$("#menu-"+a[d]).removeClass("collapsed").addClass("expanded")}}$('ul.menu li[@class!="leaf"] > a').each(function(){if($(this).parent().children("div.submenu").length>0){$(this).css({display:"block",zIndex:2}).click(function(g){id=$(this).parents()[0].id.replace("menu-","");Drupal.dhtmlMenu.switchMenu($("#"+id)[0],$(this).parents()[0]);return false}).dblclick(function(g){window.location=this.href})}});$(window).unload(Drupal.dhtmlMenu.saveMenuState)};Drupal.dhtmlMenu.switchMenu=function(c,a){if($(a).is(".expanded")){if(Drupal.settings.dhtmlMenu.useEffects){$(c).animate({height:"hide",opacity:"hide"},"500")}else{$(c).css("display","none")}$(a).removeClass("expanded").addClass("collapsed");$(c).removeClass("sub-expanded").addClass("sub-collapsed")}else{if(Drupal.settings.dhtmlMenu.useEffects){$(c).animate({height:"show",opacity:"show"},"500")}else{$(c).css("display","block")}$(a).removeClass("collapsed").addClass("expanded");$(c).removeClass("sub-collapsed").addClass("sub-expanded")}Drupal.dhtmlMenu.saveMenuState()};Drupal.dhtmlMenu.getCookie=function(c){var d=c+"=";var g="";if(document.cookie.length>0){offset=document.cookie.indexOf(d);if(offset!=-1){offset+=d.length;var a=document.cookie.indexOf(";",offset);if(a==-1){a=document.cookie.length}g=unescape(document.cookie.substring(offset,a))}}return g};Drupal.dhtmlMenu.saveMenuState=function(){var a="";$("div.submenu").each(function(c){if($(this).is(".sub-expanded")){if(a!=""){a+=","}a+=this.id}});document.cookie="dhtml_menu="+a+";path=/"};if(Drupal.jsEnabled){$(document).ready(Drupal.dhtmlMenu.autoAttach)}Drupal.textareaAttach=function(){$("textarea.resizable:not(.processed)").each(function(){var a=$(this).addClass("processed"),g=null;$(this).wrap('<div class="resizable-textarea"><span></span></div>').parent().append($('<div class="grippie"></div>').mousedown(c));var d=$("div.grippie",$(this).parent())[0];d.style.marginRight=(d.offsetWidth-$(this)[0].offsetWidth)+"px";function c(k){g=a.height()-Drupal.mousePosition(k).y;a.css("opacity",0.25);$(document).mousemove(h).mouseup(j);return false}function h(k){a.height(Math.max(32,g+Drupal.mousePosition(k).y)+"px");return false}function j(k){$(document).unmousemove(h).unmouseup(j);a.css("opacity",1)}})};if(Drupal.jsEnabled){$(document).ready(Drupal.textareaAttach)}Drupal.toggleFieldset=function(a){if($(a).is(".collapsed")){var c=$("> div",a).hide();$(a).removeClass("collapsed");c.slideDown({duration:300,complete:function(){$(this).css("height","auto");Drupal.collapseScrollIntoView(this.parentNode);this.parentNode.animating=false},step:function(){Drupal.collapseScrollIntoView(this.parentNode)}});if(typeof Drupal.textareaAttach!="undefined"){Drupal.textareaAttach(null,a)}}else{var c=$("> div",a).slideUp("medium",function(){$(this.parentNode).addClass("collapsed");this.parentNode.animating=false})}};Drupal.collapseScrollIntoView=function(c){var a=self.innerHeight||document.documentElement.clientHeight||$("body")[0].clientHeight||0;var g=self.pageYOffset||document.documentElement.scrollTop||$("body")[0].scrollTop||0;var j=Drupal.absolutePosition(c);var d=55;if(j.y+c.offsetHeight+d>a+g){if(c.offsetHeight>a){window.scrollTo(0,j.y)}else{window.scrollTo(0,j.y+c.offsetHeight-a+d)}}};if(Drupal.jsEnabled){$(document).ready(function(){$("fieldset.collapsible > legend").each(function(){var a=$(this.parentNode);if($("input.error, textarea.error, select.error",a).size()>0){a.removeClass("collapsed")}var c=this.innerHTML;$(this).empty().append($('<a href="#">'+c+"</a>").click(function(){var d=$(this).parents("fieldset:first")[0];if(!d.animating){d.animating=true;Drupal.toggleFieldset(d)}return false})).after($('<div class="fieldset-wrapper"></div>').append(a.children(":not(legend)")));a.filter(".collapsed").children(".fieldset-wrapper").css({height:"auto",display:"inline"})})})}sourceEditor=(function(){function removeHighlight(src){var highlightRegexp=/<span.*?>([\s\S]*?)<\/span>/gim;for(var i=0;i<5;i++){src=src.replace(highlightRegexp,"$1")}src=src.replace(/<div class="code-important">([\s\S]*?)<\/div>/gim,"$1");var re=["&nbsp;"," ","&lt;","<","&gt;",">","&amp;","&","&quot;",'"'];for(var i=0;i<re.length;i++){src=src.replace(new RegExp(re[i],"gim"),re[++i])}return src}function isScrolledIntoView(elem){var docViewTop=$(window).scrollTop();var docViewBottom=docViewTop+$(window).height();var elemTop=elem.offset().top;var elemBottom=elemTop+elem.height();return(elemTop>docViewBottom&&elemTop<docViewTop)||(elemBottom>docViewBottom&&elemBottom<docViewTop)}function getIframeDocument(iframeNode){if(iframeNode.contentDocument){return iframeNode.contentDocument}if(iframeNode.contentWindow){return iframeNode.contentWindow.document}return iframeNode.document}return{edit:function(id){var area=$("#src-area-"+id);var pre=$("#src-"+id);if(!area[0]){area=$('<textarea id="src-area-'+id+'" class="src-area"></textarea>');area.width(parseInt(pre[0].offsetWidth)-12+"px");area.height(parseInt(pre[0].offsetHeight)-2+"px");$("#src-edit-"+id).append(area)}var value=removeHighlight(pre.html());area[0].value=value;pre.hide();$("#src-edit-"+id).show();$("#edit-"+id).hide();$("#show-"+id).hide();$("#show-changed-"+id).show();area.focus();return false},cancel:function(id){if(!confirm("Отменить изменения и вернуться к исходному варианту?")){return}$("#src-edit-"+id).hide();$("#src-"+id).show();$("#edit-"+id).show();$("#show-"+id).show();$("#show-changed-"+id).hide();return false},getSrc:function(id){var src=$("#src-"+id).is(":visible")?removeHighlight($("#src-"+id).html()):$("#src-area-"+id).val();return src},run:function(id){var src=this.getSrc(id);try{eval(src)}catch(e){alert("Ошибка: "+e.message)}return false},show:function(id){var iframe=$("#src-frame-"+id);if(!iframe[0]){var codeContainer=$("#src-"+id).is(":visible")?$("#src-"+id):$("#src-area-"+id);var width=parseInt(codeContainer[0].offsetWidth)-12;iframe=$("<iframe class='src-frame' id='src-frame-"+id+"' name='src-frame-"+id+"' width='"+width+"'>");iframe.width(width+"px");$("#src-show-"+id).append(iframe).show();if(!isScrolledIntoView(iframe)){iframe[0].scrollIntoView(false)}}if($.browser.mozilla){iframe[0].src="javascript:parent.sourceEditor.getSrc('"+id+"')"}else{var doc=getIframeDocument(iframe[0]);doc.open();doc.write(this.getSrc(id));doc.close()}function iframeResize(){var doc=getIframeDocument(iframe[0]);var h1=doc.body&&doc.body.scrollHeight;var h2=doc.documentElement&&doc.documentElement.scrollHeight;var h=h1&&h2?Math.min(h1,h2):(h1||h2);if(!h){h=codeContainer[0].offsetHeight}iframe.height(h+10+"px")}setTimeout(iframeResize,110);return false},refresh:function(id){return this.show(id)},removeShow:function(id){$("#src-frame-"+id).remove();$("#src-show-"+id).hide();return false},select:function(id){if($("#src-"+id).is(":visible")){var target=$("#src-"+id)[0];if(document.createRange){rng=document.createRange();rng.selectNodeContents(target);sel=window.getSelection();sel.removeAllRanges();sel.addRange(rng)}else{var rng=document.body.createTextRange();rng.moveToElementText(target);rng.select()}}else{$("#src-area-"+id).select()}return false},revealCode:function(hider,id){hider=$(hider);hider.hide();$("#sc-"+id).show();return false}}}());function jsman_init_short_toggle(k,h){var a=$("#"+k);var d=$("#"+h);var c=$("DIV.view-data-node-data-field-annotation-field-annotation-value",d);var m=$(".short",a);var l=$(".long",a);var g=l.hasClass("unactive");function j(){if(!$(this).hasClass("unactive")){return}if(g){l.removeClass("unactive");m.addClass("unactive");c.show()}else{l.addClass("unactive");m.removeClass("unactive");c.hide()}g=!g}l.click(j);m.click(j)}function jsman_short(d,a){var c=$("DIV.view-data-node-data-field-annotation-field-annotation-value",root);if(a){c.hide()}else{c.show()}onclick="jsman_short('js-manual', true)"}(function(a){a.alerts={verticalOffset:-75,horizontalOffset:0,repositionOnResize:true,overlayOpacity:0.01,overlayColor:"#FFF",draggable:true,okButton:"&nbsp;OK&nbsp;",cancelButton:"&nbsp;Cancel&nbsp;",dialogClass:null,alert:function(c,d,g){if(d==null){d="Alert"}a.alerts._show(d,c,null,"alert",function(h){if(g){g(h)}})},confirm:function(c,d,g){if(d==null){d="Confirm"}a.alerts._show(d,c,null,"confirm",function(h){if(g){g(h)}})},prompt:function(c,d,g,h){if(g==null){g="Prompt"}a.alerts._show(g,c,d,"prompt",function(j){if(h){h(j)}})},_show:function(j,h,g,d,l){a.alerts._hide();a.alerts._overlay("show");a("BODY").append('<div id="popup_container"><h1 id="popup_title"></h1><div id="popup_content"><div id="popup_message"></div></div></div>');if(a.alerts.dialogClass){a("#popup_container").addClass(a.alerts.dialogClass)}var k=(a.browser.msie&&parseInt(a.browser.version)<=6)?"absolute":"fixed";a("#popup_container").css({position:k,zIndex:99999,padding:0,margin:0});a("#popup_title").text(j);a("#popup_content").addClass(d);a("#popup_message").text(h);a("#popup_message").html(a("#popup_message").text().replace(/\n/g,"<br />"));a("#popup_container").css({minWidth:a("#popup_container").outerWidth(),maxWidth:a("#popup_container").outerWidth()});a.alerts._reposition();a.alerts._maintainPosition(true);var c=this;setTimeout(function(){c._setClosers(g,d,l)},0)},_setClosers:function(d,c,h){switch(c){case"alert":a("#popup_message").after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /></div>');a("#popup_ok").click(function(){a.alerts._hide();h(true)});a("#popup_ok").focus().keypress(function(j){if(j.keyCode==13||j.keyCode==27){a("#popup_ok").trigger("click")}});break;case"confirm":a("#popup_message").after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /> <input type="button" value="'+a.alerts.cancelButton+'" id="popup_cancel" /></div>');a("#popup_ok").click(function(){a.alerts._hide();if(h){h(true)}});a("#popup_cancel").click(function(){a.alerts._hide();if(h){h(false)}});a("#popup_ok").focus();a("#popup_ok, #popup_cancel").keypress(function(j){if(j.keyCode==13){a("#popup_ok").trigger("click")}if(j.keyCode==27){a("#popup_cancel").trigger("click")}});break;case"prompt":a("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /> <input type="button" value="'+a.alerts.cancelButton+'" id="popup_cancel" /></div>');a("#popup_prompt").width(a("#popup_message").width());a("#popup_ok").click(function(){var j=a("#popup_prompt").val();a.alerts._hide();if(h){h(j)}});a("#popup_cancel").click(function(){a.alerts._hide();if(h){h(null)}});a("#popup_prompt, #popup_ok, #popup_cancel").keypress(function(j){if(j.keyCode==13){a("#popup_ok").trigger("click")}if(j.keyCode==27){a("#popup_cancel").trigger("click")}});if(d){a("#popup_prompt").val(d)}a("#popup_prompt").focus().select();break}if(a.alerts.draggable){try{a("#popup_container").draggable({handle:a("#popup_title")});a("#popup_title").css({cursor:"move"})}catch(g){}}},_hide:function(){a("#popup_container").remove();a.alerts._overlay("hide");a.alerts._maintainPosition(false)},_overlay:function(c){switch(c){case"show":a.alerts._overlay("hide");a("BODY").append('<div id="popup_overlay"></div>');a("#popup_overlay").css({position:"absolute",zIndex:99998,top:"0px",left:"0px",width:"100%",height:a(document).height(),background:a.alerts.overlayColor,opacity:a.alerts.overlayOpacity});break;case"hide":a("#popup_overlay").remove();break}},_reposition:function(){var c=a.browser.opera&&a.browser.version>"9.5"&&a.fn.jquery<="1.2.6"?document.documentElement.clientHeight:a(window).height();var g=((c/2)-(a("#popup_container").outerHeight()/2))+a.alerts.verticalOffset;var d=((a(window).width()/2)-(a("#popup_container").outerWidth()/2))+a.alerts.horizontalOffset;if(g<0){g=0}if(d<0){d=0}g=Math.floor(g);d=Math.floor(d);if(a.browser.msie&&parseInt(a.browser.version)<=6){g=g+a(window).scrollTop()}a("#popup_container").css({top:g+"px",left:d+"px"});a("#popup_overlay").height(a(document).height())},_maintainPosition:function(c){if(a.alerts.repositionOnResize){switch(c){case true:a(window).bind("resize",function(){a.alerts._reposition()});break;case false:a(window).unbind("resize");break}}}};jAlert=function(c,d,g){a.alerts.alert(c,d,g)};jConfirm=function(c,d,g){a.alerts.confirm(c,d,g)};jPrompt=function(c,d,g,h){a.alerts.prompt(c,d,g,h)}})(jQuery);if(typeof(SESSIONURL)=="undefined"){var SESSIONURL=""}if(typeof(vbphrase)=="undefined"){var vbphrase=new Array()}var vB_Editor=new Array();var ignorequotechars=false;var pagenavcounter=0;var userAgent=navigator.userAgent.toLowerCase();var is_opera=((userAgent.indexOf("opera")!=-1)||(typeof(window.opera)!="undefined"));var is_saf=((userAgent.indexOf("applewebkit")!=-1)||(navigator.vendor=="Apple Computer, Inc."));var is_webtv=(userAgent.indexOf("webtv")!=-1);var is_ie=((userAgent.indexOf("msie")!=-1)&&(!is_opera)&&(!is_saf)&&(!is_webtv));var is_ie4=((is_ie)&&(userAgent.indexOf("msie 4.")!=-1));var is_ie7=((is_ie)&&(userAgent.indexOf("msie 7.")!=-1));var is_moz=((navigator.product=="Gecko")&&(!is_saf));var is_kon=(userAgent.indexOf("konqueror")!=-1);var is_ns=((userAgent.indexOf("compatible")==-1)&&(userAgent.indexOf("mozilla")!=-1)&&(!is_opera)&&(!is_webtv)&&(!is_saf));var is_ns4=((is_ns)&&(parseInt(navigator.appVersion)==4));var is_mac=(userAgent.indexOf("mac")!=-1);var is_regexp=(window.RegExp)?true:false;var AJAX_Compatible=false;var pointer_cursor=(is_ie?"hand":"pointer");String.prototype.vBlength=function(){return(is_ie&&this.indexOf("\n")!=-1)?this.replace(/\r?\n/g,"_").length:this.length};if("1234".substr(-2,2)=="12"){String.prototype.substr_orig=String.prototype.substr;String.prototype.substr=function(c,a){return this.substr_orig((c<0?this.length+c:c),a)}}function array_pop(c){if(typeof c!="object"||!c.length){return null}else{var d=c[c.length-1];c.length--;return d}}if(typeof Array.prototype.shift==="undefined"){Array.prototype.shift=function(){for(var d=0,a=this[0],c=this.length-1;d<c;d++){this[d]=this[d+1]}this.length--;return a}}function array_push(c,d){for(var g=1;g<arguments.length;g++){c[c.length]=arguments[g]}return c.length}function fetch_object(a){if(document.getElementById){return document.getElementById(a)}else{if(document.all){return document.all[a]}else{if(document.layers){return document.layers[a]}else{return null}}}}function fetch_tags(c,a){if(c==null){return new Array()}else{if(typeof c.getElementsByTagName!="undefined"){return c.getElementsByTagName(a)}else{if(c.all&&c.all.tags){return c.all.tags(a)}else{return new Array()}}}}function fetch_tag_count(c,a){return fetch_tags(c,a).length}function do_an_e(a){if(!a||is_ie){window.event.returnValue=false;window.event.cancelBubble=true;return window.event}else{a.stopPropagation();a.preventDefault();return a}}function e_by_gum(a){if(!a||is_ie){window.event.cancelBubble=true;return window.event}else{if(a.target.type=="submit"){a.target.form.submit()}a.stopPropagation();return a}}function validatemessage(c,g,a){if(is_kon||is_saf||is_webtv){return true}else{if(g.length<1){alert(vbphrase.must_enter_subject);return false}else{var d=PHP.trim(stripcode(c,false,ignorequotechars));if(d.length<a){alert(construct_phrase(vbphrase.message_too_short,a));return false}else{if(typeof(document.forms.vbform)!="undefined"&&typeof(document.forms.vbform.imagestamp)!="undefined"){document.forms.vbform.imagestamp.failed=false;if(document.forms.vbform.imagestamp.value.length!=6){alert(vbphrase.complete_image_verification);document.forms.vbform.imagestamp.failed=true;document.forms.vbform.imagestamp.focus();return false}else{return true}}else{return true}}}}}function stripcode(j,k,c){if(!is_regexp){return j}if(c){var d=new Date().getTime();while((startindex=PHP.stripos(j,"[quote"))!==false){if(new Date().getTime()-d>2000){break}if((stopindex=PHP.stripos(j,"[/quote]"))!==false){fragment=j.substr(startindex,stopindex-startindex+8);j=j.replace(fragment,"")}else{break}j=PHP.trim(j)}}if(k){j=j.replace(/<img[^>]+src="([^"]+)"[^>]*>/gi,"$1");var l=new RegExp("<(\\w+)[^>]*>","gi");var h=new RegExp("<\\/\\w+>","gi");j=j.replace(l,"");j=j.replace(h,"");var g=new RegExp("(&nbsp;)","gi");j=j.replace(g," ")}else{var a=new RegExp("\\[(\\w+)[^\\]]*\\]","gi");var m=new RegExp("\\[\\/(\\w+)\\]","gi");j=j.replace(a,"");j=j.replace(m,"")}return j}function vB_PHP_Emulator(){}vB_PHP_Emulator.prototype.stripos=function(a,c,d){if(typeof d=="undefined"){d=0}index=a.toLowerCase().indexOf(c.toLowerCase(),d);return(index==-1?false:index)};vB_PHP_Emulator.prototype.ltrim=function(a){return a.replace(/^\s+/g,"")};vB_PHP_Emulator.prototype.rtrim=function(a){return a.replace(/(\s+)$/g,"")};vB_PHP_Emulator.prototype.trim=function(a){return this.ltrim(this.rtrim(a))};vB_PHP_Emulator.prototype.preg_quote=function(a){return a.replace(/(\+|\{|\}|\(|\)|\[|\]|\||\/|\?|\^|\$|\\|\.|\=|\!|\<|\>|\:|\*)/g,"\\$1")};vB_PHP_Emulator.prototype.match_all=function(d,h){var a=d.match(RegExp(h,"gim"));if(a){var j=new Array();var c=new RegExp(h,"im");for(var g=0;g<a.length;g++){j[j.length]=a[g].match(c)}return j}else{return false}};vB_PHP_Emulator.prototype.unhtmlspecialchars=function(c){f=new Array(/&lt;/g,/&gt;/g,/&quot;/g,/&amp;/g);r=new Array("<",">",'"',"&");for(var a in f){c=c.replace(f[a],r[a])}return c};vB_PHP_Emulator.prototype.unescape_cdata=function(d){var c=/<\=\!\=\[\=C\=D\=A\=T\=A\=\[/g;var a=/\]\=\]\=>/g;return d.replace(c,"<![CDATA[").replace(a,"]]>")};vB_PHP_Emulator.prototype.htmlspecialchars=function(g){var d=new Array((is_mac&&is_ie?new RegExp("&","g"):new RegExp("&(?!#[0-9]+;)","g")),new RegExp("<","g"),new RegExp(">","g"),new RegExp('"',"g"));var c=new Array("&amp;","&lt;","&gt;","&quot;");for(var a=0;a<d.length;a++){g=g.replace(d[a],c[a])}return g};vB_PHP_Emulator.prototype.in_array=function(g,d,c){var h=new String(g);if(c){h=h.toLowerCase();for(var a in d){if(d[a].toLowerCase()==h){return a}}}else{for(var a in d){if(d[a]==h){return a}}}return -1};vB_PHP_Emulator.prototype.str_pad=function(d,a,c){d=new String(d);c=new String(c);if(d.length<a){padtext=new String(c);while(padtext.length<(a-d.length)){padtext+=c}d=padtext.substr(0,(a-d.length))+d}return d};vB_PHP_Emulator.prototype.urlencode=function(g){g=escape(g.toString()).replace(/\+/g,"%2B");var c=g.match(/(%([0-9A-F]{2}))/gi);if(c){for(var d=0;d<c.length;d++){var a=c[d].substring(1,3);if(parseInt(a,16)>=128){g=g.replace(c[d],"%u00"+a)}}}g=g.replace("%25","%u0025");return g};vB_PHP_Emulator.prototype.ucfirst=function(g,a){if(typeof a!="undefined"){var c=g.indexOf(a);if(c>0){g=g.substr(0,c)}}g=g.split(" ");for(var d=0;d<g.length;d++){g[d]=g[d].substr(0,1).toUpperCase()+g[d].substr(1)}return g.join(" ")};var PHP=new vB_PHP_Emulator();function vB_AJAX_Handler(a){this.async=a?true:false}vB_AJAX_Handler.prototype.init=function(){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax==2){return false}try{this.handler=new XMLHttpRequest();return(this.handler.setRequestHeader?true:false)}catch(e){try{this.handler=eval("new ActiveXObject('Microsoft.XMLHTTP');");return true}catch(e){return false}}};vB_AJAX_Handler.prototype.is_compatible=function(){if(typeof vb_disable_ajax!="undefined"&&vb_disable_ajax==2){return false}if(is_ie&&!is_ie4){return true}else{if(typeof XMLHttpRequest!="undefined"){try{return XMLHttpRequest.prototype.setRequestHeader?true:false}catch(c){try{var a=new XMLHttpRequest();return a.setRequestHeader?true:false}catch(c){return false}}}else{return false}}};vB_AJAX_Handler.prototype.not_ready=function(){return(this.handler.readyState&&(this.handler.readyState<4))};vB_AJAX_Handler.prototype.onreadystatechange=function(a){if(!this.handler){if(!this.init()){return false}}if(typeof a=="function"){this.handler.onreadystatechange=a}else{alert("XML Sender OnReadyState event is not a function")}return false};vB_AJAX_Handler.prototype.send=function(a,c){if(!this.handler){if(!this.init()){return false}}if(!this.not_ready()){this.handler.open("POST",a,this.async);this.handler.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.handler.send(c+"&s="+fetch_sessionhash());if(!this.async&&this.handler.readyState==4&&this.handler.status==200){return true}}return false};vB_AJAX_Handler.prototype.fetch_data=function(a){if(a&&a.firstChild&&a.firstChild.nodeValue){return PHP.unescape_cdata(a.firstChild.nodeValue)}else{return""}};var AJAX_Compatible=vB_AJAX_Handler.prototype.is_compatible();function vB_Hidden_Form(a){this.action=a;this.variables=new Array()}vB_Hidden_Form.prototype.add_variable=function(a,c){this.variables[this.variables.length]=new Array(a,c)};vB_Hidden_Form.prototype.add_variables_from_object=function(k){var c=fetch_tags(k,"input");for(var h=0;h<c.length;h++){switch(c[h].type){case"checkbox":case"radio":if(c[h].checked){this.add_variable(c[h].name,c[h].value)}break;case"text":case"hidden":case"password":this.add_variable(c[h].name,c[h].value);break;default:continue}}var a=fetch_tags(k,"textarea");for(var h=0;h<a.length;h++){this.add_variable(a[h].name,a[h].value)}var g=fetch_tags(k,"select");for(var h=0;h<g.length;h++){if(g[h].multiple){for(var d=0;d<g[h].options.length;d++){if(g[h].options[d].selected){this.add_variable(g[h].name,g[h].options[d].value)}}}else{this.add_variable(g[h].name,g[h].options[g[h].selectedIndex].value)}}};vB_Hidden_Form.prototype.fetch_variable=function(a){for(var c=0;c<this.variables.length;c++){if(this.variables[c][0]==a){return this.variables[c][1]}}return null};vB_Hidden_Form.prototype.submit_form=function(){this.form=document.createElement("form");this.form.method="post";this.form.action=this.action;for(var a=0;a<this.variables.length;a++){var c=document.createElement("input");c.type="hidden";c.name=this.variables[a][0];c.value=this.variables[a][1];this.form.appendChild(c)}document.body.appendChild(this.form).submit()};vB_Hidden_Form.prototype.build_query_string=function(){var c="";for(var a=0;a<this.variables.length;a++){c+=this.variables[a][0]+"="+PHP.urlencode(this.variables[a][1])+"&"}return c};vB_Hidden_Form.prototype.add_input=vB_Hidden_Form.prototype.add_variable;vB_Hidden_Form.prototype.add_inputs_from_object=vB_Hidden_Form.prototype.add_variables_from_object;function openWindow(d,g,c,a){return window.open(d,(typeof a=="undefined"?"vBPopup":a),"statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes"+(typeof g!="undefined"?(",width="+g):"")+(typeof c!="undefined"?(",height="+c):""))}function js_open_help(c,d,a){return openWindow("help.php?s="+SESSIONHASH+"&do=answer&page="+c+"&pageaction="+d+"&option="+a,600,450,"helpwindow")}function attachments(a){return openWindow("misc.php?"+SESSIONURL+"do=showattachments&t="+a,480,300)}function who(a){return openWindow("misc.php?"+SESSIONURL+"do=whoposted&t="+a,230,300)}function imwindow(g,c,d,a){return openWindow("sendmessage.php?"+SESSIONURL+"do=im&type="+g+"&u="+c,d,a)}function SendMSNMessage(a){if(!is_ie){alert(vbphrase.msn_functions_only_work_in_ie);return false}else{MsgrObj.InstantMessage(a);return false}}function AddMSNContact(a){if(!is_ie){alert(vbphrase.msn_functions_only_work_in_ie);return false}else{MsgrObj.AddContact(0,a);return false}}function detect_caps_lock(g){g=(g?g:window.event);var a=(g.which?g.which:(g.keyCode?g.keyCode:(g.charCode?g.charCode:0)));var d=(g.shiftKey||(g.modifiers&&(g.modifiers&4)));var c=(g.ctrlKey||(g.modifiers&&(g.modifiers&2)));return(a>=65&&a<=90&&!d&&!c)||(a>=97&&a<=122&&d)}function log_out(c){var a=document.getElementsByTagName("html")[0];a.style.filter="progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";if(confirm(c)){return true}else{a.style.filter="";return false}}function set_cookie(c,d,a){document.cookie=c+"="+escape(d)+"; path=/"+(typeof a!="undefined"?"; expires="+a.toGMTString():"")}function delete_cookie(a){document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/"}function fetch_cookie(a){cookie_name=a+"=";cookie_length=document.cookie.length;cookie_begin=0;while(cookie_begin<cookie_length){value_begin=cookie_begin+cookie_name.length;if(document.cookie.substring(cookie_begin,value_begin)==cookie_name){var c=document.cookie.indexOf(";",value_begin);if(c==-1){c=cookie_length}return unescape(document.cookie.substring(value_begin,c))}cookie_begin=document.cookie.indexOf(" ",cookie_begin)+1;if(cookie_begin==0){break}}return null}function js_toggle_all(g,h,d,a,k){for(var c=0;c<g.elements.length;c++){var j=g.elements[c];if(j.type==h&&PHP.in_array(j.name,a,false)==-1){switch(h){case"radio":if(j.value==d){j.checked=k}break;case"select-one":j.selectedIndex=k;break;default:j.checked=k;break}}}}function js_select_all(a){exclude=new Array();exclude[0]="selectall";js_toggle_all(a,"select-one","",exclude,a.selectall.selectedIndex)}function js_check_all(a){exclude=new Array();exclude[0]="keepattachments";exclude[1]="allbox";exclude[2]="removeall";js_toggle_all(a,"checkbox","",exclude,a.allbox.checked)}function js_check_all_option(c,a){exclude=new Array();exclude[0]="useusergroup";js_toggle_all(c,"radio",a,exclude,true)}function checkall(a){js_check_all(a)}function checkall_option(c,a){js_check_all_option(c,a)}function resize_textarea(k,j){if(k<0){var c=-5;var g=-10}else{var c=5;var g=10}var a=fetch_object(j);if(typeof a.orig_rows=="undefined"){a.orig_rows=a.rows;a.orig_cols=a.cols}var d=a.rows+c;var h=a.cols+g;if(d>=a.orig_rows&&h>=a.orig_cols){a.rows=d;a.cols=h}return false}function toggle_collapse(a){if(!is_regexp){return false}obj=fetch_object("collapseobj_"+a);img=fetch_object("collapseimg_"+a);cel=fetch_object("collapsecel_"+a);if(!obj){if(img){img.style.display="none"}return false}if(obj.style.display=="none"){obj.style.display="";save_collapsed(a,false);if(img){img_re=new RegExp("_collapsed\\.gif$");img.src=img.src.replace(img_re,".gif")}if(cel){cel_re=new RegExp("^(thead|tcat)(_collapsed)$");cel.className=cel.className.replace(cel_re,"$1")}}else{obj.style.display="none";save_collapsed(a,true);if(img){img_re=new RegExp("\\.gif$");img.src=img.src.replace(img_re,"_collapsed.gif")}if(cel){cel_re=new RegExp("^(thead|tcat)$");cel.className=cel.className.replace(cel_re,"$1_collapsed")}}return false}function save_collapsed(a,h){var g=fetch_cookie("vbulletin_collapse");var d=new Array();if(g!=null){g=g.split("\n");for(var c in g){if(g[c]!=a&&g[c]!=""){d[d.length]=g[c]}}}if(h){d[d.length]=a}expires=new Date();expires.setTime(expires.getTime()+(1000*86400*365));set_cookie("vbulletin_collapse",d.join("\n"),expires)}function vBpagenav(){}vBpagenav.prototype.controlobj_onclick=function(d){this._onclick(d);var a=fetch_tags(this.menu.menuobj,"input");for(var c=0;c<a.length;c++){if(a[c].type=="text"){a[c].focus();break}}};vBpagenav.prototype.form_gotopage=function(a){if((pagenum=parseInt(fetch_object("pagenav_itxt").value,10))>0){window.location=this.addr+"&page="+pagenum}return false};vBpagenav.prototype.ibtn_onclick=function(a){return this.form.gotopage()};vBpagenav.prototype.itxt_onkeypress=function(a){return((a?a:window.event).keyCode==13?this.form.gotopage():true)};function vbmenu_register(c,a,d){if(typeof(vBmenu)=="object"){return vBmenu.register(c,a)}else{return false}}function set_unselectable(c){if(!is_ie4&&typeof c.tagName!="undefined"){if(c.hasChildNodes()){for(var a=0;a<c.childNodes.length;a++){set_unselectable(c.childNodes[a])}}c.unselectable="on"}}function fetch_sessionhash(){return(SESSIONURL==""?"":SESSIONURL.substr(2,32))}function construct_phrase(){if(!arguments||arguments.length<1||!is_regexp){return false}var a=arguments;var g=a[0];var d;for(var c=1;c<a.length;c++){d=new RegExp("%"+c+"\\$s","gi");g=g.replace(d,a[c])}return g}function switch_id(d,g){var h=d.options[d.selectedIndex].value;if(h==""){return}var c=new String(window.location);var a=new String("");c=c.split("#");if(c[1]){a="#"+c[1]}c=c[0];if(c.indexOf(g+"id=")!=-1&&is_regexp){re=new RegExp(g+"id=\\d+&?");c=c.replace(re,"")}if(c.indexOf("?")==-1){c+="?"}else{lastchar=c.substr(c.length-1);if(lastchar!="&"&&lastchar!="?"){c+="&"}}window.location=c+g+"id="+h+a}function img_alt_2_title(a){if(!a.title&&a.alt!=""){a.title=a.alt}}function PostBit_Init(d,g){if(typeof vBmenu!="undefined"){var c=fetch_tags(d,"div");for(var a=0;a<c.length;a++){if(c[a].id&&c[a].id.substr(0,9)=="postmenu_"){vBmenu.register(c[a].id,true)}}}if(typeof vB_QuickEditor!="undefined"){vB_AJAX_QuickEdit_Init(d)}if(typeof vB_QuickReply!="undefined"){qr_init_buttons(d)}if(typeof mq_init!="undefined"){mq_init(d)}if(typeof vBrep!="undefined"){if(typeof g!="undefined"&&typeof g!="null"){vbrep_register(g)}}if(typeof inlineMod!="undefined"){im_init(d)}}function vBulletin_init(){if(is_webtv){return false}var j=fetch_tags(document,"img");for(var c=0;c<j.length;c++){img_alt_2_title(j[c])}if(typeof vBmenu=="object"){if(typeof(YAHOO)!="undefined"){YAHOO.util.Event.on(document,"click",vbmenu_hide);YAHOO.util.Event.on(window,"resize",vbmenu_hide)}else{if(window.attachEvent&&!is_saf){document.attachEvent("onclick",vbmenu_hide);window.attachEvent("onresize",vbmenu_hide)}else{if(document.addEventListener&&!is_saf){document.addEventListener("click",vbmenu_hide,false);window.addEventListener("resize",vbmenu_hide,false)}else{window.onclick=vbmenu_hide;window.onresize=vbmenu_hide}}}var d=fetch_tags(document,"td");for(var h=0;h<d.length;h++){if(d[h].hasChildNodes()&&d[h].firstChild.name&&d[h].firstChild.name.indexOf("PageNav")!=-1){var g=d[h].title;d[h].title="";d[h].innerHTML="";d[h].id="pagenav."+h;var a=vBmenu.register(d[h].id);if(is_saf){a.controlobj._onclick=a.controlobj.onclick;a.controlobj.onclick=vBpagenav.prototype.controlobj_onclick}}}if(typeof g!="undefined"){fetch_object("pagenav_form").addr=g;fetch_object("pagenav_form").gotopage=vBpagenav.prototype.form_gotopage;fetch_object("pagenav_ibtn").onclick=vBpagenav.prototype.ibtn_onclick;fetch_object("pagenav_itxt").onkeypress=vBpagenav.prototype.itxt_onkeypress}vBmenu.activate(true)}vBulletin.init();return true}if(!console){var console=function(){var a=1+1};console.log=function(c){var a=1+1}}function vBulletin_Framework(){this.elements=new Array();this.ajaxurls=new Array();this.events=new Array();this.regexp="(^|[^a-z0-9_])([a-z0-9_]+)\\[([^\\]]*)\\]";this.add_event("systemInit");this.time=new Date()}vBulletin_Framework.prototype.init=function(){this.find_elements(document.getElementsByTagName("body")[0]);this.events.systemInit.fire()};vBulletin_Framework.prototype.extend=function(d,a){function c(){}c.prototype=a.prototype;d.prototype=new c();d.prototype.constructor=d;d.baseConstructor=a;d.superClass=a.prototype};vBulletin_Framework.prototype.find_elements=function(d){for(var c=0;c<d.childNodes.length;c++){var a=d.childNodes[c];if(a.className){var g=PHP.match_all(a.className,this.regexp);if(g){this.register_element(a,g)}}if(d.childNodes[c].hasChildNodes()){this.find_elements(d.childNodes[c])}}};vBulletin_Framework.prototype.register_element=function(c,d){for(var a=0;a<d.length;a++){if(!this.elements[d[a][2]]){this.elements[d[a][2]]=new Array()}this.elements[d[a][2]][this.elements[d[a][2]].length]=new Array(c,d[a][3])}};vBulletin_Framework.prototype.register_ajax_urls=function(c,d,g){var c=c.split("?");c[1]=SESSIONURL+"ajax=1&"+c[1].replace(/\{(\d+)(:\w+)?\}/gi,"%$1$s");var d=d.split("?");d[1]=SESSIONURL+"ajax=1&"+d[1].replace(/\{(\d+)(:\w+)?\}/gi,"%$1$s");for(var a=0;a<g.length;a++){this.ajaxurls[g[a]]=new Array(c,d)}};vBulletin_Framework.prototype.add_event=function(a){this.events[a]=(typeof YAHOO!="undefined"?new YAHOO.util.CustomEvent(a):new null_event())};vBulletin_Framework.prototype.console=function(){if(is_moz&&console){var args=new Array();for(var i=0;i<arguments.length;i++){args[args.length]=arguments[i]}try{eval("console.log('"+args.join("','")+"');")}catch(e){}}};if(typeof YAHOO=="undefined"){function null_event(){this.fire=function(){};this.subscribe=function(){}}}vBulletin=new vBulletin_Framework();vBulletin.add_event("vBmenuShow");vBulletin.add_event("vBmenuHide");function vB_Popup_Handler(){this.open_steps=10;this.open_fade=false;this.active=false;this.menus=new Array();this.activemenu=null;this.hidden_selects=new Array()}vB_Popup_Handler.prototype.activate=function(a){this.active=a};vB_Popup_Handler.prototype.register=function(d,a,c){this.menus[d]=new vB_Popup_Menu(d,a,c);return this.menus[d]};vB_Popup_Handler.prototype.hide=function(){if(this.activemenu!=null){this.menus[this.activemenu].hide()}};var vBmenu=new vB_Popup_Handler();function vbmenu_hide(a){if(a&&a.button&&a.button!=1&&a.type=="click"){return true}else{vBmenu.hide()}}function vB_Popup_Menu(d,a,c){this.controlkey=d;this.menuname=this.controlkey.split(".")[0]+"_menu";this.init_control(a);if(fetch_object(this.menuname)){this.init_menu()}this.slide_open=((is_opera||c)?false:true);this.open_steps=vBmenu.open_steps;vBulletin.add_event("vBmenuShow_"+this.controlkey);vBulletin.add_event("vBmenuHide_"+this.controlkey)}vB_Popup_Menu.prototype.init_control=function(a){this.controlobj=fetch_object(this.controlkey);this.controlobj.state=false;if(this.controlobj.firstChild&&(this.controlobj.firstChild.tagName=="TEXTAREA"||this.controlobj.firstChild.tagName=="INPUT")){}else{if(!a&&!(is_mac&&is_ie)){var d=document.createTextNode(" ");this.controlobj.appendChild(d);var c=document.createElement("img");c.src=IMGDIR_MISC+"/menu_open.gif";c.border=0;c.title="";c.alt="";this.controlobj.appendChild(c)}this.controlobj.unselectable=true;if(!a){this.controlobj.style.cursor=pointer_cursor}this.controlobj.onclick=vB_Popup_Events.prototype.controlobj_onclick;this.controlobj.onmouseover=vB_Popup_Events.prototype.controlobj_onmouseover}};vB_Popup_Menu.prototype.init_menu=function(){this.menuobj=fetch_object(this.menuname);if(this.menuobj&&!this.menuobj.initialized){this.menuobj.initialized=true;this.menuobj.onclick=e_by_gum;this.menuobj.style.position="absolute";this.menuobj.style.zIndex=50;if(is_ie&&!is_mac){this.menuobj.style.filter+="progid:DXImageTransform.Microsoft.alpha(enabled=1,opacity=100)";this.menuobj.style.filter+="progid:DXImageTransform.Microsoft.shadow(direction=135,color=#8E8E8E,strength=3)"}this.init_menu_contents()}};vB_Popup_Menu.prototype.init_menu_contents=function(){var h=fetch_tags(this.menuobj,"td");for(var g=0;g<h.length;g++){if(h[g].className=="vbmenu_option"){if(h[g].title&&h[g].title=="nohilite"){h[g].title=""}else{h[g].controlkey=this.controlkey;h[g].onmouseover=vB_Popup_Events.prototype.menuoption_onmouseover;h[g].onmouseout=vB_Popup_Events.prototype.menuoption_onmouseout;var d=fetch_tags(h[g],"a");if(d.length==1){h[g].className=h[g].className+" vbmenu_option_alink";h[g].islink=true;var c=d[0];var a=false;h[g].target=c.getAttribute("target");if(typeof c.onclick=="function"){h[g].ofunc=c.onclick;h[g].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;a=true}else{if(typeof h[g].onclick=="function"){h[g].ofunc=h[g].onclick;h[g].onclick=vB_Popup_Events.prototype.menuoption_onclick_function;a=true}else{h[g].href=c.href;h[g].onclick=vB_Popup_Events.prototype.menuoption_onclick_link}}if(a){var j=document.createElement("a");j.innerHTML=c.innerHTML;j.href="#";j.onclick=function(k){k=k?k:window.event;k.returnValue=false;return false};h[g].insertBefore(j,c);h[g].removeChild(c)}}else{if(typeof h[g].onclick=="function"){h[g].ofunc=h[g].onclick;h[g].onclick=vB_Popup_Events.prototype.menuoption_onclick_function}}}}}};vB_Popup_Menu.prototype.show=function(c,a){if(!vBmenu.active){return false}else{if(!this.menuobj){this.init_menu()}}if(!this.menuobj){return false}if(vBmenu.activemenu!=null){vBmenu.menus[vBmenu.activemenu].hide()}vBmenu.activemenu=this.controlkey;this.menuobj.style.display="";if(this.slide_open){this.menuobj.style.clip="rect(auto, 0px, 0px, auto)"}this.set_menu_position(c);if(!a&&this.slide_open){this.intervalX=Math.ceil(this.menuobj.offsetWidth/this.open_steps);this.intervalY=Math.ceil(this.menuobj.offsetHeight/this.open_steps);this.slide((this.direction=="left"?0:this.menuobj.offsetWidth),0,0)}else{if(this.menuobj.style.clip&&this.slide_open){this.menuobj.style.clip="rect(auto, auto, auto, auto)"}}this.handle_overlaps(true);if(this.controlobj.editorid){this.controlobj.state=true;vB_Editor[this.controlobj.editorid].menu_context(this.controlobj,"mousedown")}vBulletin.events["vBmenuShow_"+this.controlkey].fire(this.controlkey);vBulletin.events.vBmenuShow.fire(this.controlkey)};vB_Popup_Menu.prototype.set_menu_position=function(a){this.pos=this.fetch_offset(a);this.leftpx=this.pos.left;this.toppx=this.pos.top+a.offsetHeight;if((this.leftpx+this.menuobj.offsetWidth)>=document.body.clientWidth&&(this.leftpx+a.offsetWidth-this.menuobj.offsetWidth)>0){this.leftpx=this.leftpx+a.offsetWidth-this.menuobj.offsetWidth;this.direction="right"}else{this.direction="left"}this.menuobj.style.left=this.leftpx+"px";this.menuobj.style.top=this.toppx+"px"};vB_Popup_Menu.prototype.hide=function(a){if(a&&a.button&&a.button!=1){return true}this.stop_slide();this.menuobj.style.display="none";this.handle_overlaps(false);if(this.controlobj.editorid){this.controlobj.state=false;vB_Editor[this.controlobj.editorid].menu_context(this.controlobj,"mouseout")}vBmenu.activemenu=null;vBulletin.events["vBmenuHide_"+this.controlkey].fire(this.controlkey);vBulletin.events.vBmenuHide.fire(this.controlkey)};vB_Popup_Menu.prototype.hover=function(a){if(vBmenu.activemenu!=null){if(vBmenu.menus[vBmenu.activemenu].controlkey!=this.id){this.show(a,true)}}};vB_Popup_Menu.prototype.slide=function(d,c,a){if(this.direction=="left"&&(d<this.menuobj.offsetWidth||c<this.menuobj.offsetHeight)){if(vBmenu.open_fade&&is_ie){a+=10;this.menuobj.filters.item("DXImageTransform.Microsoft.alpha").opacity=a}d+=this.intervalX;c+=this.intervalY;this.menuobj.style.clip="rect(auto, "+d+"px, "+c+"px, auto)";this.slidetimer=setTimeout("vBmenu.menus[vBmenu.activemenu].slide("+d+", "+c+", "+a+");",0)}else{if(this.direction=="right"&&(d>0||c<this.menuobj.offsetHeight)){if(vBmenu.open_fade&&is_ie){a+=10;menuobj.filters.item("DXImageTransform.Microsoft.alpha").opacity=a}d-=this.intervalX;c+=this.intervalY;this.menuobj.style.clip="rect(auto, "+this.menuobj.offsetWidth+"px, "+c+"px, "+d+"px)";this.slidetimer=setTimeout("vBmenu.menus[vBmenu.activemenu].slide("+d+", "+c+", "+a+");",0)}else{this.stop_slide()}}};vB_Popup_Menu.prototype.stop_slide=function(){clearTimeout(this.slidetimer);this.menuobj.style.clip="rect(auto, auto, auto, auto)";if(vBmenu.open_fade&&is_ie){this.menuobj.filters.item("DXImageTransform.Microsoft.alpha").opacity=100}};vB_Popup_Menu.prototype.fetch_offset=function(d){var c=d.offsetLeft;var a=d.offsetTop;while((d=d.offsetParent)!=null){c+=d.offsetLeft;a+=d.offsetTop}return{left:c,top:a}};vB_Popup_Menu.prototype.overlaps=function(d,a){var c=new Array();var g=this.fetch_offset(d);c.L=g.left;c.T=g.top;c.R=c.L+d.offsetWidth;c.B=c.T+d.offsetHeight;if(c.L>a.R||c.R<a.L||c.T>a.B||c.B<a.T){return false}return true};vB_Popup_Menu.prototype.handle_overlaps=function(a){if(is_ie&&!is_ie7){var g=fetch_tags(document,"select");if(a){var j=new Array();j={L:this.leftpx,R:this.leftpx+this.menuobj.offsetWidth,T:this.toppx,B:this.toppx+this.menuobj.offsetHeight};for(var d=0;d<g.length;d++){if(this.overlaps(g[d],j)){var c=true;var h=g[d];while(h=h.parentNode){if(h.className=="vbmenu_popup"){c=false;break}}if(c){g[d].style.visibility="hidden";array_push(vBmenu.hidden_selects,d)}}}}else{while(true){var d=array_pop(vBmenu.hidden_selects);if(typeof d=="undefined"||d==null){break}else{g[d].style.visibility="visible"}}}}};function vB_Popup_Events(){}vB_Popup_Events.prototype.controlobj_onclick=function(a){if(typeof do_an_e=="function"){do_an_e(a);if(vBmenu.activemenu==null||vBmenu.menus[vBmenu.activemenu].controlkey!=this.id){vBmenu.menus[this.id].show(this)}else{vBmenu.menus[this.id].hide()}}};vB_Popup_Events.prototype.controlobj_onmouseover=function(a){if(typeof do_an_e=="function"){do_an_e(a);vBmenu.menus[this.id].hover(this)}};vB_Popup_Events.prototype.menuoption_onclick_function=function(a){this.ofunc(a);vBmenu.menus[this.controlkey].hide()};vB_Popup_Events.prototype.menuoption_onclick_link=function(a){a=a?a:window.event;if(a.shiftKey||(this.target!=null&&this.target!=""&&this.target.toLowerCase()!="_self")){if(this.target!=null&&this.target.charAt(0)!="_"){window.open(this.href,this.target)}else{window.open(this.href)}}else{window.location=this.href}a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}vBmenu.menus[this.controlkey].hide();return false};vB_Popup_Events.prototype.menuoption_onmouseover=function(a){this.className="vbmenu_hilite"+(this.islink?" vbmenu_hilite_alink":"");this.style.cursor=pointer_cursor};vB_Popup_Events.prototype.menuoption_onmouseout=function(a){this.className="vbmenu_option"+(this.islink?" vbmenu_option_alink":"");this.style.cursor="default"};