(function(window,undefined){var jQuery=function(selector,context){return arguments.length===0?rootjQuery:new jQuery.fn.init(selector,context);},_jQuery=window.jQuery,_$=window.$,rootjQuery,quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/,userAgent=navigator.userAgent.toLowerCase(),toString=Object.prototype.toString,push=Array.prototype.push,slice=Array.prototype.slice,indexOf=Array.prototype.indexOf;window.jQuery=window.$=jQuery;jQuery.fn=jQuery.prototype={init:function(selector,context){var match,elem,ret;if(!selector){this.length=0;return this;}if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}if(typeof selector==="string"){match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context);}else{elem=document.getElementById(match[3]);if(elem&&elem.id!==match[3]){return rootjQuery.find(selector);}ret=jQuery(elem||null);ret.context=document;ret.selector=selector;return ret;}}else if(!context||context.jquery){return(context||rootjQuery).find(selector);}else{return jQuery(context).find(selector);}}else if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.3pre",size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems||null);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";}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){if(!elem||typeof elem==="string"){return jQuery.inArray(this[0],elem?jQuery(elem):this.parent().children());}return jQuery.inArray(elem.jquery?elem[0]:elem,this);},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},push:[].push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options,name,src,copy;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}if(length===i){target=this;--i;}for(;i+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString,hasDuplicate=false;var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}if(!selector||typeof selector!=="string"){return results;}var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context);chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])selector+=parts.shift();set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}if(pop==null){pop=context;}Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}if(!checkSet){checkSet=set;}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i=0)){if(!inplace)result.push(elem);}else if(inplace){curLoop[i]=false;}}}return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}if(match[2]==="~="){match[4]=" "+match[4]+" ";}return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return imatch[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(i=0,l=not.length;i=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}results=tmp;}return results;};}div.innerHTML="";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}div=null;})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="

";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}div=null;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="
";if(div.getElementsByClassName("e").length===0)return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i0){match=elem;break;}}elem=elem[dir];}checkSet[i]=match;}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML";};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i0){for(var n=length;n-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string")if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);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))));},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},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);},end:function(){return this.prevObject||jQuery(null);}});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),name,selector);};});jQuery.fn.extend({attr:function(name,value){var options=name,isFunction=jQuery.isFunction(value);if(typeof name==="string"){if(value===undefined){return this.length?jQuery.attr(this[0],name):null;}else{options={};options[name]=value;}}for(var i=0,l=this.length;i=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;});}});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,state){var type=typeof classNames;if(type==="string"){var isBool=typeof state==="boolean",className,i=0,classNames=classNames.split(/\s+/);while((className=classNames[i++])){state=isBool?state:!jQuery.className.has(this,className);jQuery.className[state?"add":"remove"](this,className);}}else if(type==="undefined"||type==="boolean"){if(this.className){jQuery.data(this,"__className__",this.className);}this.className=this.className||classNames===false?"":jQuery.data(this,"__className__")||"";}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.extend({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 elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!elem.tagName||!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&elem.nodeName.match(/(button|input)/i)&&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;if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}return elem[name];}if(!jQuery.support.style&¬xml&&name=="style"){if(set)elem.style.cssText=""+value;return elem.style.cssText;}if(set)elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}return jQuery.style(elem,name,value);}});jQuery.fn.extend({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]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode)wrap.insertBefore(this[0]);wrap.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,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=jQuery(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jQuery(arguments[0]).toArray());return set;}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML,ownerDocument=this.ownerDocument;if(!html){var div=ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")],ownerDocument)[0];}else return this.cloneNode(true);});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName)return;var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}i++;});}return ret;},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first)for(var i=0,l=this.length;i1||i>0?fragment.cloneNode(true):fragment);if(scripts)jQuery.each(scripts,evalScript);}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}return this.pushStack(ret,name,selector);};});jQuery.each({remove:function(selector){if(!selector||jQuery.multiFilter(selector,[this]).length){if(this.nodeType===1){cleanData(jQuery("*",this).add(this));}if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){if(this.nodeType===1){cleanData(jQuery("*",this));}while(this.firstChild){this.removeChild(this.firstChild);}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.extend({clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined")context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match)return[context.createElement(match[1])];}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number")elem+='';if(!elem)return;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+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||!jQuery.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/"&&!hasBody?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(!jQuery.support.leadingWhitespace&&/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);elem=jQuery.makeArray(div.childNodes);}if(elem.nodeType)ret.push(elem);else ret=jQuery.merge(ret,elem);});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1)ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));fragment.appendChild(ret[i]);}}return scripts;}return ret;}});function cleanData(elems){for(var i=0,l=elems.length;i=0){event.type=type=type.slice(0,-1);event.exclusive=true;}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem);}});}}if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data);}var nativeFn,nativeHandler;try{nativeFn=elem[type];nativeHandler=elem["on"+type];}catch(e){}if((!nativeFn||(jQuery.nodeName(elem,'a')&&type==="click"))&&nativeHandler&&nativeHandler.apply(elem,data)===false){event.result=false;}if(!bubbling&&nativeFn&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,'a')&&type==="click")){this.triggered=true;try{nativeFn();}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true);}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=new RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}if(event.isImmediatePropagationStopped()){break;}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event;}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}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&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.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!==undefined){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}return event;},proxy:function(fn,proxy,thisObject){if(proxy!==undefined&&!jQuery.isFunction(proxy)){thisObject=proxy;proxy=undefined;}proxy=proxy||function(){return fn.apply(thisObject!==undefined?thisObject:this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}},live:{add:function(proxy,data,namespaces){jQuery.extend(proxy,data||{});proxy.guid+=data.selector+data.live;jQuery.event.add(this,data.live,liveHandler);},remove:function(namespaces){if(namespaces.length){var remove=0,name=new RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++;}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler);}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src);}if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;}this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}function returnTrue(){return true;}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.preventDefault){e.preventDefault();}e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.stopPropagation){e.stopPropagation();}e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode;}catch(e){break;}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn,thisObject){if(jQuery.isFunction(data)){if(fn!==undefined){thisObject=fn;}fn=data;data=undefined;}fn=thisObject===undefined?fn:jQuery.event.proxy(fn,thisObject);return type==="unload"?this.one(type,data,fn,thisObject):this.each(function(){jQuery.event.add(this,type,fn,data);});},one:function(type,data,fn,thisObject){if(jQuery.isFunction(data)){if(fn!==undefined){thisObject=fn;}fn=data;data=undefined;}fn=thisObject===undefined?fn:jQuery.event.proxy(fn,thisObject);var one=jQuery.event.proxy(fn,function(event){jQuery(this).unbind(event,one);return fn.apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){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("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);if(callback)self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?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",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},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;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=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();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}head.insertBefore(script,head.firstChild);return undefined;}var requestDone=false;var xhr=s.xhr();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){if(jQuery.lastModified[s.url])xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]);if(jQuery.etag[s.url])xhr.setRequestHeader("If-None-Match",jQuery.etag[s.url]);}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){if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}}else 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);}catch(e){status="parsererror";}}if(status=="success"||status=="notmodified"){if(!jsonp)success();}else jQuery.handleError(s,xhr,status);complete();if(isTimeout)xhr.abort();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr&&!requestDone)onreadystatechange("timeout");},s.timeout);}try{xhr.send(type==="POST"?s.data:null);}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;}catch(e){}return false;},httpNotModified:function(xhr,url){var last_modified=xhr.getResponseHeader("Last-Modified");var etag=xhr.getResponseHeader("Etag");if(last_modified)jQuery.lastModified[url]=last_modified;if(etag)jQuery.etag[url]=etag;return xhr.status==304;},httpData:function(xhr,type,s){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(s&&s.dataFilter){data=s.dataFilter(data,type);}if(typeof data==="string"){if(type==="script"){jQuery.globalEval(data);}if(type=="json"){if(typeof JSON==="object"&&JSON.parse){data=eval("("+data+")");}else{data=(new Function("return "+data))();}}}return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+'='+encodeURIComponent(value);};if(jQuery.isArray(a)||a.jquery)jQuery.each(a,function(){add(this.name,this.value);});else for(var j in a)if(jQuery.isArray(a[j]))jQuery.each(a[j],function(){add(j,this);});else add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i").appendTo("body");display=elem.css("display");if(display==="none")display="block";elem.remove();elemdisplay[tagName]=display;}jQuery.data(this[i],"olddisplay",display);}}for(var i=0,l=this.length;i=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;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:[],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)this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||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;var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId)timerId=setInterval(jQuery.fx.tick,13);},show:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.style(this.elem,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)jQuery(this.elem).hide();if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.style(this.elem,p,this.options.orig[p]);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,{tick:function(){var timers=jQuery.timers;for(var i=0;i
';jQuery.extend(container.style,{position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'});container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);checkDiv.style.position='fixed',checkDiv.style.top='20px';this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15);checkDiv.style.position='',checkDiv.style.top='';innerDiv.style.overflow='hidden',innerDiv.style.position='relative';this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container);jQuery.offset.initialize=function(){};body=container=innerDiv=checkDiv=table=td=null;},bodyOffset:function(body){jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset)top+=parseFloat(jQuery.curCSS(body,'marginTop',true))||0,left+=parseFloat(jQuery.curCSS(body,'marginLeft',true))||0;return{top:top,left:left};}};jQuery.fn.extend({position:function(){if(!this[0])return null;var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(jQuery.curCSS(elem,'marginTop',true))||0;offset.left-=parseFloat(jQuery.curCSS(elem,'marginLeft',true))||0;parentOffset.top+=parseFloat(jQuery.curCSS(offsetParent[0],'borderTopWidth',true))||0;parentOffset.left+=parseFloat(jQuery.curCSS(offsetParent[0],'borderLeftWidth',true))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;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 null;var elem=this[0],win=("scrollTo"in elem&&elem.document)?elem:(elem.nodeName==="#document")?elem.defaultView||elem.parentWindow:false;return val!==undefined?this.each(function(){win=("scrollTo"in this&&this.document)?this:(this.nodeName==="#document")?this.defaultView||this.parentWindow:false;win?win.scrollTo(!i?val:jQuery(win).scrollLeft(),i?val:jQuery(win).scrollTop()):this[method]=val;}):win?win[i?'pageYOffset':'pageXOffset']||jQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],type,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],type,false,margin?"margin":"border"):null;};jQuery.fn[type]=function(size){var elem=this[0];if(!elem)return null;return("scrollTo"in elem&&elem.document)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeName==="#document")?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===undefined?jQuery.css(elem,type):this.css(type,typeof size==="string"?size:size+"px");};});})(window); var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",ON_READY_STATE_CHANGE="onreadystatechange",win=window,doc=document,nav=navigator,plugin=false,domLoadFnArr=[main],regObjArr=[],objIdArr=[],listenersArr=[],storedAltContent,storedAltContentId,storedCallbackFn,storedCallbackObj,isDomLoaded=false,isExpressInstallActive=false,dynamicStylesheet,dynamicStylesheetMedia,autoHideShow=true,ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=!+"\v1",playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){plugin=true;ie=false;d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/[a-zA-Z]/.test(d)?parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}else if(typeof win.ActiveXObject!=UNDEF){try{var a=new ActiveXObject(SHOCKWAVE_FLASH_AX);if(a){d=a.GetVariable("$version");if(d){ie=true;d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}}catch(e){}}return{w3:w3cdom,pv:playerVersion,wk:webkit,ie:ie,win:windows,mac:mac};}(),onDomLoad=function(){if(!ua.w3){return;}if((typeof doc.readyState!=UNDEF&&doc.readyState=="complete")||(typeof doc.readyState==UNDEF&&(doc.getElementsByTagName("body")[0]||doc.body))){callDomLoadFunctions();}if(!isDomLoaded){if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,false);}if(ua.ie&&ua.win){doc.attachEvent(ON_READY_STATE_CHANGE,function(){if(doc.readyState=="complete"){doc.detachEvent(ON_READY_STATE_CHANGE,arguments.callee);callDomLoadFunctions();}});if(win==top){(function(){if(isDomLoaded){return;}try{doc.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,0);return;}callDomLoadFunctions();})();}}if(ua.wk){(function(){if(isDomLoaded){return;}if(!/loaded|complete/.test(doc.readyState)){setTimeout(arguments.callee,0);return;}callDomLoadFunctions();})();}addLoadEvent(callDomLoadFunctions);}}();function callDomLoadFunctions(){if(isDomLoaded){return;}try{var t=doc.getElementsByTagName("body")[0].appendChild(createElement("span"));t.parentNode.removeChild(t);}catch(e){return;}isDomLoaded=true;var dl=domLoadFnArr.length;for(var i=0;i0){for(var i=0;i0){var obj=getElementById(id);if(obj){if(hasPlayerVersion(regObjArr[i].swfVersion)&&!(ua.wk&&ua.wk<312)){setVisibility(id,true);if(cb){cbObj.success=true;cbObj.ref=getObjectById(id);cb(cbObj);}}else if(regObjArr[i].expressInstall&&canExpressInstall()){var att={};att.data=regObjArr[i].expressInstall;att.width=obj.getAttribute("width")||"0";att.height=obj.getAttribute("height")||"0";if(obj.getAttribute("class")){att.styleclass=obj.getAttribute("class");}if(obj.getAttribute("align")){att.align=obj.getAttribute("align");}var par={};var p=obj.getElementsByTagName("param");var pl=p.length;for(var j=0;j';}}el.outerHTML=''+par+'';objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id);}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}else if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m]);}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n]);}}el.parentNode.replaceChild(o,el);r=o;}}return r;}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}function removeSWF(id){var obj=getElementById(id);if(obj&&obj.nodeName=="OBJECT"){if(ua.ie&&ua.win){obj.style.display="none";(function(){if(obj.readyState==4){removeObjectInIE(id);}else{setTimeout(arguments.callee,10);}})();}else{obj.parentNode.removeChild(obj);}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}obj.parentNode.removeChild(obj);}}function getElementById(id){var el=null;try{el=doc.getElementById(id);}catch(e){}return el;}function createElement(el){return doc.createElement(el);}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn];}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}function createCSS(sel,decl,media,newStyle){if(ua.ie&&ua.mac){return;}var h=doc.getElementsByTagName("head")[0];if(!h){return;}var m=(media&&typeof media=="string")?media:"screen";if(newStyle){dynamicStylesheet=null;dynamicStylesheetMedia=null;}if(!dynamicStylesheet||dynamicStylesheetMedia!=m){var s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media",m);dynamicStylesheet=h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){dynamicStylesheet=doc.styleSheets[doc.styleSheets.length-1];}dynamicStylesheetMedia=m;}if(ua.ie&&ua.win){if(dynamicStylesheet&&typeof dynamicStylesheet.addRule==OBJECT){dynamicStylesheet.addRule(sel,decl);}}else{if(dynamicStylesheet&&typeof doc.createTextNode!=UNDEF){dynamicStylesheet.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}}}function setVisibility(id,isVisible){if(!autoHideShow){return;}var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v;}else{createCSS("#"+id,"visibility:"+v);}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars&&typeof encodeURIComponent!=UNDEF?encodeURIComponent(s):s;}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i=0?'&':'?')+q;options.data=null;}else options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm();});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments);});}else if(options.success)callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i');var io=$io[0];if($.browser.msie||$.browser.opera)io.src='javascript:false;document.write("");';$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr('src','about:blank');}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;return;}if(xhr.aborted)return;var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y;}}}setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');$form.attr({target:id,method:'POST',action:opts.url});if(!options.skipEncodingOverride){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}if(opts.timeout)setTimeout(function(){timedOut=true;cb();},opts.timeout);var extraInputs=[];try{if(options.extraData)for(var n in options.extraData)extraInputs.push($('').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit();}finally{$form.attr('action',a);t?$form.attr('target',t):$form.removeAttr('target');$(extraInputs).remove();}},10);function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var operaHack=0;var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(doc.body==null&&!operaHack&&$.browser.opera){operaHack=1;cbInvoked--;setTimeout(cb,100);return;}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header];};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];xhr.responseText=ta?ta.value:xhr.responseText;}else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}data=$.httpData(xhr,opts.dataType);}catch(e){ok=false;$.handleError(opts,xhr,'error',e);}if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts]);}if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null;},100);};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}else doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null;};};};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false;}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var form=this.form;form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-this.offsetLeft;form.clk_y=e.pageY-this.offsetTop;}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},10);});});};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('click.form-plugin');});};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i0){return true;}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}$.fn.extend({_focus:$.fn.focus,focus:function(delay,fn){return typeof delay==='number'?this.each(function(){var elem=this;setTimeout(function(){$(elem).focus();(fn&&fn.call(elem));},delay);}):this._focus.apply(this,arguments);},remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});$.widget=function(name,prototype){var namespace=name.split(".")[0],fullName;name=name.split(".")[1];fullName=namespace+'-'+name;$.expr[':'][fullName]=function(elem){return!!$.data(elem,name);};$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1),returnValue=this;if(isMethodCall&&options.substring(0,1)=='_'){return returnValue;}(isMethodCall?this.each(function(){var instance=$.data(this,name),methodValue=(instance&&$.isFunction(instance[options])?instance[options].apply(instance,args):instance);if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue;return false;}}):this.each(function(){($.data(this,name)||$.data(this,name,new $[namespace][name](this,options))._init());}));return returnValue;};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=fullName;this.options=$.extend(true,{},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');return this;},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}options={};options[key]=value;}$.each(options,function(key,value){self._setData(key,value);});return self;},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);return this;},disable:function(){this._setData('disabled',true);return this;},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button&&$.browser.version<8){return this._mouseUp(event);}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:':input,option',distance:1,delay:0};})(jQuery); (function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=='original'&&!(/^(?:r|a|f)/).test(this.element.css("position")))this.element[0].style.position='relative';(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit();},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable"+" ui-draggable-dragging"+" ui-draggable-disabled");this._mouseDestroy();return this;},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is('.ui-resizable-handle'))return false;this.handle=this._getHandle(event);if(!this.handle)return false;return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager)$.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt)this._adjustOffsetFromHelper(o.cursorAt);if(o.containment)this._setContainment();this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,event);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true;},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger('drag',event,ui);this.position=ui.position;}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);return false;},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour)dropped=$.ui.ddmanager.drop(this,event);if(this.dropped){dropped=this.dropped;this.dropped=false;}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear();});}else{this._trigger("stop",event);this._clear();}return false;},_getHandle:function(event){if($.isFunction(this.options.handle))return this.options.handle(this.element,event);var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target)handle=true;});return handle;},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?o.helper.apply(this.element[0],[event]):(o.helper=='clone'?this.element.clone():this.element);if(!helper.parents('body').length)helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position")))helper.css("position","absolute");return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=='absolute'&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.browser.msie))po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce)return;var co=$(o.containment).offset();var over=($(ce).css("overflow")!='hidden');this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}else if(o.containment.constructor==Array){this.containment=o.containment;}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&$.browser.version<526&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&$.browser.version<526&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=='relative'&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.leftthis.containment[2])pageX=this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top;}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.topthis.containment[3])?top:(!(top-this.offset.click.topthis.containment[2])?left:(!(left-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data('draggable').options;if(t.css("opacity"))o._opacity=t.css("opacity");t.css('opacity',o.opacity);},stop:function(event,ui){var o=$(this).data('draggable').options;if(o._opacity)$(ui.helper).css('opacity',o._opacity);}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML')i.overflowOffset=i.scrollParent.offset();},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML'){if(!o.axis||o.axis!='x'){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d');if(!o.values)o.values=[this._valueMin(),this._valueMin()];if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]];}}else{this.range=$('
');}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range);}this.range.addClass("ui-widget-header");}if($(".ui-slider-handle",this.element).length==0)$('').appendTo(this.element).addClass("ui-slider-handle");if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle");}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default"+" ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault();}).hover(function(){if(!o.disabled){$(this).addClass('ui-state-hover');}},function(){$(this).removeClass('ui-state-hover');}).focus(function(){if(!o.disabled){$(".ui-slider .ui-state-focus").removeClass('ui-state-focus');$(this).addClass('ui-state-focus');}else{$(this).blur();}}).blur(function(){$(this).removeClass('ui-state-focus');});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i);});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled)return;switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index);}break;}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index);}else{curVal=newVal=self.value();}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax())return;newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin())return;newVal=curVal-step;break;}self._slide(event,index,newVal);return ret;}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active");}});this._refreshValue();},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider"+" ui-slider-horizontal"+" ui-slider-vertical"+" ui-slider-disabled"+" ui-widget"+" ui-widget-content"+" ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this;},_mouseCapture:function(event){var o=this.options;if(o.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i;}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index]);}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is('.ui-slider-handle');this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css('borderTopWidth'),10)||0)-(parseInt(closestHandle.css('borderBottomWidth'),10)||0)+(parseInt(closestHandle.css('marginTop'),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true;},_mouseStart:function(event){return true;},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false;},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false;},_detectOrientation:function(){this.orientation=this.options.orientation=='vertical'?'vertical':'horizontal';},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if('horizontal'==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0);}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1)percentMouse=1;if(percentMouse<0)percentMouse=0;if('vertical'==this.orientation)percentMouse=1-percentMouse;var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2))normValue+=this.options.step;return parseFloat(normValue.toFixed(5));},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values();}this._trigger("start",event,uiHash);},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((this.options.values.length==2&&this.options.range===true)&&((index==0&&newVal>otherVal)||(index==1&&newVal1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation)this._change(null,index);}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index);}else{return this.value();}}else{return this._values();}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case'disabled':if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");}else{this.handles.removeAttr("disabled");}case'orientation':this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case'value':this._refreshValue(animated);break;}},_step:function(){var step=this.options.step;return step;},_value:function(){var val=this.options.value;if(valthis._valueMax())val=this._valueMax();return val;},_values:function(index){if(arguments.length){var val=this.options.values[index];if(valthis._valueMax())val=this._valueMax();return val;}else{return this.options.values;}},_valueMin:function(){var valueMin=this.options.min;return valueMin;},_valueMax:function(){var valueMax=this.options.max;return valueMax;},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';$(this).stop(1,1)[animate?'animate':'css'](_set,o.animate);if(self.options.range===true){if(self.orientation=='horizontal'){(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({left:valPercent+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({width:(valPercent-lastValPercent)+'%'},{queue:false,duration:o.animate});}else{(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({bottom:(valPercent)+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({height:(valPercent-lastValPercent)+'%'},{queue:false,duration:o.animate});}}lastValPercent=valPercent;});}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';this.handle.stop(1,1)[animate?'animate':'css'](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?'animate':'css']({width:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?'animate':'css']({width:(100-valPercent)+'%'},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?'animate':'css']({height:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?'animate':'css']({height:(100-valPercent)+'%'},{queue:false,duration:o.animate});}}}));$.extend($.ui.slider,{version:"@VERSION",eventPrefix:"slide",defaults:$.extend({},$.ui.mouse.defaults,{animate:false,distance:0,max:100,min:0,orientation:'horizontal',range:false,step:1,value:0,values:null})});})(jQuery); ;jQuery.effects||(function($){$.effects={version:"@VERSION",save:function(element,set){for(var i=0;i');var wrapper=element.parent();if(element.css('position')=='static'){wrapper.css({position:'relative'});element.css({position:'relative'});}else{var top=element.css('top');if(isNaN(parseInt(top,10)))top='auto';var left=element.css('left');if(isNaN(parseInt(left,10)))left='auto';wrapper.css({position:element.css('position'),top:top,left:left,zIndex:element.css('z-index')}).show();element.css({position:'relative',top:0,left:0});}wrapper.css(props);return wrapper;},removeWrapper:function(element){if(element.parent().is('.ui-effects-wrapper'))return element.parent().replaceWith(element);return element;},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0)value[x]=unit[0]*factor+unit[1];});return value;},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||'';if(typeof oldStyleAttr=='object')oldStyleAttr=oldStyleAttr["cssText"];if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle;}var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.addClass(value.add);if(value.remove)that.removeClass(value.remove);var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.removeClass(value.add);if(value.remove)that.addClass(value.remove);for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/))))offset[n]=newStyle[n];}that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=='object'){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr;}else $(this).attr("style",oldStyleAttr);if(value.add)$(this).addClass(value.add);if(value.remove)$(this).removeClass(value.remove);if(cb)cb.apply(this,arguments);});});}};function _normalizeArguments(effect,options,speed,callback){if($.isFunction(options)){callback=options;speed=null;options={};}if(typeof options=='number'){callback=speed;speed=options;options={};}options=options||{};speed=speed||options.duration;speed=$.fx.off?0:typeof speed=='number'?speed:$.fx.speeds[speed]||$.fx.speeds._default;callback=callback||options.complete;return[effect,options,speed,callback];}$.fn.extend({effect:function(effect,options,speed,callback){var args=_normalizeArguments.apply(this,arguments),args2={options:args[1],duration:args[2],callback:args[3]},effectMethod=$.effects[effect];return effectMethod&&!$.fx.off?effectMethod.call(this,args2):this;},_show:$.fn.show,show:function(speed){if(!speed||typeof speed=='number'||$.fx.speeds[speed]){return this._show.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args[1].mode='show';return this.effect.apply(this,args);}},_hide:$.fn.hide,hide:function(speed){if(!speed||typeof speed=='number'||$.fx.speeds[speed]){return this._hide.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args[1].mode='hide';return this.effect.apply(this,args);}},__toggle:$.fn.toggle,toggle:function(speed){if(!speed||typeof speed=='number'||$.fx.speeds[speed]||typeof speed=='boolean'||$.isFunction(speed)){return this.__toggle.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args[1].mode='toggle';return this.effect.apply(this,args);}},_addClass:$.fn.addClass,addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames);},_removeClass:$.fn.removeClass,removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames);},_toggleClass:$.fn.toggleClass,toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed);},switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback]);},cssUnit:function(key){var style=this.css(key),val=[];$.each(['em','px','%','pt'],function(i,unit){if(style.indexOf(unit)>0)val=[parseFloat(style),unit];});return val;}});$.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state===0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}fx.elem.style[attr]='rgb('+Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0)+','+Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0)+','+Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)+')';};});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color))return colors['transparent'];return colors[$.trim(color).toLowerCase()];}function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=''&&color!='transparent'||$.nodeName(elem,"body"))break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d * (Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d * (Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2 * (Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(atolerance){window.$loadedImageCount=images.length;window.$imagesLoadedTolerance=$.toInt(tolerance);if(!window.$onImagesLoaded)window.$onImagesLoaded=[];window.$onImagesLoaded.push(fn);images.one('load',$.imageHasLoaded);setTimeout($.fireImagesLoaded,20000);}else fn();};$.imageHasLoaded=function(){if(!window.$onImagesLoaded)return;try{window.$loadedImageCount--;}catch(ex){}if((window.$loadedImageCount||0)<=(window.$imagesLoadedTolerance||0)){$.fireImagesLoaded();}};$.fireImagesLoaded=function(){if(!window.$onImagesLoaded)return;for(var i=0;i1){var parts=url[1].split('&');for(var i=0;i');var clone=$(this[0].cloneNode(false)).html(this.html()).appendTo(div);var outer=div.html();div.remove();return outer.replace(/ jQuery\d+="(?:\d+|null)"/g,"");}}else return null;};$.fn.relativePos=function(base,corner,direction,offset,bounding,isreverse){if($.browser.safari&&typeof base.clientX!='undefined'){var doc=document.documentElement,body=document.body;base.clientX=base.clientX-(doc&&doc.scrollLeft||body&&body.scrollLeft||0)+(doc.clientLeft||0);base.clientY=base.clientY-(doc&&doc.scrollTop||body&&body.scrollTop||0)+(doc.clientLeft||0);}if(this.length==0)return{};var wn=$(window).absPosition();var p1=base.clientX||base.clientY?{left:(base.clientX||0)+wn.left,top:(base.clientY||0)+wn.top,width:0,height:0}:$(base).absPosition();var p2=this.absPosition();if(!p2.width&&!p2.height){this.css({left:-999,top:-999,display:'inline'});p2={width:this.width(),height:this.height()};}isreverse=isreverse||{};var css=$.extend($.boundingPos(p1,p2,bounding||wn,corner,direction,isreverse),{display:'block'});var fixed=this.css('position')=='fixed';if(offset){if(isreverse.left)offset.left=0-(offset.left||0);if(isreverse.top)offset.top=0-(offset.top||0);css.left+=offset.left||0;css.top+=offset.top||0;}var op=this.offsetParent();if(op.length&&op[0]!=document&&op[0]!=document.documentElement){var p3=op.offset();css.left-=p3.left;css.top-=p3.top;}if(fixed){css.top-=(window.pageYOffset||document.documentElement.scrollTop||0);css.left-=(window.pageXOffset||document.documentElement.scrollLeft||0);}else css.position='absolute';return this.css(css);};$.boundingPos=function(base,el,bounding,corner,dir,isreverse){if(!bounding){bounding=$(window).absPosition();}if(!corner){corner=$._DIR._LOWER_RIGHT;}if(!dir){dir=$._DIR._LOWER_RIGHT;}if(corner.center){var css={left:(base.width-el.width)/2+base.left,top:(base.height-el.height)/2+base.top};if(css.topbounding.right&&l2>=bounding.left)){l=l2;if(isreverse)isreverse.left=true;}if((tbounding.bottom&&t2>=bounding.top)){t=t2;if(isreverse)isreverse.top=true;}if(l<0){l=0;}if(t<0){t=0;}return{left:l,top:t};};$.fn.container=function(pattern){if(this.is(pattern))return this;else if(this.length){var p=this[0].stepParent||this[0].parentNode;while(p&&!$(p).is(pattern)){try{p=p.stepParent||p.parentNode;}catch(error){p=null;};}if(p)return $(p);else return new jQuery([]);}};$.fn.hoverClass=function(overClass){return this.each(function(i){this.$self=$(this);this.$overClass=overClass;this.$self.hover($.overClass,$.outClass);});};$.fn.toggleValue=function(){return this.bind('focus',$.clearValue).bind('blur',$.restoreValue);};$.clearValue=function(e){if(typeof(this.value)!='undefined'&&typeof(this.origValue)=='undefined')this.origValue=this.value;if(this.origValue&&this.origValue==this.value)this.value='';};$.restoreValue=function(e){if(typeof(this.value)!='undefined'&&!this.value&&this.origValue)this.value=this.origValue;};$.fn.hoverImage=function(swap){return this.each(function(i){this.$self=$(this);var img=swap?(swap.push?(swap.length>i?swap[i]:null):swap):this.$self.attr('_overimg');if(!img){return;}this.$self.attr('_outimg',this.$self.attr('src'));this.$self.hover($.overImage,$.outImage);$.preload(img);});};$.fn.hoverRelated=function(fnOver,fnOut,child){function handleHover(event){var parent=event.relatedTarget;while(parent&&parent!=this)try{parent=parent.stepParent||parent.parentNode;}catch(error){parent=this;};if(parent==this)return false;var step=this.stepParent;var p=event.relatedTarget;while(p){if(p==this||(step&&step==p))return false;try{p=p.stepParent||p.parentNode;}catch(ex){p=null};}if(event.type=='mouseout'||event.type=='mouseleave'){if(step){$(step).trigger('mouseout',[event]);return false;}var result=fnOut.apply(this,[event]);var step=null;p=this.parentNode;while(!step&&p){try{step=p.stepParent;p=p.parentNode;}catch(ex){p=null;}}if(step){$(step).trigger('mouseout',[event]);}return result;}else return fnOver.apply(step||this,[event]);}if(fnOver.guid){handleHover.guid=fnOver.guid;}this.mouseover(handleHover).mouseout(handleHover);if(!fnOver.giud){fnOver.guid=handleHover.guid;}if(!fnOut.giud){fnOut.guid=handleHover.guid;}if(child&&child.length&&this.length){var stepParent=this[0];for(var i=0;i ');div.css(css);div.appendTo(document.body);var complete=$.isFunction(fn)?function(){div.remove();fn();}:function(){div.remove()};div.animate(p2,easing,complete);}};$.fn.loading=function(timeout,options){if(timeout==null||typeof(timeout)=='undefined')timeout=20000;var o=options||{};var offset=o.offset;var message=o.message;var opacity=o.opacity||.25;var mrelative=o.mrelative;return this.each(function(i){var el=$(this);if(!this.isloading){var node=this.nodeName&&this.nodeName.toLowerCase();var attach;if(el.is('table,tbody,tr')){attach=el.find('td:visible:first');if(!attach.length){if(el.is('table'))attach=el.parent();else attach=el.parents('table:first').parent();}}else if(!el.is('td,div,body'))attach=el.parents().filter('div,td,body').filter(':visible').eq(0);else attach=el;var pos=attach.is('td')?attach.parents('table:first'):attach;if(node!='body'&&pos.css('position')=='static'){pos.css('position','relative');el.data('oldposition',pos)}var dim=el.relPosition(true);if(el[0]==pos[0]){dim.left=0;dim.top=0;}dim.opacity=opacity;var iframe=$($.browser.msie?'':'
').css(dim);var div=$('
').css(dim);if(message==''){message='';}else if(!message){message='
 
 Loading...
';}else if(!/'+message+'';}var msg=$(message);this.isloading=$([iframe[0],div[0],msg[0]]).appendTo(attach);mrelative=mrelative||(node=='body'?window:this);msg.relativePos(mrelative,{center:true},null,offset,$(document).absPosition());if(timeout){var loadingTimeout=setTimeout(function(){el.doneLoading();if(el.is(':visible')&&el.parents(':hidden').length==0)alert('Timeout -- the process could not be completed.');},timeout);el.data('loading:timeout',loadingTimeout);}}});};$.fn.doneLoading=function(){return this.each(function(i){if(this.isloading){this.isloading.remove();this.isloading=null;var el=$(this);var loadingTimeout=el.data('loading:timeout');if(loadingTimeout)clearTimeout(loadingTimeout);el.removeData('loading:timeout');el.removeAttr('isloading');var pos=el.data('oldposition');if(pos){pos.css('position','static');el.removeData('oldposition');}}});};$.fn.selectEnd=function(){var el=this.length?this[0]:null;if(el){$.selectEnd(el);}return this;};$.fn.removeStyle=function(name){if(!name)return this;else if(name.toLowerCase)name=[name.toLowerCase()];else if(name.length){for(var i=0;i=0;i--){var style=$.trim(styles[i].split(':')[0]).toLowerCase();for(var j=0;j0){body=body[0];}else{return this;}$.each(arguments,function(i,arg){if(!arg)return;if(arg.constructor==Number){arg=arg.toString();}if(arg.outerHTML){arg=arg.outerHTML;}body.innerHTML+=arg;});}return this;};$.fn.selfsubmit=function(){var btn=this.find('input:submit,input:image').eq(0);this.find('input:text,input:password').data('submitbtn',btn).onenter(function(e){var btn=$(this).data('submitbtn');if(btn&&btn.length){btn[0].click();return false;}});return this;};$.fn.getRow=function(attr){if(!this.length)return{};var row=this[0].$row;if(!row){try{row=eval('('+this.attr(attr||'_row')+')')}catch(ex){row={};}this[0].$row=row=row||{};}return row;};$.fn.log=function(msg){if(console)console.log("%s: %o",msg,this);return this;};$.extend({_pageOverlay:null,_overlayFrame:null,pageOverlay:function(click){if(!$._pageOverlay){if($.pageFloaters().length>0){$._overlayFrame=$('');$._overlayFrame.css({opacity:0});$._overlayFrame.appendTo(document.body);}$._pageOverlay=$('');$._pageOverlay.css({opacity:0});$._pageOverlay.appendTo(document.body);if(click){$._pageOverlay.click($.isFunction(click)?click:function(e){$.overlayOut();});}}return $._pageOverlay;},overlaySize:function(){var p1=$(document.body).absPosition();var p2=$(window).absPosition();var l=p1.leftp2.width?p1.width:p2.width;var h=p1.height>p2.height?p1.height:p2.height;return{left:l,top:t,width:w,height:h};},overlayIn:function(speed,opacity,fn){$.pageOverlay().css({display:'block',width:0,height:0});var css=$.overlaySize();$.pageOverlay().css(css);if($._overlayFrame){$._overlayFrame.css(css);}$.pageOverlay().animate({opacity:opacity||.6},speed||400,fn);$(window).bind('resize',$.resizeOverlay);},overlayOut:function(speed,fn){var ol=$.pageOverlay();ol.animate({opacity:0},speed||400,function(){ol.css({display:'none'});if($._overlayFrame){$._overlayFrame.css({display:'none'});}if($.isFunction(fn)){fn();}});$(window).unbind('resize',$.resizeOverlay);},_pageFloaters:null,pageFloaters:function(){if(jQuery._pageFloaters==null){var f=new Array();if(jQuery.browser.msie6){jQuery('select').each(function(){f.push(this);});}jQuery._pageFloaters=f;}return jQuery._pageFloaters;},resizeOverlay:function(){var css=$.overlaySize();$.pageOverlay().css(css);if($._overlayFrame){$._overlayFrame.css(css);}},thickbox:function(o){o=o||{};var url=o.url;var width=o.width||600;var height=o.height||400;var noclose=o.noclose;if(!url)return;var scroll=(o.noscroll&&' scrolling="no"')||'';var div=$('').appendTo(document.body).css({width:width,height:height}).relativePos(window,{center:true}).css({opacity:0,display:'none'});var btn=div.find('div.tb_close');if(noclose)btn.hide();else btn.find('input:button').click($.closeThickbox);var w=div.innerWidth();var h=div.innerHeight()-(o.noclose?0:btn.outerHeight());div.find('iframe').css({width:w,height:h});$.overlayIn(function(){div.css({display:'block'}).fadeTo(300,1);div=null;});},closeThickbox:function(){var div=$('#tb_div');div.fadeTo(300,0,function(){$.overlayOut();div.remove();div=null;});},selectEnd:function(control){if(control.focus){control.focus();}if(control.createTextRange){var range=control.createTextRange();range.collapse(false);range.select();}else if(control.setSelectionRange){var length=control.value.length;control.setSelectionRange(length,length);}},selectionInsert:function(area,insert){if(area.setSelectionRange){var start=area.selectionStart;var end=area.selectionEnd;var text=area.value;var pre=String.substring(text,0,start);var sel=String.substring(text,start,end);var post=String.substring(text,end);text=pre+insert+sel+post;area.value=text;area.selectionStart=start+insert.length;area.selectionEnd=end+insert.length;return false;}else if(document.selection&&document.selection.createRange){area.focus();var range=document.selection.createRange();range.text=insert;range.collapse(false);return false;}},selectionWrap:function(area,wrap1,wrap2){if(area.setSelectionRange){var start=area.selectionStart;var end=area.selectionEnd;var text=area.value;var pre=String.substring(text,0,start);var sel=String.substring(text,start,end);var post=String.substring(text,end);text=pre+wrap1+sel+wrap2+post;area.value=text;area.focus();area.setSelectionRange(start+wrap1.length,end+wrap1.length);return false;}else if(document.selection&&document.selection.createRange){area.focus();var range=document.selection.createRange();range.text=wrap1+range.text+wrap2;range.moveEnd('character',0-wrap2.length);range.collapse(false);range.select();return false;}},removeAtSelection:function(area,remove,before){var text=area.value;if(area.setSelectionRange){var start=area.selectionStart-(before?remove.length:0);var end=area.selectionEnd+(before?0:remove.length);var text=area.value;var pre=String.substring(text,0,start);var sel=String.substring(text,start,end);var post=String.substring(text,end);if(sel==remove){area.value=pre+post;area.focus();area.setSelectionRange(start+start);return false;}}else if(area.createTextRange){area.focus();var sel=document.selection.createRange();if(before)sel.moveStart('character',0-remove.length);else sel.moveEnd('character',remove.length);if(sel.text==remove){sel.text='';sel.select();return false;}}},startPosition:function(area){var pos;if(area.setSelectionRange)return area.selectionStart;else if(document.selection){area.focus();var c="\001";var sel=document.selection.createRange();var txt=sel.text;var dul=sel.duplicate();var len=0;try{dul.moveToElementText(area);}catch(e){return 0;}sel.text=txt+c;len=(dul.text.indexOf(c));sel.moveStart('character',-1);sel.text="";return len;}else return-1;},autoHeight:function(e){var s=this.scrollHeight;var o=this.offsetHeight;if(s&&s>o)this.style.height=s+'px';},overClass:function(e){if(this.$self){this.$self.addClass(this.$overClass);}},outClass:function(e){if(this.$self){this.$self.removeClass(this.$overClass);}},overImage:function(e){if(this.$self){this.$self.attr('src',this.$self.attr('_overimg'));}},outImage:function(e){if(this.$self){this.$self.attr('src',this.$self.attr('_outimg'));}},preload:function(img){var preloader=$('#hidden_preloader');if(!preloader.length){preloader=$('').appendTo(document.body);}var imgs=$.makeArray(img);for(var i=0;i');}},aposRegex:new RegExp("'","g"),quotRegex:new RegExp('"','g'),encode:function(val){if(val==null)return'';else return encodeURIComponent(val+"").replace($.aposRegex,'%27').replace($.quotRegex,'%22');},decode:function(val){return val?decodeURIComponent(val):'';},log:function(obj){if(typeof(firebug)!='undefined')firebug.d&&firebug.d.console&&firebug.d.console.cmd&&firebug.d.console.cmd.log(obj);else if(typeof(console)!='undefined')console&&console.log&&console.log(obj);},inspect:function(el){if(el&&el.jquery)el=el.length?el[0]:null;if(!el)return;if(typeof(firebug)!='undefined')firebug.inspect&&firebug.inspect(el);},toInt:function(amount){if(!amount)return 0;if(typeof(amount)=='string'){amount=$.trimLeft(amount.replace(/[^\d.-]/g,''),'0');}var val=parseInt(amount);if(isNaN(val)){return 0;}else{return val;}},toByte:function(amount){var val=$.toInt(amount);if(val<0)return 0;else if(val>255)return 255;else return val;},trimLeft:function(value,character){if(!value)return'';value=value+'';while(value.charAt(0)==(character||' ')){value=value.substring(1);}return value;},toFloat:function(amount){if(!amount)return 0.00;if(typeof(amount)=='string'){amount=amount.replace(/[^\d.-]/g,'');}var val=parseFloat(amount);if(isNaN(val)){return 0.00;}else{return val;}},toBool:function(val){if(typeof(val)=='undefined')return false;if(val==null)return false;if(val==true)return true;if(val==false)return false;switch((''+val).toUpperCase()){case"1":case"ON":case"TRUE":case"YES":case"SUCCESS":return true;default:return false;}},currencyFormat:function(amount){var i=$.toFloat(amount);if(isNaN(i)){i=0.00;}var minus='';if(i<0){minus='-';}i=Math.abs(i);i=parseInt((i+.005)*100);i=i/100;s=new String(i);if(s.indexOf('.')<0){s+='.00';}if(s.indexOf('.')==(s.length-2)){s+='0';}s=minus+s;var delimiter=",";var a=s.split('.',2);var d=a[1];var i=parseInt(a[0]);if(isNaN(i)){return'';}var minus='';if(i<0){minus='-';}i=Math.abs(i);var n=new String(i);var a=[];while(n.length>3){var nn=n.substr(n.length-3);a.unshift(nn);n=n.substr(0,n.length-3);}if(n.length>0){a.unshift(n);}n=a.join(delimiter);if(d.length<1){amount=n;}else{amount=n+'.'+d;}amount=minus+amount;return'$'+amount;},dateTimeFormat:function(date,format){if(!date)return'';if(!format)format='d-MMM-yyyy';return format.replace($.dateTimeRegex,function(){return $.dateTimeProcess(date,Array.prototype.slice.call(arguments,1));});},dateTimeRegex:/(d+)|(h+)|(H+)|(m+)|(M+)|(s+)|(t+)|(T+)|(y+)|(D+)/g,leadingZero:function(val){if(val<10)return'0'+val;else return val;},dateTimeProcess:function(dateTime,args){for(var i=0;i12)hours-=12;return key.length==1?hours||12:$.leadingZero(hours||12);case 2:return key.length==1?dateTime.getHours():$.leadingZero(dateTime.getHours());case 3:return key.length==1?dateTime.getMinutes():$.leadingZero(dateTime.getMinutes());case 4:switch(key.length){case 1:return dateTime.getMonth()+1;case 2:return $.leadingZero(dateTime.getMonth()+1);case 3:switch(dateTime.getMonth()+1){case 1:return"Jan";case 2:return"Feb";case 3:return"Mar";case 4:return"Apr";case 5:return"May";case 6:return"Jun";case 7:return"Jul";case 8:return"Aug";case 9:return"Sep";case 10:return"Oct";case 11:return"Nov";case 12:return"Dec";default:return'';}default:switch(dateTime.getMonth()+1){case 1:return"January";case 2:return"February";case 3:return"March";case 4:return"April";case 5:return"May";case 6:return"June";case 7:return"July";case 8:return"August";case 9:return"September";case 10:return"October";case 11:return"November";case 12:return"December";default:return'';}}case 5:return key.length==1?dateTime.getSeconds():$.leadingZero(dateTime.getSeconds());case 6:case 7:return(dateTime.getHours()<12?'A':'P')+(key.length==1?'':'M');case 8:return key.length==2?dateTime.getFullYear().toString().substr(2):dateTime.getFullYear();case 9:switch(key.length){case 1:return dateTime.getDate();case 2:return $.leadingZero(dateTime.getDate());default:var d=dateTime.getDate();switch(d%10){case 1:return d+'st';case 2:return d+'nd';case 3:return d+'rd';default:return d+'th';}}}}}});$.getQuery=function(){var query={};var items=window.location.href.split('?').pop().split('&');for(var i=0;i');this.input.after(img).css({verticalAlign:'middle'});img.data('cal',this).bind('click',this.activate);}}else o.onfocus=true;if(o.onfocus)this.input.bind('focus',this.activate);this.input.bind('keydown',this.tabClose);this.init();};$.extend($.cobalt.calendar,{html:'',months:['January','February','March','April','May','June','July','August','September','October','November','December'],monthsAbbr:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],datePatterns:[/^(\d\d?)[ -\/\\]+([a-zA-Z]{3,9})[- \/\\]+(\d{2}|\d{4})$/,/^(\d{4})(\d{2})(\d{2})$/,/^(\d\d?)[ -\/\\]+([a-zA-Z]{3,9})[- \/\\]+(\d{2}|\d{4})\s+(\d{1,2}):(\d{2})(A|P)M?$/i,/^(\d{1,2}):(\d{2}):?(A|P)M?$/i],parseDate:function(val,hideError){val=val&&val.replace(/^\s+|\s+$/,'').replace(/(\d)([AP]M)\b/gi,'$1:$2');var date=val?new Date(val):(hideError?null:new Date());if(isNaN(date)){var p=$.cobalt.calendar.datePatterns;var r;var index;for(var i=0;iSuMoTuWeThFrSa'];for(var i=0;i<42;i++){if(i%7==0){if(i>0)sb.push('');sb.push('');}var current=new Date(year,month,1-firstDayOfWeek+i);sb.push('
');sb.push(current.getDate());sb.push('
');}sb.push('');this.calDays.html(sb.join(''));},drawMonths:function(){var year=this.currentYear;var sb=[''];for(var i=0;i<12;i++){if(i%4==0){if(i>0)sb.push('');sb.push('');}var current=new Date(year,0+i,1);sb.push('');}sb.push('
');sb.push($.cobalt.calendar.monthsAbbr[i]);sb.push('
');this.calMonths.html(sb.join('')).show();},drawYears:function(){var year=(Math.floor(this.currentYear/10)*10)-1;var sb=[''];for(var i=0;i<12;i++){if(i%4==0){if(i>0)sb.push('');sb.push('');}var current=year+i;sb.push('');}sb.push('
');sb.push(current+'
');this.calYears.html(sb.join('')).show();},drawTime:function(){var hour=this.currentHour;var minute=this.currentMinute;var pm=hour>11;this.calHours.attr('class','cal_hours cal_hours_'+Math.round(hour%12));this.calMinutes.attr('class','cal_mins cal_mins_'+Math.round((minute/5)%12));},updateTimeSelect:function(){var hour=Math.round(this.currentHour%12);var minute=Math.round(this.currentMinute/5)*5;var pm=this.currentHour>11;this.select.hours.val(hour||12);this.select.minutes.val(minute);this.select.ampm.val(pm?'PM':'AM');},updateClockSelect:function(e){var cal=this.updateClockSelect?this:$(this).data('cal');var hour=$.toInt(cal.select.hours.val());cal.currentHour=(hour==12?0:hour)+(cal.select.ampm.val()=='PM'?12:0);cal.currentMinute=$.toInt(cal.select.minutes.val());cal.drawTime();var date=new Date(cal.currentYear,cal.currentMonth,cal.currentDate,cal.currentHour||0,cal.currentMinute||0,0);cal.recordDate(date);},timeHelper:function(e){return $('').appendTo(document.body);},timeStart:function(e,ui){var cal=$(this).data('cal');ui.helper.calendar=cal;ui.helper.position=cal.clock.offset();ui.helper.position.left+=(65-document.documentElement.scrollLeft);ui.helper.position.top+=(65-document.documentElement.scrollTop);var minute=cal.calculatePosition($.toInt(cal.calMinutes.attr('class').split('_').pop())*30,45);var hour=cal.calculatePosition($.toInt(cal.calHours.attr('class').split('_').pop())*30,25);var x=(e.clientX-ui.helper.position.left)||1;var y=(ui.helper.position.top-e.clientY)||1;minute.h=Math.sqrt(Math.pow(minute.x-x,2)+Math.pow(minute.y-y,2));hour.h=Math.sqrt(Math.pow(hour.x-x,2)+Math.pow(hour.y-y,2));if(hour.h=270){dim.x=0-height;dim.y=width;}else if(angle>=180){dim.x=0-width;dim.y=0-height;}else if(angle>=90){dim.x=height;dim.y=0-width;}return dim;},timeDrag:function(e,ui){var width=(e.clientX-ui.helper.position.left)||1;var height=(ui.helper.position.top-e.clientY)||1;var angle=90-Math.round(Math.atan(height/width)*180/Math.PI*100)/100;if(width<=0)angle+=180;var nearest=Math.floor(angle/30);ui.helper.hand.attr('class',ui.helper.css+nearest);var cal=ui.helper.calendar;if(ui.helper.hand.is('.cal_hours')){var hour=nearest+(cal.select.ampm.val()=='PM'?12:0);if(hour==cal.currentHour)return;else cal.currentHour=hour;}else{var minute=nearest*5;if(minute==cal.currentMinute)return;else cal.currentMinute=minute;}cal.updateTimeSelect();var date=new Date(cal.currentYear,cal.currentMonth,cal.currentDate,cal.currentHour||0,cal.currentMinute||0,0);cal.recordDate(date);},activate:function(e){var cal=$(this).data('cal')||this;if(cal.active)return;cal.active=true;cal.isover=false;cal.setDateFromField();cal.calendar.relativePos(cal.input,{top:false,left:true});cal.scope='Days';cal.calMonths.hide();if(!cal.deactivate){cal.deactivate=function(cal){return function(e){if(!cal.isover&&!cal.inputover&&!$(e.target).data('cal')){cal.close();var el=$(e.target);if(el.data('cal'))el.trigger('focus');}};}(cal);}$(document).bind('mousedown',cal.deactivate);},select:function(e){var cal=$(this).data('cal');var el=$(e.target);if(el.is('div.cal_day')){if(this.options&&$.isFunction(this.options.onselect))this.options.onselect(this,date);var d=el.attr('_date').split('.');var date=new Date(parseInt(d[0]),parseInt(d[1]),parseInt(d[2]),cal.currentHour||0,cal.currentMinute||0,0);cal.recordDate(date);if(!cal.options.clock)cal.close();else cal.drawDays();}else if(el.is('div.cal_prev')||el.parent('div.cal_prev').length){cal.move(-1);}else if(el.is('div.cal_next')||el.parent('div.cal_next').length){cal.move(1);}else if(el.is('div.cal_month')){var d=el.attr('_date').split('.');cal.currentYear=parseInt(d[0]);cal.currentMonth=parseInt(d[1]);cal.scope='Days';cal.calMonths.hide();cal.drawCalendar();}else if(el.is('div.cal_year')){var d=el.attr('_date').split('.');cal.currentYear=parseInt(d[0]);cal.scope='Months';cal.calYears.hide();cal.drawCalendar();}else if(el.is('div.cal_today')){if(this.options&&$.isFunction(this.options.onselect))this.options.onselect(this,date);var date=new Date();cal.recordDate(date);if(!cal.options.clock)cal.close();else{cal.scope='Days';cal.calMonths.hide();cal.calYears.hide();cal.drawCalendar();}}else if(el.is('div.cal_period')){switch(cal.scope){case'Days':cal.scope='Months';break;case'Months':cal.scope='Years';break;}cal.drawCalendar();}else if(el.is('div.cal_close')){cal.close();}},recordDate:function(d){this.startDate=d;this.currentDate=d.getDate();this.currentMonth=d.getMonth();this.currentYear=d.getFullYear();this.currentHour=d.getHours();this.currentMinute=Math.round(d.getMinutes()/5)*5;var format=this.options.nodate?'h:mmtt':(this.options.clock?'MM/dd/yyyy h:mmtt':'MM/dd/yyyy');var val=$.dateTimeFormat(d,format);if(typeof(this.input[0].value)!='undefined'){this.input[0].value=val;}else{this.input.html(val);}try{this.input.trigger('change');}catch(ex){;}},tabClose:function(e){if(e.which==9){var cal=this.tabClose?this:$(this).data('cal');cal.close();}},close:function(e){var cal=this.recordDate?this:$(this).data('cal');cal.calendar.hide();cal.active=false;$(document).unbind('mousedown',cal.deactivate);},hoverIn:function(e){$(this).data('cal').isover=true;},hoverOut:function(e){$(this).data('cal').isover=false;},inputIn:function(e){$(this).data('cal').inputover=true;},inputOut:function(e){$(this).data('cal').inputover=false;},init:function(){this.calendar=$($.cobalt.calendar.html);this.input.parent().append(this.calendar);this.caldate=this.calendar.find('div.cal_date');this.period=this.calendar.find('div.cal_period');this.calDays=this.calendar.find('div.cal_days');this.calMonths=this.calendar.find('div.cal_months');this.calYears=this.calendar.find('div.cal_years');this.today=this.calendar.find('div.cal_today');if($.browser.msie6)this.calendar.addClass('cal_ie6');this.calendar.data('cal',this).bind('mouseenter',this.hoverIn).bind('mouseleave',this.hoverOut).click(this.select);this.input.bind('mouseenter',this.inputIn).bind('mouseleave',this.inputOut);this.clockpanel=this.calendar.find('div.cal_clockpanel');this.clock=this.calendar.find('div.cal_clock').data('cal',this);if(this.options.clock){if(this.options.nodate){this.caldate.hide();this.calendar.css({width:150});this.clockpanel.css({left:-1});}else this.calendar.css({width:341});this.calMinutes=this.clock.children('div.cal_mins');this.calHours=this.clock.children('div.cal_hours');this.clock.draggable({distance:5,helper:this.timeHelper,start:this.timeStart,drag:this.timeDrag});this.select={hours:this.clockpanel.find('select.cal_hours').data('cal',this).change(this.updateClockSelect),minutes:this.clockpanel.find('select.cal_minutes').data('cal',this).change(this.updateClockSelect),ampm:this.clockpanel.find('select.cal_ampm').data('cal',this).change(this.updateClockSelect)};}else this.clock.hide();}});})(jQuery); (function($){$.fn.Tree=function(o){return this.each(function(){if(!this.itree){new $.cobalt.tree(this,o);}});};$.cobalt=$.cobalt||{};$.cobalt.tree=function(el,o){$.extend(this,o||{});this.init(el);};$.extend($.cobalt.tree.prototype,{oninit:null,onload:null,ontoggle:null,getChildrenUrl:'CobaltAjax.ashx?M=GetPageTree',handleClick:function(e){var el=$(e.target);if(el.is('span')){var link=el.parent();if(link.attr('href')){if(this.itree.selectLink)return this.itree.selectLink(link,e);}else return false;}var on;var end;if(el.is('li')){switch(el.attr('class')){case"guideopened":el.attr('class','guideclosed');on=false;end=false;break;case"guideclosed":el.attr('class','guideopened');on=true;end=false;break;case"guideendopened":el.attr('class','guideendclosed');on=false;end=true;break;case"guideendclosed":el.attr('class','guideendopened');on=true;end=true;break;}}else return;var ul=el.children('ul');var ajax=false;if(on){if(ul.length)ul.css({display:'block'});else{el.attr('class',end?'guideendpending':'guidepending');var pageid=el.attr('_pageid');if(pageid=='-1')pageid=el.getRow().Path||el.getRow().BasePath;this.itree.loadChildren(el,pageid,null,e.path);ajax=true;}}else ul.css({display:'none'});if(!ajax&&$.isFunction(this.itree.ontoggle))this.itree.ontoggle.call(this.itree,el);return false;},loadChildren:function(el,pageid,href,path){var it=this;var url=$.getAjaxUrl(it.getChildrenUrl,{X:this.fields,S:1,P:pageid,H:$.encode(href),L:it.expandall?-1:1});if(url){$.ajax({url:url,success:function(data){it.renderChildren.call(it,data,el,path);}});return false;}},renderChildren:function(results,el,path){if(!results){if(!this.initialized)this.initSetup();return;}switch(el.attr('class')){case'guidepending':el.attr('class','guideopened');break;case'guideendpending':el.attr('class','guideendopened');break;}var ul=el.is('ul')?el:el.children('ul');if(!ul.length)ul=$('
    ').appendTo(el);ul.html(results).show();if(!this.initialized)this.initSetup();else if($.isFunction(this.ontoggle))this.ontoggle.call(this,el);if($.isFunction(this.onload))this.onload.call(this,el);if(path){var link=this.element.find('a[_path='+path.toLowerCase()+']').children('span');if(link.length)this.handleClick.call(this.element[0],{target:link[0]});}},initSetup:function(){if(this.expandall){this.element.find('li.guideclosed').attr('class','guideopened').children('ul').css({display:'block'});this.element.find('li.guideendclosed').attr('class','guideendopened').children('ul').css({display:'block'});}var match=this.href&&this.expand(this.href);if($.isFunction(this.oninit))this.oninit.call(this,match);this.initialized=true;},expand:function(href){if(href){href=href.toLowerCase().replace(/'/g,'');var link=this.element.find("a[_path='"+href+"']");if(link.length){link.parent().parents('li.guideclosed,li.guideendclosed').each(function(i){var li=$(this);var end=li.is('.guideendclosed');li.attr('class',end?'guideendopened':'guideopened').children('ul').css({display:'block'});});this.selectLink(link,{});var list=this.element.parent();if(list[0].scrollHeight>list[0].offsetHeight){var pos=link[0].offsetTop;var zone={h:list[0].offsetHeight/2};zone.t=(zone.h/2)+list[0].scrollTop;if(poszone.t+zone.h)list[0].scrollTop=pos-zone.h;}return true;}}return false;},init:function(el){this.element=$(el);if(this.build){if(!this.element.is('ul'))this.element=$('
      ').appendTo(el);this.loadChildren(this.element,this.pageid||0,this.href||'');}else{this.initSetup();}if($.browser.msie6)this.element.addClass('itree6');else if($.browser.msie&&$.browser.version=='7.0')this.element.addClass('itree7');this.element.bind('click',this.handleClick)[0].itree=this;}});$.fn.setTreeState=function(){return this.each(function(i){var ul=$(this).filter('ul.itree');if(ul.length){ul.children(':not(:last)').filter('[class*=end]').setTreeEnd(false);var last=ul.children(':last').setTreeEnd(true);var li=ul.parent('li');if(li.length)li.setTreeBranch(last.length>0);}});};$.fn.setTreeEnd=function(end){return this.each(function(i){var li=$(this);if(!li.is('li'))return;if(end){li.parent('ul').children('li[class*=end]').setTreeEnd(false);var cls=li.attr('class');if(!cls)li.attr('class','guideend');else if(cls.indexOf('end')<0)li.attr('class',cls.replace('guide','guideend'));}else{var cls=li.attr('class');if(cls=='guideend')li.removeAttr('class');else if(cls)li.attr('class',cls.replace('guideend','guide'));}});};$.fn.setTreeBranch=function(branch){return this.each(function(i){var li=$(this);if(!li.is('li'))return;var cls=li.attr('class');if(branch){var open=li.children('ul:visible').length>0;if(!cls)li.attr('class',open?'guideopened':'guideclosed');else if(cls=='guideend')li.attr('class',open?'guideendopened':'guideendclosed');}else{if(cls.indexOf('end')>0)li.attr('class','guideend');else if(cls)li.removeAttr('class');}});};$.preload('Shared/images/tree/GuideClosed.gif');$.preload('Shared/images/tree/GuideOpened.gif');$.preload('Shared/images/tree/GuideEndClosed.gif');$.preload('Shared/images/tree/GuideEndOpened.gif');$.preload('Shared/images/tree/GuidePending.gif');$.preload('Shared/images/tree/GuideEndPending.gif');})(jQuery); (function($){$.fn.Flyout=function(o){this.each(function(){var el=$(this);if(el.is('a')){var p=el.parent();p.attr('_pageid',el.attr('_pageid')||'').attr('_childpages',el.attr('_childpages')||'').attr('_exclude',el.attr('_exclude')||'').attr('_corner',el.attr('_corner')||'').attr('_maxitems',el.attr('_maxitems')||'').attr('_maxlevels',el.attr('_maxlevels')||'');el.removeAttr('_pageid').removeAttr('_childpages').removeAttr('_exclude').removeAttr('_corner').removeAttr('_maxitems').removeAttr('_maxlevels');el=p;}if(!el[0].flyout)new $.cobalt.flyout(el[0],o);});return this;};$.cobalt=$.cobalt||{};$.cobalt.flyout=function(el,o){if(!el)return;this.options=$.extend({},o||{});this.getChildrenUrl=this.options.getChildrenUrl||this.getChildrenUrl;this.element=el;this.init();};if(!window.$fo){window.$fo=$.cobalt.flyout;}$.extend($.cobalt.flyout,{pageHtml:'',flyouts:[],ajaxip:false,ajaxStack:[],_superScript:new RegExp('\\^(\\S+)','g'),pageFormat:function(pageName){return pageName.replace($fo._superScript,"$1");},_paused:false,pause:function(){$fo._paused=true;$fo.hideItems();},play:function(){$fo._paused=false;},itemOver:function(e){if($fo._paused)return;var item=e.target;while(item&&!item._p){item=item.parentNode;}if(!item)return true;$fo.flyItem(item,e);},flyItem:function(item,e){var p=item._p;if(p.timeout){clearTimeout(p.timeout);p.timeout=0;}if(p._active){if(p._active==item&&!$fo.fadeStarted)return;else if(p._active._children){var pos=$(item).absPosition();var distance=(pos.left+pos.width)-e.clientX;if(distance>=0&&distance<50)p.timeout=setTimeout(function(){$fo.showItem.apply(item,[e]);},250);else $fo.showItem.apply(item,[e]);return;}}$fo.showItem.apply(item,[e]);},itemOut:function(e){if($fo._paused)return;var p=e.relatedTarget;while(p&&!p._p&&!p._f){try{p=p.parentNode;}catch(ex){p=null;}}if(p&&(p._p||p._f))return true;if($fo._timeout){clearTimeout($fo._timeout);$fo._timeout=0;}var levels=$fo.fadeOut();$fo._timeout=setTimeout($fo.hideItems,(300*levels)+800);},fadeOut:function(){var active=$fo._active;var levels=1;var fadeStarted=$fo.fadeStarted;while(active&&active._children){if(active._active&&active._active._children){active=active._active;levels++;}else{$fo.fadeStarted=true;var speed=300+(fadeStarted?0:800);active._children.animate({opacity:0},speed,'linear',function(){$fo.hideItem.apply(active,[{}]);$fo.fadeOut();});break;}}return levels;},stopFadeOut:function(){if($fo._timeout){clearTimeout($fo._timeout);$fo._timeout=0;}if($fo.fadeStarted){var active=$fo._active;while(active&&active._children){active._children.stop().css({opacity:1});active=active._active;}$fo.fadeStarted=false;}},showItem:function(e){$fo.stopFadeOut();this._p.timeout=0;$fo.setScroll(this,e);var active=this._p._active;if(active&&active!=this)$fo.hideItem.apply(active,[{}]);this._p._active=this;this.isactive=true;this._self.addClass('iflyOver');if(this._callajax){if(this._killajax)this._killajax=false;else if(!this._ajaxip)this.flyout.loadChildren.call(this.flyout,this,this.pageid);}else{var div=this._children;if(div&&div.length){var corner=this._corner||$._DIR._UPPER_RIGHT;var dir=this._dir||$._DIR._LOWER_RIGHT;var isreverse={};div.css({opacity:0}).relativePos(this,corner,dir,this._offset||{left:-1,top:-1},null,isreverse).animate({opacity:1},100,'linear');var max=this.flyout.options.maxitems;var size=div[0].childNodes.length;if(max&&size>max){if(!div[0]._scrollHeight){var h=div.children(':first').absPosition().height;div.css({height:max*h}).addClass('iflyOverflow');div[0]._scrollHeight=(size-max)*h;}div[0]._pos=div.absPosition();div[0]._pos.top+=(50+$.toInt($(document.body).css('paddingTop')));div[0]._pos.height-=100;div[0]._scrollTop=0;div[0].childNodes[0].style.marginTop='0px';}if(isreverse.left)this._self.addClass('iflyLeft');else this._self.removeClass('iflyLeft');}}var item=this._p;while(item&&item._p){$fo.flyItem(item,e);item=item._p;}},setScroll:function(item,e){var div=item.parentNode;if(e.clientY&&div._scrollHeight){var top=parseInt((e.clientY-div._pos.top)/div._pos.height*div._scrollHeight);if(top<0)top=0;else if(top>div._scrollHeight+2)top=div._scrollHeight+2;div._scrollTop=top;div.childNodes[0].style.marginTop='-'+top+'px';}},hideItem:function(e){if(this._p){if(this._p.timeout){clearTimeout(this._p.timeout);this._p.timeout=0;}this._p._active=null;}if(this.isactive){this.isactive=false;this._self.removeClass('iflyOver');if(this._children){this._children.children().each($fo.hideItem);this._children.hide();}}if(this._ajaxip)this._killajax=true;},hideItems:function(e){$($fo.flyouts).each($fo.hideItem).find('div.ifly').each($fo.hideItem);},navigatePage:function(e){if(e&&e.target&&e.target.nodeName&&e.target.nodeName.toLowerCase()=='a')return;else{var href=$(this).children('a').attr('href');if(href)window.location.href=href;return false;}}});$.extend($.cobalt.flyout.prototype,{getChildrenUrl:'CobaltAjax.ashx?M=GetPage',loadChildren:function(el,pageid){var fo=this;var url=$.getAjaxUrl(fo.getChildrenUrl,{P:pageid});if(url){el._self.addClass('iflyLoading');el._ajaxip=true;var fn=function(){$fo.ajaxip=true;$.ajax({url:url,dataType:'json',success:function(data){fo.renderChildren(data,el);},error:function(){fo.renderChildren(null,el);}});};if($fo.ajaxip)$fo.ajaxStack.push(fn);else fn();return;}},renderChildren:function(results,el){if($fo.ajaxStack.length)$fo.ajaxStack.shift()();else $fo.ajaxip=false;el._callajax=false;if(!results)return;el._self.removeClass('iflyLoading');if(!el._children||!el._children.length)el._children=$('
      ').appendTo(document.body);var ex=el.flyout&&el.flyout.options&&el.flyout.options.exclude;for(var i=0;i=0)continue;var item=$($fo.pageHtml.replace('{0}',page.PageID).replace('{1}',page.ChildPages.length).replace('{2}',page.URL||page.Path).replace('{3}',$fo.pageFormat(page.PageName))).appendTo(el._children);if(page.URLProperties.indexOf('target,_blank')>=0)item.children('a').attr('target','_blank');}this.setupChildren(el);el._ajaxip=false;if(el._killajax)el._killajax=false;else $fo.showItem.apply(el,[{target:el}]);},setupChildren:function(el){if(!el._self)el._self=$(el);el.flyout=this;el.pageid=$.toInt(el._self.attr('_pageid'));if(el._children)el._children.bind('mouseover',$fo.itemOver).bind('mouseout',$fo.itemOut).each(function(i){this._f=el;});if(el.pageid){var fo=this;var lis=el._children&&el._children.find('>div.ifly').click($fo.navigatePage).each(function(i){this._p=el;this._levels=el._levels-1;fo.setupChildren(this);});if(el._levels!=0){if(lis&&lis.length)el._self.addClass('iflyRight');else{if($.toInt(el._self.attr('_childpages'))>0){el._callajax=true;el._self.addClass('iflyRight');}}}if($.browser.msie6)el._self.addClass('iflyie6');}else if(!el._children||!el._children.length)el._children=el._self.find('>div:first');},init:function(){var el=this.element;$fo.flyouts.push(el);el._p=$fo;el._self=$(el);el._children=el._self.find('div.iflylist:first');el._levels=$.toInt(el._self.attr('_maxlevels'))||this.options.maxlevels||-1;this.setupChildren(el);var corner,dir;try{corner=eval('('+el._self.attr('_corner')+')');}catch(ex){;}try{dir=eval('('+el._self.attr('_dir')+')');}catch(ex){;}el._corner=this.options.corner||corner||$._DIR._LOWER_LEFT;el._dir=this.options.dir||dir||$._DIR._LOWER_RIGHT;if($.browser.msie6)this.options.maxitems=0;else this.options.maxitems=$.toInt(el._self.attr('_maxitems'))||16;if(!this.options.exclude){this.options.exclude=[];var exclude=(el._self.attr('_exclude')||'').split(',');for(var i=0;i');swfobject.embedSWF(movie,control,width,height,version||'9.0.0',"Shared/js/expressInstall.swf",flashvars,params,attributes);}}});};$.fn.cobaltSiteSearch=function(){return this.each(function(i){var el=$(this);var path=el.attr('_path');var limit=el.attr('_limit');var exclude=el.attr('_exclude');var input=el.is('input:text')?el:el.find('input:text:first');var fn=function(input,path,limit,exclude){return function(e){var content=$.encode(input.val());var url=path+'?C='+content;if(limit)url+='&L='+limit;if(exclude)url+='&X='+exclude;input=null;path=null;limit=null;exclude=null;var root=$(document.body).attr('_root')||'/';window.location.href=root+url;return false;};}(input,path,limit,exclude);input.toggleValue();el.find('img,input:button,input:submit,input:image').click(fn);if(el.attr('_autosuggest')=='true'){var success=function(input){return function(row){input.val(row[this.options.textField]);input.data('fire')();input=null;return false;};}(input);input.data('fire',fn).combobox({getResultsUrl:$.getAjaxUrl(window.location.href,{AutoSuggest:el.attr('id')}),textField:el.attr('_textfield'),onselect:success});}else input.onenter(fn);});}; (function($){$.cobalt=$.cobalt||{};$.cobalt.dialog=function(){};if(!window.$dl){window.$dl=$.cobalt.dialog;}$.extend($.cobalt.dialog,{html:'

      Close

      ',dialogStack:[],top:null,sortStack:function(){if($dl.dialogStack.length)$dl.dialogStack.sort($dl.sortDelegate);},sortDelegate:function(a,b){var z1=a.getZIndex();var z2=b.getZIndex();if(z1>z2)return 1;else if(z1]*?src\s*=\s*['"])([^'">]+)(['"][^>]*>)/gi,r_path:/Shared\/images\/(\w+)\/(\w+).gif/i,r_class:/\bclass\s*=\s*(?:(['"])([\s\S]*?)\1|([^\s"'>]+))/gi,getClass:function(path){var m=$.cobalt.sprites.r_path.exec(path);if(m){var folder=m[1].toLowerCase();var file=m[2].toLowerCase()+'gif';var category=$.cobalt.sprites[folder];var cls=category&&category[file];return cls;}return null;},fixHtml:function(html){return html.replace($.cobalt.sprites.r_img,$.cobalt.sprites.replaceImg);},replaceImg:function(m,m1,m2,m3){var cls=$.cobalt.sprites.getClass(m2);if(cls){if(m.indexOf('class')>0){var img=m1+'Shared/images/spacer.gif'+m3;return img.replace($.cobalt.sprites.r_class,'class="$2$3 isprite'+($.browser.msie6?'6':'')+' '+cls+'"');}else return m1+'Shared/images/spacer.gif" class="isprite'+($.browser.msie6?'6':'')+' '+cls+m3;}else return m;},lookup:{},admin:{addgif:'sp0_0',addgroupgif:'sp1_0',addusergif:'sp2_0',advancedgif:'sp3_0',advancedsettingsgif:'sp4_0',appwindowgif:'sp5_0',attachfilegif:'sp6_0',calculatorgif:'sp7_0',calendar_schedulegif:'sp8_0',cancelgif:'sp9_0',cancelvideogif:'sp10_0',choosecolorgif:'sp11_0',closeagif:'sp12_0',codegif:'sp13_0',colormangif:'sp14_0',conflictgif:'sp15_0',contentgif:'sp0_1',copygif:'sp1_1',copyfoldergif:'sp2_1',cssgif:'sp3_1',deletegif:'sp4_1',delete2gif:'sp5_1',delete3gif:'sp6_1',deletefoldergif:'sp7_1',deletegroupgif:'sp8_1',deletetablegif:'sp9_1',deleteusergif:'sp10_1',documentgif:'sp11_1',doubleleftarrowgif:'sp12_1',doublerightarrowgif:'sp13_1',downloaddocumentgif:'sp14_1',edit_redogif:'sp15_1',edit_undogif:'sp0_2',editgif:'sp1_2',editcodegif:'sp2_2',editgroupsgif:'sp3_2',editlinkgif:'sp4_2',editpagegif:'sp5_2',editusergif:'sp6_2',editusersgif:'sp7_2',emailsgif:'sp8_2',envelopegif:'sp9_2',exitgif:'sp10_2',file_delgif:'sp11_2',file_uploadgif:'sp12_2',flashmanagergif:'sp13_2',fldr_delgif:'sp14_2',fldr_newgif:'sp15_2',fldrgif:'sp0_3',fldragif:'sp1_3',fldrhgif:'sp2_3',gotoparentfoldergif:'sp3_3',groupsgif:'sp4_3',groups2gif:'sp5_3',helpgif:'sp6_3',hiddengif:'sp7_3',historygif:'sp8_3',htmlgif:'sp9_3',html2gif:'sp10_3',hyperlinkgif:'sp11_3',imagesgif:'sp12_3',inserthyperlinkgif:'sp13_3',insertpicturegif:'sp14_3',javascriptgif:'sp15_3',layoutgif:'sp0_4',listgif:'sp1_4',livegif:'sp2_4',lockedgif:'sp3_4',mailsettingsgif:'sp4_4',managergif:'sp5_4',menugif:'sp6_4',newdocumentgif:'sp7_4',newfoldergif:'sp8_4',newmessagegif:'sp9_4',notegif:'sp10_4',novisiblegif:'sp11_4',opengif:'sp12_4',openfoldergif:'sp13_4',pagesgif:'sp14_4',pausegif:'sp15_4',pengif:'sp0_5',playgif:'sp1_5',previewgif:'sp2_5',removegif:'sp3_5',removepagegif:'sp4_5',savegif:'sp5_5',save2gif:'sp6_5',save3gif:'sp7_5',schedulergif:'sp8_5',searchgif:'sp9_5',sendgif:'sp10_5',sendbackwardgif:'sp11_5',sharemanagergif:'sp12_5',showallcommentsgif:'sp13_5',swfgif:'sp14_5',switchgif:'sp15_5',systemgif:'sp0_6',system2gif:'sp1_6',tablegif:'sp2_6',textboxgif:'sp3_6',textbox2gif:'sp4_6',thumbgif:'sp5_6',trashgif:'sp6_6',usergif:'sp7_6',user2gif:'sp8_6',usersgif:'sp9_6',viewlistgif:'sp10_6',warninggif:'sp11_6',webgif:'sp12_6',zoomgif:'sp13_6',podcastgif:'sp6_15',printgif:'sp14_15',stopgif:'sp2_16'},modules:{accountgif:'sp14_6',activategif:'sp15_6',adminlogingif:'sp0_7',appointmentgif:'sp1_7',billinggif:'sp2_7',billpaygif:'sp3_7',boardgif:'sp4_7',boardportalgif:'sp5_7',callgif:'sp6_7',coinsgif:'sp7_7',confemailgif:'sp8_7',contactgif:'sp9_7',creditcardgif:'sp10_7',directoriesgif:'sp11_7',disneygif:'sp12_7',donategif:'sp13_7',employmentgif:'sp14_7',eventsgif:'sp15_7',events2gif:'sp0_8',events3gif:'sp1_8',events4gif:'sp2_8',expertgif:'sp3_8',faqgif:'sp4_8',fashiongif:'sp5_8',flyoutgif:'sp6_8',formgif:'sp7_8',giftshopgif:'sp8_8',golfgif:'sp9_8',imagegif:'sp10_8',leadsgif:'sp11_8',managegif:'sp12_8',membershipsgif:'sp13_8',newslettergif:'sp14_8',newslettersgif:'sp15_8',nurserygif:'sp0_9',ordergif:'sp1_9',order2gif:'sp2_9',physiciangif:'sp3_9',practiceareasgif:'sp4_9',prereggif:'sp5_9',pressgif:'sp6_9',productsgif:'sp7_9',profilesgif:'sp8_9',scholargif:'sp9_9',servicesgif:'sp10_9',sitemapgif:'sp11_9',sitesearchgif:'sp12_9',spotlightgif:'sp13_9',statsgif:'sp14_9',transactionsgif:'sp15_9',trialsgif:'sp0_10',videogif:'sp1_10',wizardgif:'sp2_10',databasegif:'sp4_13',fieldgif:'sp5_13',bannergif:'sp7_15',ipodgif:'sp11_15',filmgif:'sp12_15',atomgif:'sp13_15',blogsgif:'sp15_15',call2gif:'sp0_16',showcasegif:'sp1_16'},page:{cancelbranchgif:'sp3_10',deletepagegif:'sp4_10',editlinkgif:'sp5_10',hidepagegif:'sp6_10',makebranchgif:'sp7_10',navigategif:'sp8_10',newchildgif:'sp9_10',newlinkgif:'sp10_10',newmodulegif:'sp11_10',newpagegif:'sp12_10',pagenotsslgif:'sp13_10',pagesecuritygif:'sp14_10',pagesslgif:'sp15_10',renamepagegif:'sp0_11',seogif:'sp1_11',showpagegif:'sp2_11'},tbox:{delrowgif:'sp3_11',exportgif:'sp4_11',importgif:'sp5_11',joincellgif:'sp6_11',moverowgif:'sp7_11',redogif:'sp8_11',resettblgif:'sp9_11',resizetblgif:'sp10_11',selectgif:'sp11_11',splitcellgif:'sp12_11',undogif:'sp13_11',gridgif:'sp14_11',aleftgif:'sp1_13',arightgif:'sp2_13',acentergif:'sp3_13',datalistgif:'sp7_13',dataitemgif:'sp8_13',searchgridgif:'sp9_13',dataformgif:'sp10_13',filtergif:'sp11_13',movecolgif:'sp12_13',delcolgif:'sp13_13',checkboxgif:'sp14_13',textboxgif:'sp15_13',buttongif:'sp0_14',passwordboxgif:'sp1_14',calendargif:'sp2_14',comboboxgif:'sp3_14',phonegif:'sp4_14',templatesgif:'sp5_14',headergif:'sp6_14',itemgif:'sp7_14',altitemgif:'sp8_14',footergif:'sp9_14',titlegif:'sp10_14',reqgif:'sp11_14',reqrangegif:'sp12_14',reqregexgif:'sp13_14',reqcomparegif:'sp14_14',reqcustomgif:'sp15_14',designgif:'sp0_15',codegif:'sp1_15',toolgif:'sp2_15',resizepicgif:'sp3_15',frame_imagegif:'sp4_15',menugif:'sp9_15',bargif:'sp10_15',mapgif:'sp3_16'},tree:{admingif:'sp15_11',branchgif:'sp0_12',filegif:'sp1_12',foldergif:'sp2_12',hpagegif:'sp3_12',linkgif:'sp4_12',modulegif:'sp5_12',pagegif:'sp6_12',poundgif:'sp7_12',rssgif:'sp6_13',audiogif:'sp5_15'},flags:{chinesegif:'sp8_12',englishgif:'sp9_12',frenchgif:'sp10_12',germangif:'sp11_12',hebrewgif:'sp12_12',italiangif:'sp13_12',japanesegif:'sp14_12',koreangif:'sp15_12',spanishgif:'sp0_13'}};$.each(['admin','modules','page','tbox','tree','flags'],function(i){for(var p in $.cobalt.sprites[this]){var cls=$.cobalt.sprites[this][p];$.cobalt.sprites.lookup[cls]='shared/images/'+this+'/'+p.substr(0,p.length-3)+'.gif';}});$.preload('Shared/images/titlebg2.gif');$.preload('Shared/images/Sprites.png');$.preload('Shared/images/tbox/cmsedit.png');})(jQuery); (function($){$.cobalt=$.cobalt||{};$.cobalt.popup={};$.extend($.cobalt.popup,{title:'',contentHtml:'',contentHtml2:'',width:640,height:480,list:[],start:function(el,o){o=o||{};var popup;if(!el||!(popup=el.$popup)){popup=new $.cobalt.dialog();$.cobalt.popup.list.push(popup);popup.element=el?(el.jquery?el:$(el)):null;$.extend(popup,$.cobalt.popup);if(o.noscrolling)popup.contentHtml=popup.contentHtml2;if(o.onclose){popup.oncloseevent=o.onclose;o.onclose=null;try{delete o['onclose'];}catch(ex){;}}o.title=o.title||popup.element.attr('_title')||'';o.width=o.width||$.toInt(popup.element.attr('_width'))||popup.width;o.height=o.height||$.toInt(popup.element.attr('_height'))||popup.height;$.extend(popup,o);if(o.submit)popup.onselect=popup.submitForm;if(popup.element&&popup.element.length)popup.element[0].$popup=popup;}o.url=o.url||popup.element.filter('a').attr('href')||'';popup.open(o);popup.active=true;},startDialog:function(o){this.frame.attr('src',o.url||'Shared/blank.html');},submitForm:function(){if(this.options.submitLoading)this.main.loading();var doc=this.frame.contents();try{var wn=doc[0].parentWindow;if(wn&&wn.$){var form=wn.$(doc[0]).find('form');if(form.length)form[0].submit();return false;}}catch(ex){;}var form=doc.find('form');if(form.length)form[0].submit();return false;},onclose:function(popup){if($.isFunction(popup.oncloseevent))popup.oncloseevent(popup);popup.frame.attr('src','Shared/blank.html');popup.active=false;},initContents:function(o){if(!this.main)return;o=this.options||{};if(!o.submit){this.savebtn.hide();this.cancelbtn.hide();}this.frame=this.main.find('iframe');this.frame.css({width:o.width||this.width,height:o.height||this.height});}});$.fn.popup=function(o){var fn=function(e){$.cobalt.popup.start(this,o);return false;};return this.click(fn);};})(jQuery);(function($){$.cobalt=$.cobalt||{};$.cobalt.lightbox=function(el){if(!el)return;this.element=$(el);this.init();};$.extend($.cobalt.lightbox.prototype,{active:false,image:1,width:0,height:0,items:[],root:'/',r_img:/\.(?:gif|bmp|png|jpg|jpe|jpeg|tif|tiff)$/i,showLightbox:function(e){var link=$(this);var l=link.data('lightbox');var item=link.data('item');l.active=true;var wn=$(window).absPosition();var left=parseInt((wn.width-l.owidth)/2);var top=parseInt((wn.height-l.oheight)/2);var css={position:'fixed',left:left,top:top};if($.browser.msie6){css.position='absolute';css.top+=wn.top;css.left+=wn.left;}l.display.css(css);l.index=item.index;l.image=1;var href=l.items[l.index].href;l.ithis1.css({backgroundImage:'url('+l.getUrl(href)+')',opacity:0,display:'block'});l.ithis2.css({opacity:0});l.caption.children('div').html(l.items[l.index].title||'');var fn=function(l){return function(){l.display.css({display:'block'});l.ithis1.stop().animate({opacity:1},400,'linear');l=null;};}(l);$.pageOverlay().stop();$.overlayIn(400,.6,fn);return false;},showButton:function(e){$(this).children().stop().animate({opacity:1},400,'swing');},hideButton:function(e){$(this).children().stop().animate({opacity:0},400,'swing');},nextImage:function(e){var l=this.nextImage?this:$(this).data('lightbox');var img1=l['ithis'+l.image];l.image=l.image==1?2:1;var img2=l['ithis'+l.image];l.index++;if(l.index>=l.items.length)l.index=0;var href=l.items[l.index].href;img2.css({backgroundImage:'url('+l.getUrl(href)+')',opacity:0,display:'block'});img1.stop().animate({opacity:0},300,'linear');img2.stop().animate({opacity:1},300,'linear');l.caption.children('div').html(l.items[l.index].title||'');},prevImage:function(e){var l=this.nextImage?this:$(this).data('lightbox');var img1=l['ithis'+l.image];l.image=l.image==1?2:1;var img2=l['ithis'+l.image];l.index--;if(l.index<0)l.index=l.items.length-1;var href=l.items[l.index].href;img2.css({backgroundImage:'url('+l.getUrl(href)+')',opacity:0,display:'block'});img1.stop().animate({opacity:0},300,'linear');img2.stop().animate({opacity:1},300,'linear');l.caption.children('div').html(l.items[l.index].title||'');},getUrl:function(href){return'images/thumbnail.aspx?I='+$.encode(this.root+href)+'&W='+this.width+'&H='+this.height;},closeLightbox:function(){var l=this.closeLightbox?this:$(this).data('lightbox');if(!l.active)return;else l.active=false;var fn=function(l){return function(){l['ithis'+l.image].css({display:'none'});l.display.css({display:'none'});l=null;$.pageOverlay().stop();$.overlayOut();};}(l);$.pageOverlay().stop();l.ithis1.stop().animate({opacity:0},400,'linear',fn);},init:function(){var l=this;l.root=$(document.body).attr('_root')||'/';l.width=$.toInt(l.element.attr('_lightwidth'))||600;l.height=$.toInt(l.element.attr('_lightheight'))||600;l.items=[];l.element.find('a').each(function(i){var link=$(this);var href=link.attr('href');if(l.r_img.test(href)){var item={index:l.items.length,href:href,title:link.attr('title')};link.data('lightbox',l).data('item',item).click(l.showLightbox);l.items.push(item);$.preload(l.getUrl(href));}});if(!l.items.length)return;l.display=$('
      X
      NEXT >
      < PREV
      ').css({display:'none',position:'absolute',zIndex:100}).appendTo(document.body);var css={position:'absolute',opacity:0,width:l.width,height:l.height,left:0,top:0,backgroundRepeat:'no-repeat',backgroundPosition:'center center'};l.ithis1=l.display.children('.ithis1').css(css);l.ithis2=l.display.children('.ithis2').css(css);l.caption=l.display.children('.ilight_caption').css({width:l.width});l.owidth=l.width+$.toInt(l.ithis1.css('borderLeftWidth'))+$.toInt(l.ithis1.css('borderRightWidth'))+$.toInt(l.ithis1.css('marginLeft'))+$.toInt(l.ithis1.css('marginRight'));l.oheight=l.height+$.toInt(l.ithis1.css('borderTopWidth'))+$.toInt(l.ithis1.css('borderBottomWidth'))+$.toInt(l.ithis1.css('marginTop'))+$.toInt(l.ithis1.css('marginBottom'))+$.toInt(l.caption.css('height'))+$.toInt(l.caption.css('borderTopWidth'))+$.toInt(l.caption.css('borderBottomWidth'))+$.toInt(l.caption.css('marginTop'))+$.toInt(l.caption.css('marginBottom'));l.display.css({width:l.owidth,height:l.oheight});l.gonext=l.display.children('.ilight_gonext').data('lightbox',l).hover(l.showButton,l.hideButton).click(l.nextImage);l.goprev=l.display.children('.ilight_goprev').data('lightbox',l).hover(l.showButton,l.hideButton).click(l.prevImage);l.gonext.children().css({opacity:0});l.goprev.children().css({opacity:0});var fn=function(l){return function(e){l.closeLightbox();};}(l);$.pageOverlay().click(fn);l.display.children('.ilight_close').click(fn);}});$.fn.lightbox=function(){return this.each(function(i){if(!this._lightbox)this._lightbox=new $.cobalt.lightbox(this);});};})(jQuery); (function($){$.cobalt=$.cobalt||{};$.cobalt.color={};if(!window.$cp){window.$cp=$.cobalt.color;}$.extend($.cobalt.color,{html:'',main:null,color:null,colorInd:null,hue:null,hueInd:null,alpha:null,alphaInd:null,alphaValue:null,curColor:null,oldColor:null,rBox:null,gBox:null,bBox:null,aBox:null,hBox:null,baseColor:{r:255,g:0,b:0},currentColor:{r:255,g:255,b:255,a:255},lastPosition:[0,0],element:null,useAlpha:false,isover:false,onsave:null,colorX:0,colorY:0,hueY:0,alphaY:0,activate:function(el,o){o=$.extend({},o||{});$cp.options=o;$cp.init();el=$cp.element=el?(el.jquery?el:$(el)):null;$cp.onsave=o.onsave;$cp.oncancel=o.oncancel;$cp.onclose=o.onclose;$cp.useAlpha=(o.alpha==true);if($cp.useAlpha){$cp.alpha.show();$cp.alphaValue.show();}else{$cp.alpha.hide();$cp.alphaValue.hide();}var color=o.color||el&&el.val();$cp.currentColor=$cp.cleanColor(color);$cp.main.relativePos(el,o.pos||{left:true,top:false});$cp.colorX=$cp.color[0].offsetWidth-$cp.colorInd[0].offsetWidth;$cp.colorY=$cp.color[0].offsetHeight-$cp.colorInd[0].offsetHeight;$cp.hueY=$cp.hue[0].offsetHeight-$cp.hueInd[0].offsetHeight;$cp.alphaY=$cp.alpha[0].offsetHeight-$cp.alphaInd[0].offsetHeight;$cp.calculateColor();var c=$cp.currentColor;$cp.oldColor[0].style.backgroundColor='rgb('+c.r+','+c.g+','+c.b+')';$cp.oldColor.css({opacity:c.a/255});$(document).escape($cp.cancel);$(document).bind('mousedown',$cp.checkHide);$cp.isopen=true;},cleanColor:function(color){if(!color)return $cp.namedColors.black;else{color=color.replace('#','');if(/[0-9A-F]{6,8}/i.test(color)){var r=color.substring(0,2);var g=color.substring(2,4);var b=color.substring(4,6);var a=color.length<8?'ff':color.substring(6,8);return{r:parseInt(r,16),g:parseInt(g,16),b:parseInt(b,16),a:parseInt(a,16)};}else return $cp.namedColors[color.toLowerCase()]||$cp.namedColors.black;}},toHex:function(c,alpha){if(!c)return alpha?"000000FF":"000000";try{var hex=(c.r<16?'0':'')+c.r.toString(16)+(c.g<16?'0':'')+c.g.toString(16)+(c.b<16?'0':'')+c.b.toString(16)+(alpha?(c.a<16?'0':'')+c.a.toString(16):'');return hex.toUpperCase();}catch(ex){return alpha?"000000FF":"000000";}},namedColors:{aqua:{r:0,g:255,b:255,a:255},azure:{r:240,g:255,b:255,a:255},beige:{r:245,g:245,b:220,a:255},black:{r:0,g:0,b:0,a:255},blue:{r:0,g:0,b:255,a:255},brown:{r:165,g:42,b:42,a:255},cyan:{r:0,g:255,b:255,a:255},darkblue:{r:0,g:0,b:139,a:255},darkcyan:{r:0,g:139,b:139,a:255},darkgrey:{r:169,g:169,b:169,a:255},darkgreen:{r:0,g:100,b:0,a:255},darkkhaki:{r:189,g:183,b:107,a:255},darkmagenta:{r:139,g:0,b:139,a:255},darkolivegreen:{r:85,g:107,b:47,a:255},darkorange:{r:255,g:140,b:0,a:255},darkorchid:{r:153,g:50,b:204,a:255},darkred:{r:139,g:0,b:0,a:255},darksalmon:{r:233,g:150,b:122,a:255},darkviolet:{r:148,g:0,b:211,a:255},fuchsia:{r:255,g:0,b:255,a:255},gold:{r:255,g:215,b:0,a:255},green:{r:0,g:128,b:0,a:255},indigo:{r:75,g:0,b:130,a:255},khaki:{r:240,g:230,b:140,a:255},lightblue:{r:173,g:216,b:230,a:255},lightcyan:{r:224,g:255,b:255,a:255},lightgreen:{r:144,g:238,b:144,a:255},lightgrey:{r:211,g:211,b:211,a:255},lightpink:{r:255,g:182,b:193,a:255},lightyellow:{r:255,g:255,b:224,a:255},lime:{r:0,g:255,b:0,a:255},magenta:{r:255,g:0,b:255,a:255},maroon:{r:128,g:0,b:0,a:255},navy:{r:0,g:0,b:128,a:255},olive:{r:128,g:128,b:0,a:255},orange:{r:255,g:165,b:0,a:255},pink:{r:255,g:192,b:203,a:255},purple:{r:128,g:0,b:128,a:255},red:{r:255,g:0,b:0,a:255},silver:{r:192,g:192,b:192,a:255},white:{r:255,g:255,b:255,a:255},yellow:{r:255,g:255,b:0,a:255}},calculateColor:function(){var c=$cp.currentColor;var hsv=$cp.RGBtoHSV(c);var b=$cp.HSVtoRGB({h:hsv.h,s:1,v:1});var hue=hsv.h==0?0:(360-hsv.h)/360;$cp.hueInd.css({top:parseInt(hue*$cp.hueY)});$cp.baseColor=b;$cp.color[0].style.backgroundColor='rgb('+b.r+','+b.g+','+b.b+')';var left=hsv.s;var top=(1-hsv.v);$cp.lastPosition=[parseInt(left*255),parseInt(top*255)];$cp.colorInd.css({left:parseInt(left*$cp.colorX),top:parseInt(top*$cp.colorY)});var alpha=c.a/255;$cp.alphaInd.css({top:$cp.alphaY-parseInt(alpha*$cp.alphaY)});$cp.curColor.css({opacity:alpha});$cp.updateColorValues();},onColorSlide:function(e,ui){var x=parseInt(ui.position.left/$cp.colorX*255);var y=parseInt(ui.position.top/$cp.colorY*255);$cp.lastPosition=[x,y];$cp.setGradientColor(x,y);},onHueSlide:function(e,ui){var hue=parseInt(ui.position.top/$cp.hueY*255);$cp.setVertColor(hue);},onAlphaSlide:function(e,ui){var alpha=($cp.alphaY-ui.position.top)/$cp.alphaY;$cp.setAlphaChannel(alpha);},positionColorInd:function(e){if(e.target!=$cp.color[0])return false;var o=$cp.color.offset();var css={left:e.clientX-o.left-7,top:e.clientY-o.top-7};if(css.left<0)css.left=0;if(css.left>$cp.colorX)css.left=$cp.colorX;if(css.top<0)css.top=0;if(css.top>$cp.colorY)css.top=$cp.colorY;$cp.colorInd.css(css);var x=parseInt(css.left/$cp.colorX*255);var y=parseInt(css.top/$cp.colorY*255);$cp.lastPosition=[x,y];$cp.setGradientColor(x,y);$cp.colorInd.trigger(e);},positionHueInd:function(e){if(e.target!=$cp.hue[0])return false;var o=$cp.hue.offset();var css={top:e.clientY-o.top-3};if(css.top<0)css.top=0;if(css.top>$cp.hueY)css.top=$cp.hueY;var hue=parseInt(css.top/$cp.hueY*255);$cp.setVertColor(hue);$cp.hueInd.css(css);$cp.hueInd.trigger(e);},positionAlphaInd:function(e){if(e.target!=$cp.alphaInd[0])return false;var o=$cp.alpha.offset();var css={top:e.clientY-o.top-3};if(css.top<0)css.top=0;if(css.top>$cp.alphaY)css.top=$cp.alphaY;var alpha=($cp.alphaY-css.top)/$cp.alphaY;$cp.setAlphaChannel(alpha);$cp.alphaInd.css(css);$cp.alphaInd.trigger(e);},setGradientColor:function(x,y){var base=$cp.baseColor;var r=Math.round((1-(1-(base.r/255))*(x/255))*(255-y));var g=Math.round((1-(1-(base.g/255))*(x/255))*(255-y));var b=Math.round((1-(1-(base.b/255))*(x/255))*(255-y));var a=$cp.currentColor.a;$cp.currentColor={r:r,g:g,b:b,a:a};$cp.updateColorValues();},setVertColor:function(hue){var n=256/6, j=256/n,C=hue,c=C%n;var b=$cp.baseColor={r:parseInt(C').insertAfter(el).bind('click',fn);});};})(jQuery); (function($){$.cobalt=$.cobalt||{};$.cobalt.combobox=function(el,o){this.init(el,o);};$.fn.combobox=function(o){return this.each(function(){this._combo=new $.cobalt.combobox(this,o);});};$.extend($.cobalt.combobox.prototype,{flyout:null,active:false,size:0,pos:-1,selected:null,isover:false,ajaxcall:false,ajaxresults:null,getResultsUrl:null,onsearch:null,onnav:null,onselect:null,onclose:null,flyoutOver:function(e){this._combo.isover=true;},flyoutOut:function(e){this._combo.isover=false;},onKeyup:function(e){var key=e.which;if(key!=8&&key!=32&&key<=48){return;}if(this._timeout){clearTimeout(this._timeout);this._timeout=null;}var fn=function(combo){return function(){combo.search(combo.input.val());combo=null;};}(this._combo);this._timeout=setTimeout(fn,50);},validSearch:function(){var text,current;if(!this.ajaxresults)return false;else if(!(text=this.ajaxresults.text))return false;else if(!(current=this.input.val()))return true;else if(current.toLowerCase().indexOf(text.toLowerCase())<0)return false;else return true;},search:function(text){if(this.ajaxcall)return;if(!text||text.length=0){combo.ajaxresults={text:text,results:results};combo.displayResults(newtext);combo=null;}else combo.search(newtext);combo=null;};}(this);$.ajax({url:url,dataType:'json',success:fn});}},activate:function(){if(this.active)return;this.flyout.relativePos(this.input,this.options.position||$._DIR._LOWER_LEFT,this.options.direction||$._DIR._LOWER_RIGHT);this.active=true;$(document).bind('keydown',{combo:this},this.flyoutNav).bind('mousedown',{combo:this},this.checkClose);this.input.bind('mouseover',this.flyoutOver).bind('mouseout.combo',this.flyoutOut);},displayResults:function(text){this.flyout.empty();this.size=0;this.pos=-1;this.selected=null;var results=this.ajaxresults.results;for(var i=0;i=0){var div=$('
      '+name+'
      ');div.appendTo(this.flyout);div.hover(this.itemOver,this.itemOut).click(this.select);div[0]._combo=this;div[0].$value=results[i];div[0].$pos=this.size++;}}},itemOver:function(e){var combo=this._combo;var css=combo.options.cssActive;if(combo.pos>=0){combo.flyout.find('div.'+css).removeClass(css);combo.selected=null;}if(!this.$self){this.$self=$(this);}this.$self.addClass(css);combo.selected=this.$value;combo.pos=this.$pos;},itemOut:function(e){var combo=this._combo;var css=combo.options.cssActive;if(!this.$self){this.$self=$(this);}this.$self.removeClass(css);},checkClose:function(e){if(!e.data.combo.isover){e.data.combo.close.call(e.data.combo);}},close:function(){if(!this.active)return;if($.isFunction(this.onclose)){this.onclose(this);}this.flyout.empty().hide();this.active=false;$(document).unbind('keydown',this.flyoutNav).unbind('mousedown',this.checkClose);this.input.unbind('mouseover',this.flyoutOver).unbind('mouseout',this.flyoutOut);},flyoutNav:function(e){var combo=e.data.combo;switch(e.which){case 27:combo.close();break;case 38:combo.move(-1);break;case 40:combo.move(1);break;case 33:combo.move(-10);break;case 34:combo.move(10);break;case 13:combo.select();return false;}return true;},move:function(amount){if(amount<=0&&this.pos<=0)return;else if(amount>0&&this.pos+1>=this.size)return;else this.pos+=amount;if(this.pos<0)this.pos=0;if(this.pos+1>this.size)this.pos=this.size-1;var css=this.options.cssActive;if(this.selected){this.flyout.find('div.'+css).removeClass(css);this.selected=null;}var div=this.flyout.find('div:eq('+this.pos+')');div.addClass(css);this.selected=div[0].$value;if(amount<0){var pos=div[0].offsetTop;if(posdiv[0].offsetParent.scrollTop){div[0].offsetParent.scrollTop=pos}}},select:function(e){var combo=(e&&e.data&&e.data.combo)||this._combo||this;var result;if(combo.selected){combo.input.val(combo.selected[combo.options.textField]);if($.isFunction(combo.onselect))result=combo.onselect(combo.selected);}combo.close();return result;},init:function(el,o){o=jQuery.extend({cssClass:'comboBox',cssActive:'comboActive',width:300,height:180,position:$._DIR._LOWER_LEFT,direction:$._DIR._LOWER_RIGHT,minChars:3,textField:'',showOnFocus:true},o||{});this.options=o;this.getResultsUrl=o.getResultsUrl;this.onsearch=o.onsearch;this.onnav=o.onnav;this.onselect=o.onselect;this.onclose=o.onclose;this.input=$(el).bind('keyup',this.onKeyup);if(this.options.showOnFocus)this.input.bind('focus',function(e){if(!this._combo.active)this._combo.search(this.value);});this.flyout=$('
      ').css({position:'absolute',display:'none',width:o.width,height:o.height}).appendTo(document.body).hover(this.flyoutOver,this.flyoutOut);this.flyout[0]._combo=this;}});})(jQuery);