(function(window,undefined){ var document=window.document, navigator=window.navigator, location=window.location; var jQuery=(function(){ var jQuery=function(selector,context){ return new jQuery.fn.init(selector,context,rootjQuery);}, _jQuery=window.jQuery, _$=window.$, rootjQuery, quickExpr=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, rnotwhite=/\S/, trimLeft=/^\s+/, trimRight=/\s+$/, rdigit=/\d/, rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, rvalidchars=/^[\],:{}\s]*$/, rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g, rwebkit=/(webkit)[ \/]([\w.]+)/, ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/, rmsie=/(msie) ([\w.]+)/, rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/, rdashAlpha=/-([a-z])/ig, fcamelCase=function(all,letter){ return letter.toUpperCase();}, userAgent=navigator.userAgent, browserMatch, readyList, DOMContentLoaded, toString=Object.prototype.toString, hasOwn=Object.prototype.hasOwnProperty, push=Array.prototype.push, slice=Array.prototype.slice, trim=String.prototype.trim, indexOf=Array.prototype.indexOf, class2type={}; jQuery.fn=jQuery.prototype={ constructor:jQuery, init:function(selector,context,rootjQuery){ var match,elem,ret,doc; if(!selector){ return this;} if(selector.nodeType){ this.context=this[0]=selector; this.length=1; return this;} if(selector==="body"&&!context&&document.body){ this.context=document; this[0]=document.body; this.selector=selector; this.length=1; return this;} if(typeof selector==="string"){ if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){ match=[null,selector,null];}else{ match=quickExpr.exec(selector);} if(match&&(match[1]||!context)){ if(match[1]){ context=context instanceof jQuery?context[0]:context; doc=(context?context.ownerDocument||context:document); ret=rsingleTag.exec(selector); if(ret){ if(jQuery.isPlainObject(context)){ selector=[document.createElement(ret[1])]; jQuery.fn.attr.call(selector,context,true);}else{ selector=[doc.createElement(ret[1])];}}else{ ret=jQuery.buildFragment([match[1]],[doc]); selector=(ret.cacheable?jQuery.clone(ret.fragment):ret.fragment).childNodes;} return jQuery.merge(this,selector);}else{ elem=document.getElementById(match[2]); if(elem&&elem.parentNode){ if(elem.id!==match[2]){ return rootjQuery.find(selector);} this.length=1; this[0]=elem;} this.context=document; this.selector=selector; return this;}}else if(!context||context.jquery){ return(context||rootjQuery).find(selector);}else{ return this.constructor(context).find(selector);}}else if(jQuery.isFunction(selector)){ return rootjQuery.ready(selector);} if(selector.selector!==undefined){ this.selector=selector.selector; this.context=selector.context;} return jQuery.makeArray(selector,this);}, selector:"", jquery:"1.6.2", length:0, size:function(){ return this.length;}, toArray:function(){ return slice.call(this,0);}, get:function(num){ return num==null? this.toArray(): (num<0?this[this.length+num]:this[num]);}, pushStack:function(elems,name,selector){ var ret=this.constructor(); if(jQuery.isArray(elems)){ push.apply(ret,elems);}else{ jQuery.merge(ret,elems);} 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;}, each:function(callback,args){ return jQuery.each(this,callback,args);}, ready:function(fn){ jQuery.bindReady(); readyList.done(fn); return this;}, eq:function(i){ return i===-1? this.slice(i): this.slice(i,+i+1);}, first:function(){ return this.eq(0);}, last:function(){ return this.eq(-1);}, slice:function(){ return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));}, map:function(callback){ return this.pushStack(jQuery.map(this,function(elem,i){ return callback.call(elem,i,elem);}));}, end:function(){ return this.prevObject||this.constructor(null);}, push:push, sort:[].sort, splice:[].splice}; jQuery.fn.init.prototype=jQuery.fn; jQuery.extend=jQuery.fn.extend=function(){ var options,name,src,copy,copyIsArray,clone, target=arguments[0]||{}, i=1, length=arguments.length, deep=false; 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(;i0){ return;} readyList.resolveWith(document,[jQuery]); if(jQuery.fn.trigger){ jQuery(document).trigger("ready").unbind("ready");}}}, bindReady:function(){ if(readyList){ return;} readyList=jQuery._Deferred(); if(document.readyState==="complete"){ return setTimeout(jQuery.ready,1);} if(document.addEventListener){ document.addEventListener("DOMContentLoaded",DOMContentLoaded,false); window.addEventListener("load",jQuery.ready,false);}else if(document.attachEvent){ document.attachEvent("onreadystatechange",DOMContentLoaded); window.attachEvent("onload",jQuery.ready); var toplevel=false; try{ toplevel=window.frameElement==null;}catch(e){} if(document.documentElement.doScroll&&toplevel){ doScrollCheck();}}}, isFunction:function(obj){ return jQuery.type(obj)==="function";}, isArray:Array.isArray||function(obj){ return jQuery.type(obj)==="array";}, isWindow:function(obj){ return obj&&typeof obj==="object"&&"setInterval"in obj;}, isNaN:function(obj){ return obj==null||!rdigit.test(obj)||isNaN(obj);}, type:function(obj){ return obj==null? String(obj): class2type[toString.call(obj)]||"object";}, isPlainObject:function(obj){ if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){ return false;} if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){ return false;} var key; for(key in obj){} return key===undefined||hasOwn.call(obj,key);}, isEmptyObject:function(obj){ for(var name in obj){ return false;} return true;}, error:function(msg){ throw msg;}, parseJSON:function(data){ if(typeof data!=="string"||!data){ return null;} data=jQuery.trim(data); if(window.JSON&&window.JSON.parse){ return window.JSON.parse(data);} if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))){ return(new Function("return "+data))();} jQuery.error("Invalid JSON: "+data);}, parseXML:function(data,xml,tmp){ if(window.DOMParser){ tmp=new DOMParser(); xml=tmp.parseFromString(data,"text/xml");}else{ xml=new ActiveXObject("Microsoft.XMLDOM"); xml.async="false"; xml.loadXML(data);} tmp=xml.documentElement; if(!tmp||!tmp.nodeName||tmp.nodeName==="parsererror"){ jQuery.error("Invalid XML: "+data);} return xml;}, noop:function(){}, globalEval:function(data){ if(data&&rnotwhite.test(data)){ (window.execScript||function(data){ window["eval"].call(window,data);})(data);}}, camelCase:function(string){ return string.replace(rdashAlpha,fcamelCase);}, nodeName:function(elem,name){ return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();}, each:function(object,callback,args){ var name,i=0, length=object.length, isObj=length===undefined||jQuery.isFunction(object); if(args){ if(isObj){ for(name in object){ if(callback.apply(object[name],args)===false){ break;}}}else{ for(;i0&&elems[0]&&elems[length-1])||length===0||jQuery.isArray(elems)); if(isArray){ for(;i1?sliceDeferred.call(arguments,0):value; if(!(--count)){ deferred.resolveWith(deferred,sliceDeferred.call(args,0));}};} if(length>1){ for(;i-1){ return true;}} return false;}, val:function(value){ var hooks,ret, elem=this[0]; if(!arguments.length){ if(elem){ hooks=jQuery.valHooks[elem.nodeName.toLowerCase()]||jQuery.valHooks[elem.type]; if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){ return ret;} ret=elem.value; return typeof ret==="string"? ret.replace(rreturn,""): ret==null?"":ret;} return undefined;} var isFunction=jQuery.isFunction(value); return this.each(function(i){ var self=jQuery(this),val; if(this.nodeType!==1){ return;} if(isFunction){ val=value.call(this,i,self.val());}else{ val=value;} if(val==null){ val="";}else if(typeof val==="number"){ val+="";}else if(jQuery.isArray(val)){ val=jQuery.map(val,function(value){ return value==null?"":value+"";});} hooks=jQuery.valHooks[this.nodeName.toLowerCase()]||jQuery.valHooks[this.type]; if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){ this.value=val;}});}}); jQuery.extend({ valHooks:{ option:{ get:function(elem){ var val=elem.attributes.value; return!val||val.specified?elem.value:elem.text;}}, select:{ get:function(elem){ var value, index=elem.selectedIndex, values=[], options=elem.options, one=elem.type==="select-one"; if(index<0){ return null;} for(var i=one?index:0,max=one?index+1:options.length;i=0;}); if(!values.length){ elem.selectedIndex=-1;} return values;}}}, attrFn:{ val:true, css:true, html:true, text:true, data:true, width:true, height:true, offset:true}, attrFix:{ tabindex:"tabIndex"}, attr:function(elem,name,value,pass){ var nType=elem.nodeType; if(!elem||nType===3||nType===8||nType===2){ return undefined;} if(pass&&name in jQuery.attrFn){ return jQuery(elem)[name](value);} if(!("getAttribute"in elem)){ return jQuery.prop(elem,name,value);} var ret,hooks, notxml=nType!==1||!jQuery.isXMLDoc(elem); if(notxml){ name=jQuery.attrFix[name]||name; hooks=jQuery.attrHooks[name]; if(!hooks){ if(rboolean.test(name)){ hooks=boolHook;}else if(formHook&&name!=="className"&& (jQuery.nodeName(elem,"form")||rinvalidChar.test(name))){ hooks=formHook;}}} if(value!==undefined){ if(value===null){ jQuery.removeAttr(elem,name); return undefined;}else if(hooks&&"set"in hooks&¬xml&&(ret=hooks.set(elem,value,name))!==undefined){ return ret;}else{ elem.setAttribute(name,""+value); return value;}}else if(hooks&&"get"in hooks&¬xml&&(ret=hooks.get(elem,name))!==null){ return ret;}else{ ret=elem.getAttribute(name); return ret===null? undefined: ret;}}, removeAttr:function(elem,name){ var propName; if(elem.nodeType===1){ name=jQuery.attrFix[name]||name; if(jQuery.support.getSetAttribute){ elem.removeAttribute(name);}else{ jQuery.attr(elem,name,""); elem.removeAttributeNode(elem.getAttributeNode(name));} if(rboolean.test(name)&&(propName=jQuery.propFix[name]||name)in elem){ elem[propName]=false;}}}, attrHooks:{ type:{ set:function(elem,value){ if(rtype.test(elem.nodeName)&&elem.parentNode){ jQuery.error("type property can't be changed");}else if(!jQuery.support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){ var val=elem.value; elem.setAttribute("type",value); if(val){ elem.value=val;} return value;}}}, tabIndex:{ get:function(elem){ var attributeNode=elem.getAttributeNode("tabIndex"); return attributeNode&&attributeNode.specified? parseInt(attributeNode.value,10): rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href? 0: undefined;}}, value:{ get:function(elem,name){ if(formHook&&jQuery.nodeName(elem,"button")){ return formHook.get(elem,name);} return name in elem? elem.value: null;}, set:function(elem,value,name){ if(formHook&&jQuery.nodeName(elem,"button")){ return formHook.set(elem,value,name);} elem.value=value;}}}, propFix:{ tabindex:"tabIndex", readonly:"readOnly","for":"htmlFor","class":"className", maxlength:"maxLength", cellspacing:"cellSpacing", cellpadding:"cellPadding", rowspan:"rowSpan", colspan:"colSpan", usemap:"useMap", frameborder:"frameBorder", contenteditable:"contentEditable"}, prop:function(elem,name,value){ var nType=elem.nodeType; if(!elem||nType===3||nType===8||nType===2){ return undefined;} var ret,hooks, notxml=nType!==1||!jQuery.isXMLDoc(elem); if(notxml){ name=jQuery.propFix[name]||name; hooks=jQuery.propHooks[name];} if(value!==undefined){ if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){ return ret;}else{ return(elem[name]=value);}}else{ if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==undefined){ return ret;}else{ return elem[name];}}}, propHooks:{}}); boolHook={ get:function(elem,name){ return jQuery.prop(elem,name)? name.toLowerCase(): undefined;}, set:function(elem,value,name){ var propName; if(value===false){ jQuery.removeAttr(elem,name);}else{ propName=jQuery.propFix[name]||name; if(propName in elem){ elem[propName]=true;} elem.setAttribute(name,name.toLowerCase());} return name;}}; if(!jQuery.support.getSetAttribute){ jQuery.attrFix=jQuery.propFix; formHook=jQuery.attrHooks.name=jQuery.attrHooks.title=jQuery.valHooks.button={ get:function(elem,name){ var ret; ret=elem.getAttributeNode(name); return ret&&ret.nodeValue!==""? ret.nodeValue: undefined;}, set:function(elem,value,name){ var ret=elem.getAttributeNode(name); if(ret){ ret.nodeValue=value; return value;}}}; jQuery.each(["width","height"],function(i,name){ jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{ set:function(elem,value){ if(value===""){ elem.setAttribute(name,"auto"); return value;}}});});} if(!jQuery.support.hrefNormalized){ jQuery.each(["href","src","width","height"],function(i,name){ jQuery.attrHooks[name]=jQuery.extend(jQuery.attrHooks[name],{ get:function(elem){ var ret=elem.getAttribute(name,2); return ret===null?undefined:ret;}});});} if(!jQuery.support.style){ jQuery.attrHooks.style={ get:function(elem){ return elem.style.cssText.toLowerCase()||undefined;}, set:function(elem,value){ return(elem.style.cssText=""+value);}};} if(!jQuery.support.optSelected){ jQuery.propHooks.selected=jQuery.extend(jQuery.propHooks.selected,{ get:function(elem){ var parent=elem.parentNode; if(parent){ parent.selectedIndex; if(parent.parentNode){ parent.parentNode.selectedIndex;}}}});} if(!jQuery.support.checkOn){ jQuery.each(["radio","checkbox"],function(){ jQuery.valHooks[this]={ get:function(elem){ return elem.getAttribute("value")===null?"on":elem.value;}};});} jQuery.each(["radio","checkbox"],function(){ jQuery.valHooks[this]=jQuery.extend(jQuery.valHooks[this],{ set:function(elem,value){ if(jQuery.isArray(value)){ return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0);}}});}); var rnamespaces=/\.(.*)$/, rformElems=/^(?:textarea|input|select)$/i, rperiod=/\./g, rspaces=/ /g, rescape=/[^\w\s.|`]/g, fcleanup=function(nm){ return nm.replace(rescape,"\\$&");}; jQuery.event={ add:function(elem,types,handler,data){ if(elem.nodeType===3||elem.nodeType===8){ return;} if(handler===false){ handler=returnFalse;}else if(!handler){ return;} var handleObjIn,handleObj; if(handler.handler){ handleObjIn=handler; handler=handleObjIn.handler;} if(!handler.guid){ handler.guid=jQuery.guid++;} var elemData=jQuery._data(elem); if(!elemData){ return;} var events=elemData.events, eventHandle=elemData.handle; if(!events){ elemData.events=events={};} if(!eventHandle){ elemData.handle=eventHandle=function(e){ return typeof jQuery!=="undefined"&&(!e||jQuery.event.triggered!==e.type)? jQuery.event.handle.apply(eventHandle.elem,arguments): undefined;};} eventHandle.elem=elem; types=types.split(" "); var type,i=0,namespaces; while((type=types[i++])){ handleObj=handleObjIn? jQuery.extend({},handleObjIn): {handler:handler,data:data}; if(type.indexOf(".")>-1){ namespaces=type.split("."); type=namespaces.shift(); handleObj.namespace=namespaces.slice(0).sort().join(".");}else{ namespaces=[]; handleObj.namespace="";} handleObj.type=type; if(!handleObj.guid){ handleObj.guid=handler.guid;} var handlers=events[type], special=jQuery.event.special[type]||{}; if(!handlers){ handlers=events[type]=[]; if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){ if(elem.addEventListener){ elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){ elem.attachEvent("on"+type,eventHandle);}}} if(special.add){ special.add.call(elem,handleObj); if(!handleObj.handler.guid){ handleObj.handler.guid=handler.guid;}} handlers.push(handleObj); jQuery.event.global[type]=true;} elem=null;}, global:{}, remove:function(elem,types,handler,pos){ if(elem.nodeType===3||elem.nodeType===8){ return;} if(handler===false){ handler=returnFalse;} var ret,type,fn,j,i=0,all,namespaces,namespace,special,eventType,handleObj,origType, elemData=jQuery.hasData(elem)&&jQuery._data(elem), events=elemData&&elemData.events; if(!elemData||!events){ return;} if(types&&types.type){ handler=types.handler; types=types.type;} if(!types||typeof types==="string"&&types.charAt(0)==="."){ types=types||""; for(type in events){ jQuery.event.remove(elem,type+types);} return;} types=types.split(" "); while((type=types[i++])){ origType=type; handleObj=null; all=type.indexOf(".")<0; namespaces=[]; if(!all){ namespaces=type.split("."); type=namespaces.shift(); namespace=new RegExp("(^|\\.)"+ jQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)");} eventType=events[type]; if(!eventType){ continue;} if(!handler){ for(j=0;j=0){ type=type.slice(0,-1); exclusive=true;} if(type.indexOf(".")>=0){ namespaces=type.split("."); type=namespaces.shift(); namespaces.sort();} if((!elem||jQuery.event.customEvent[type])&&!jQuery.event.global[type]){ return;} event=typeof event==="object"? event[jQuery.expando]?event: new jQuery.Event(type,event): new jQuery.Event(type); event.type=type; event.exclusive=exclusive; event.namespace=namespaces.join("."); event.namespace_re=new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.)?")+"(\\.|$)"); if(onlyHandlers||!elem){ event.preventDefault(); event.stopPropagation();} if(!elem){ jQuery.each(jQuery.cache,function(){ var internalKey=jQuery.expando, internalCache=this[internalKey]; if(internalCache&&internalCache.events&&internalCache.events[type]){ jQuery.event.trigger(event,data,internalCache.handle.elem);}}); return;} if(elem.nodeType===3||elem.nodeType===8){ return;} event.result=undefined; event.target=elem; data=data!=null?jQuery.makeArray(data):[]; data.unshift(event); var cur=elem, ontype=type.indexOf(":")<0?"on"+type:""; do{ var handle=jQuery._data(cur,"handle"); event.currentTarget=cur; if(handle){ handle.apply(cur,data);} if(ontype&&jQuery.acceptData(cur)&&cur[ontype]&&cur[ontype].apply(cur,data)===false){ event.result=false; event.preventDefault();} cur=cur.parentNode||cur.ownerDocument||cur===event.target.ownerDocument&&window;}while(cur&&!event.isPropagationStopped()); if(!event.isDefaultPrevented()){ var old, special=jQuery.event.special[type]||{}; if((!special._default||special._default.call(elem.ownerDocument,event)===false)&&!(type==="click"&&jQuery.nodeName(elem,"a"))&&jQuery.acceptData(elem)){ try{ if(ontype&&elem[type]){ old=elem[ontype]; if(old){ elem[ontype]=null;} jQuery.event.triggered=type; elem[type]();}}catch(ieError){} if(old){ elem[ontype]=old;} jQuery.event.triggered=undefined;}} return event.result;}, handle:function(event){ event=jQuery.event.fix(event||window.event); var handlers=((jQuery._data(this,"events")||{})[event.type]||[]).slice(0), run_all=!event.exclusive&&!event.namespace, args=Array.prototype.slice.call(arguments,0); args[0]=event; event.currentTarget=this; for(var j=0,l=handlers.length;j-1? jQuery.map(elem.options,function(elem){ return elem.selected;}).join("-"):"";}else if(jQuery.nodeName(elem,"select")){ val=elem.selectedIndex;} return val;}, testChange=function testChange(e){ var elem=e.target,data,val; if(!rformElems.test(elem.nodeName)||elem.readOnly){ return;} data=jQuery._data(elem,"_change_data"); val=getVal(elem); if(e.type!=="focusout"||elem.type!=="radio"){ jQuery._data(elem,"_change_data",val);} if(data===undefined||val===data){ return;} if(data!=null||val){ e.type="change"; e.liveFired=undefined; jQuery.event.trigger(e,arguments[1],elem);}}; jQuery.event.special.change={ filters:{ focusout:testChange, beforedeactivate:testChange, click:function(e){ var elem=e.target,type=jQuery.nodeName(elem,"input")?elem.type:""; if(type==="radio"||type==="checkbox"||jQuery.nodeName(elem,"select")){ testChange.call(this,e);}}, keydown:function(e){ var elem=e.target,type=jQuery.nodeName(elem,"input")?elem.type:""; if((e.keyCode===13&&!jQuery.nodeName(elem,"textarea"))|| (e.keyCode===32&&(type==="checkbox"||type==="radio"))|| type==="select-multiple"){ testChange.call(this,e);}}, beforeactivate:function(e){ var elem=e.target; jQuery._data(elem,"_change_data",getVal(elem));}}, setup:function(data,namespaces){ if(this.type==="file"){ return false;} for(var type in changeFilters){ jQuery.event.add(this,type+".specialChange",changeFilters[type]);} return rformElems.test(this.nodeName);}, teardown:function(namespaces){ jQuery.event.remove(this,".specialChange"); return rformElems.test(this.nodeName);}}; changeFilters=jQuery.event.special.change.filters; changeFilters.focus=changeFilters.beforeactivate;} function trigger(type,elem,args){ var event=jQuery.extend({},args[0]); event.type=type; event.originalEvent={}; event.liveFired=undefined; jQuery.event.handle.call(elem,event); if(event.isDefaultPrevented()){ args[0].preventDefault();}} if(!jQuery.support.focusinBubbles){ jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){ var attaches=0; jQuery.event.special[fix]={ setup:function(){ if(attaches++===0){ document.addEventListener(orig,handler,true);}}, teardown:function(){ if(--attaches===0){ document.removeEventListener(orig,handler,true);}}}; function handler(donor){ var e=jQuery.event.fix(donor); e.type=fix; e.originalEvent={}; jQuery.event.trigger(e,null,e.target); if(e.isDefaultPrevented()){ donor.preventDefault();}}});} jQuery.each(["bind","one"],function(i,name){ jQuery.fn[name]=function(type,data,fn){ var handler; if(typeof type==="object"){ for(var key in type){ this[name](key,data,type[key],fn);} return this;} if(arguments.length===2||data===false){ fn=data; data=undefined;} if(name==="one"){ handler=function(event){ jQuery(this).unbind(event,handler); return fn.apply(this,arguments);}; handler.guid=fn.guid||jQuery.guid++;}else{ handler=fn;} if(type==="unload"&&name!=="one"){ this.one(type,data,fn);}else{ for(var i=0,l=this.length;imaxLevel){ break;} event.currentTarget=match.elem; event.data=match.handleObj.data; event.handleObj=match.handleObj; ret=match.handleObj.origHandler.apply(match.elem,arguments); if(ret===false||event.isPropagationStopped()){ maxLevel=match.level; if(ret===false){ stop=false;} if(event.isImmediatePropagationStopped()){ break;}}} return stop;} function liveConvert(type,selector){ return(type&&type!=="*"?type+".":"")+selector.replace(rperiod,"`").replace(rspaces,"&");} jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){ jQuery.fn[name]=function(data,fn){ if(fn==null){ fn=data; data=null;} return arguments.length>0? this.bind(name,data,fn): this.trigger(name);}; if(jQuery.attrFn){ jQuery.attrFn[name]=true;}}); jQuery.fn.SplunkPatchWindowUnload=function(){ for(var id in jQuery.cache) if(id!=1&&jQuery.cache[id].handle) jQuery.event.remove(jQuery.cache[id].handle.elem);}; jQuery(window).bind('unload',jQuery.fn.SplunkPatchWindowUnload); (function(){ var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, done=0, toString=Object.prototype.toString, hasDuplicate=false, baseHasDuplicate=true, rBackslash=/\\/g, rNonWord=/\W/; [0,0].sort(function(){ baseHasDuplicate=false; return 0;}); var Sizzle=function(selector,context,results,seed){ results=results||[]; context=context||document; var origContext=context; if(context.nodeType!==1&&context.nodeType!==9){ return[];} if(!selector||typeof selector!=="string"){ return results;} var m,set,checkSet,extra,ret,cur,pop,i, prune=true, contextXML=Sizzle.isXML(context), parts=[], soFar=selector; do{ chunker.exec(""); m=chunker.exec(soFar); if(m){ soFar=m[3]; parts.push(m[1]); if(m[2]){ extra=m[3]; break;}}}while(m); 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])){ ret=Sizzle.find(parts.shift(),context,contextXML); context=ret.expr? Sizzle.filter(ret.expr,ret.set)[0]: ret.set[0];} if(context){ 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){ 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){ Sizzle.error(cur||selector);} if(toString.call(checkSet)==="[object Array]"){ if(!prune){ results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){ for(i=0;checkSet[i]!=null;i++){ if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&Sizzle.contains(context,checkSet[i]))){ results.push(set[i]);}}}else{ for(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=baseHasDuplicate; results.sort(sortOrder); if(hasDuplicate){ for(var i=1;i0;}; Sizzle.find=function(expr,context,isXML){ var set; if(!expr){ return[];} for(var i=0,l=Expr.order.length;i":function(checkSet,part){ var elem, isPartStr=typeof part==="string", i=0, l=checkSet.length; if(isPartStr&&!rNonWord.test(part)){ part=part.toLowerCase(); for(;i=0)){ if(!inplace){ result.push(elem);}}else if(inplace){ curLoop[i]=false;}}} return false;}, ID:function(match){ return match[1].replace(rBackslash,"");}, TAG:function(match,curLoop){ return match[1].replace(rBackslash,"").toLowerCase();}, CHILD:function(match){ if(match[1]==="nth"){ if(!match[2]){ Sizzle.error(match[0]);} match[2]=match[2].replace(/^\+|\s*/g,''); 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;} else if(match[2]){ Sizzle.error(match[0]);} match[0]=done++; return match;}, ATTR:function(match,curLoop,inplace,result,not,isXML){ var name=match[1]=match[1].replace(rBackslash,""); if(!isXML&&Expr.attrMap[name]){ match[1]=Expr.attrMap[name];} match[4]=(match[4]||match[5]||"").replace(rBackslash,""); if(match[2]==="~="){ match[4]=" "+match[4]+" ";} return match;}, PSEUDO:function(match,curLoop,inplace,result,not){ if(match[1]==="not"){ if((chunker.exec(match[3])||"").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){ if(elem.parentNode){ 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){ var attr=elem.getAttribute("type"),type=elem.type; return elem.nodeName.toLowerCase()==="input"&&"text"===type&&(attr===type||attr===null);}, radio:function(elem){ return elem.nodeName.toLowerCase()==="input"&&"radio"===elem.type;}, checkbox:function(elem){ return elem.nodeName.toLowerCase()==="input"&&"checkbox"===elem.type;}, file:function(elem){ return elem.nodeName.toLowerCase()==="input"&&"file"===elem.type;}, password:function(elem){ return elem.nodeName.toLowerCase()==="input"&&"password"===elem.type;}, submit:function(elem){ var name=elem.nodeName.toLowerCase(); return(name==="input"||name==="button")&&"submit"===elem.type;}, image:function(elem){ return elem.nodeName.toLowerCase()==="input"&&"image"===elem.type;}, reset:function(elem){ var name=elem.nodeName.toLowerCase(); return(name==="input"||name==="button")&&"reset"===elem.type;}, button:function(elem){ var name=elem.nodeName.toLowerCase(); return name==="input"&&"button"===elem.type||name==="button";}, input:function(elem){ return(/input|select|textarea|button/i).test(elem.nodeName);}, focus:function(elem){ return elem===elem.ownerDocument.activeElement;}}, 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||Sizzle.getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){ var not=match[3]; for(var j=0,l=not.length;j=0);}}}, ID:function(elem,match){ return elem.nodeType===1&&elem.getAttribute("id")===match;}, TAG:function(elem,match){ return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===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, fescape=function(all,num){ return"\\"+(num-0+1);}; for(var type in Expr.match){ Expr.match[type]=new RegExp(Expr.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source)); Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,fescape));} var makeArray=function(array,results){ array=Array.prototype.slice.call(array,0); if(results){ results.push.apply(results,array); return results;} return array;}; try{ Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){ makeArray=function(array,results){ var i=0, ret=results||[]; if(toString.call(array)==="[object Array]"){ Array.prototype.push.apply(ret,array);}else{ if(typeof array.length==="number"){ for(var l=array.length;i"; 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"), id="__sizzle__"; div.innerHTML="

"; if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){ return;} Sizzle=function(query,context,extra,seed){ context=context||document; if(!seed&&!Sizzle.isXML(context)){ var match=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query); if(match&&(context.nodeType===1||context.nodeType===9)){ if(match[1]){ return makeArray(context.getElementsByTagName(query),extra);}else if(match[2]&&Expr.find.CLASS&&context.getElementsByClassName){ return makeArray(context.getElementsByClassName(match[2]),extra);}} if(context.nodeType===9){ if(query==="body"&&context.body){ return makeArray([context.body],extra);}else if(match&&match[3]){ var elem=context.getElementById(match[3]); if(elem&&elem.parentNode){ if(elem.id===match[3]){ return makeArray([elem],extra);}}else{ return makeArray([],extra);}} try{ return makeArray(context.querySelectorAll(query),extra);}catch(qsaError){}}else if(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){ var oldContext=context, old=context.getAttribute("id"), nid=old||id, hasParent=context.parentNode, relativeHierarchySelector=/^\s*[+~]/.test(query); if(!old){ context.setAttribute("id",nid);}else{ nid=nid.replace(/'/g,"\\$&");} if(relativeHierarchySelector&&hasParent){ context=context.parentNode;} try{ if(!relativeHierarchySelector||hasParent){ return makeArray(context.querySelectorAll("[id='"+nid+"'] "+query),extra);}}catch(pseudoError){}finally{ if(!old){ oldContext.removeAttribute("id");}}}} return oldSizzle(query,context,extra,seed);}; for(var prop in oldSizzle){ Sizzle[prop]=oldSizzle[prop];} div=null;})();} (function(){ var html=document.documentElement, matches=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector; if(matches){ var disconnectedMatch=!matches.call(document.createElement("div"),"div"), pseudoWorks=false; try{ matches.call(document.documentElement,"[test!='']:sizzle");}catch(pseudoError){ pseudoWorks=true;} Sizzle.matchesSelector=function(node,expr){ expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"); if(!Sizzle.isXML(node)){ try{ if(pseudoWorks||!Expr.match.PSEUDO.test(expr)&&!/!=/.test(expr)){ var ret=matches.call(node,expr); if(ret||!disconnectedMatch|| node.document&&node.document.nodeType!==11){ return ret;}}}catch(e){}} return Sizzle(expr,null,null,[node]).length>0;};}})(); (function(){ var div=document.createElement("div"); div.innerHTML="
"; if(!div.getElementsByClassName||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){ for(var i=0,l=checkSet.length;i0){ match=elem; break;}} elem=elem[dir];} checkSet[i]=match;}}} if(document.documentElement.contains){ Sizzle.contains=function(a,b){ return a!==b&&(a.contains?a.contains(b):true);};}else if(document.documentElement.compareDocumentPosition){ Sizzle.contains=function(a,b){ return!!(a.compareDocumentPosition(b)&16);};}else{ Sizzle.contains=function(){ return false;};} Sizzle.isXML=function(elem){ var documentElement=(elem?elem.ownerDocument||elem:0).documentElement; return documentElement?documentElement.nodeName!=="HTML":false;}; var posProcess=function(selector,context){ var match, tmpSet=[], later="", 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(n=length;n0: this.filter(selector).length>0);}, closest:function(selectors,context){ var ret=[],i,l,cur=this[0]; if(jQuery.isArray(selectors)){ var match,selector, matches={}, level=1; if(cur&&selectors.length){ for(i=0,l=selectors.length;i-1:jQuery(cur).is(match)){ ret.push({selector:selector,elem:cur,level:level});}} cur=cur.parentNode; level++;}} return ret;} var pos=POS.test(selectors)||typeof selectors!=="string"? jQuery(selectors,context||this.context): 0; for(i=0,l=this.length;i-1:jQuery.find.matchesSelector(cur,selectors)){ ret.push(cur); break;}else{ cur=cur.parentNode; if(!cur||!cur.ownerDocument||cur===context||cur.nodeType===11){ break;}}}} ret=ret.length>1?jQuery.unique(ret):ret; return this.pushStack(ret,"closest",selectors);}, 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);}, add:function(selector,context){ var set=typeof selector==="string"? jQuery(selector,context): jQuery.makeArray(selector&&selector.nodeType?[selector]:selector), all=jQuery.merge(this.get(),set); return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])? all: jQuery.unique(all));}, andSelf:function(){ return this.add(this.prevObject);}}); function isDisconnected(node){ return!node||!node.parentNode||node.parentNode.nodeType===11;} jQuery.each({ parent:function(elem){ var parent=elem.parentNode; return parent&&parent.nodeType!==11?parent:null;}, parents:function(elem){ return jQuery.dir(elem,"parentNode");}, parentsUntil:function(elem,i,until){ return jQuery.dir(elem,"parentNode",until);}, 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");}, nextUntil:function(elem,i,until){ return jQuery.dir(elem,"nextSibling",until);}, prevUntil:function(elem,i,until){ return jQuery.dir(elem,"previousSibling",until);}, 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(until,selector){ var ret=jQuery.map(this,fn,until), args=slice.call(arguments); if(!runtil.test(name)){ selector=until;} if(selector&&typeof selector==="string"){ ret=jQuery.filter(selector,ret);} ret=this.length>1&&!guaranteedUnique[name]?jQuery.unique(ret):ret; if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ ret=ret.reverse();} return this.pushStack(ret,name,args.join(","));};}); jQuery.extend({ filter:function(expr,elems,not){ if(not){ expr=":not("+expr+")";} return elems.length===1? jQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]: jQuery.find.matches(expr,elems);}, dir:function(elem,dir,until){ var matched=[], cur=elem[dir]; while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){ if(cur.nodeType===1){ matched.push(cur);} cur=cur[dir];} return matched;}, nth:function(cur,result,dir,elem){ result=result||1; var num=0; for(;cur;cur=cur[dir]){ if(cur.nodeType===1&&++num===result){ break;}} return cur;}, sibling:function(n,elem){ var r=[]; for(;n;n=n.nextSibling){ if(n.nodeType===1&&n!==elem){ r.push(n);}} return r;}}); function winnow(elements,qualifier,keep){ qualifier=qualifier||0; if(jQuery.isFunction(qualifier)){ return jQuery.grep(elements,function(elem,i){ var retVal=!!qualifier.call(elem,i,elem); return retVal===keep;});}else if(qualifier.nodeType){ return jQuery.grep(elements,function(elem,i){ return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){ var filtered=jQuery.grep(elements,function(elem){ return elem.nodeType===1;}); if(isSimple.test(qualifier)){ return jQuery.filter(qualifier,filtered,!keep);}else{ qualifier=jQuery.filter(qualifier,filtered);}} return jQuery.grep(elements,function(elem,i){ return(jQuery.inArray(elem,qualifier)>=0)===keep;});} var rinlinejQuery=/ jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace=/^\s+/, rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rtagName=/<([\w:]+)/, rtbody=/",""], legend:[1,"
","
"], thead:[1,"","
"], tr:[2,"","
"], td:[3,"","
"], col:[2,"","
"], area:[1,"",""], _default:[0,"",""]}; wrapMap.optgroup=wrapMap.option; wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead; wrapMap.th=wrapMap.td; if(!jQuery.support.htmlSerialize){ wrapMap._default=[1,"div
","
"];} jQuery.fn.extend({ text:function(text){ if(jQuery.isFunction(text)){ return this.each(function(i){ var self=jQuery(this); self.text(text.call(this,i,self.text()));});} if(typeof text!=="object"&&text!==undefined){ return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));} return jQuery.text(this);}, wrapAll:function(html){ if(jQuery.isFunction(html)){ return this.each(function(i){ jQuery(this).wrapAll(html.call(this,i));});} if(this[0]){ var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true); if(this[0].parentNode){ wrap.insertBefore(this[0]);} wrap.map(function(){ var elem=this; while(elem.firstChild&&elem.firstChild.nodeType===1){ elem=elem.firstChild;} return elem;}).append(this);} return this;}, wrapInner:function(html){ if(jQuery.isFunction(html)){ return this.each(function(i){ jQuery(this).wrapInner(html.call(this,i));});} return this.each(function(){ var self=jQuery(this), contents=self.contents(); if(contents.length){ contents.wrapAll(html);}else{ self.append(html);}});}, wrap:function(html){ return this.each(function(){ jQuery(this).wrapAll(html);});}, unwrap:function(){ return this.parent().each(function(){ if(!jQuery.nodeName(this,"body")){ jQuery(this).replaceWith(this.childNodes);}}).end();}, 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;}}, remove:function(selector,keepData){ for(var i=0,elem;(elem=this[i])!=null;i++){ if(!selector||jQuery.filter(selector,[elem]).length){ if(!keepData&&elem.nodeType===1){ jQuery.cleanData(elem.getElementsByTagName("*")); jQuery.cleanData([elem]);} if(elem.parentNode){ elem.parentNode.removeChild(elem);}}} return this;}, empty:function(){ for(var i=0,elem;(elem=this[i])!=null;i++){ if(elem.nodeType===1){ jQuery.cleanData(elem.getElementsByTagName("*"));} while(elem.firstChild){ elem.removeChild(elem.firstChild);}} return this;}, clone:function(dataAndEvents,deepDataAndEvents){ dataAndEvents=dataAndEvents==null?false:dataAndEvents; deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents; return this.map(function(){ return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});}, html:function(value){ if(value===undefined){ return this[0]&&this[0].nodeType===1? this[0].innerHTML.replace(rinlinejQuery,""): null;}else if(typeof value==="string"&&!rnocache.test(value)&& (jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){ value=value.replace(rxhtmlTag,"<$1>"); try{ for(var i=0,l=this.length;i1&&i0?this.clone(true):this).get(); jQuery(insert[i])[original](elems); ret=ret.concat(elems);} return this.pushStack(ret,name,insert.selector);}};}); function getAll(elem){ if("getElementsByTagName"in elem){ return elem.getElementsByTagName("*");}else if("querySelectorAll"in elem){ return elem.querySelectorAll("*");}else{ return[];}} function fixDefaultChecked(elem){ if(elem.type==="checkbox"||elem.type==="radio"){ elem.defaultChecked=elem.checked;}} function findInputs(elem){ if(jQuery.nodeName(elem,"input")){ fixDefaultChecked(elem);}else if("getElementsByTagName"in elem){ jQuery.grep(elem.getElementsByTagName("input"),fixDefaultChecked);}} jQuery.extend({ clone:function(elem,dataAndEvents,deepDataAndEvents){ var clone=elem.cloneNode(true), srcElements, destElements, i; if((!jQuery.support.noCloneEvent||!jQuery.support.noCloneChecked)&& (elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){ cloneFixAttributes(elem,clone); srcElements=getAll(elem); destElements=getAll(clone); for(i=0;srcElements[i];++i){ cloneFixAttributes(srcElements[i],destElements[i]);}} if(dataAndEvents){ cloneCopyEvent(elem,clone); if(deepDataAndEvents){ srcElements=getAll(elem); destElements=getAll(clone); for(i=0;srcElements[i];++i){ cloneCopyEvent(srcElements[i],destElements[i]);}}} srcElements=destElements=null; return clone;}, clean:function(elems,context,fragment,scripts){ var checkScriptType; context=context||document; if(typeof context.createElement==="undefined"){ context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;} var ret=[],j; for(var i=0,elem;(elem=elems[i])!=null;i++){ if(typeof elem==="number"){ elem+="";} if(!elem){ continue;} if(typeof elem==="string"){ if(!rhtml.test(elem)){ elem=context.createTextNode(elem);}else{ elem=elem.replace(rxhtmlTag,"<$1>"); var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(), wrap=wrapMap[tag]||wrapMap._default, depth=wrap[0], div=context.createElement("div"); div.innerHTML=wrap[1]+elem+wrap[2]; while(depth--){ div=div.lastChild;} if(!jQuery.support.tbody){ var hasBody=rtbody.test(elem), tbody=tag==="table"&&!hasBody? div.firstChild&&div.firstChild.childNodes: wrap[1]===""&&!hasBody? div.childNodes: []; for(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&&rleadingWhitespace.test(elem)){ div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);} elem=div.childNodes;}} var len; if(!jQuery.support.appendChecked){ if(elem[0]&&typeof(len=elem.length)==="number"){ for(j=0;j=0){ return value+"px";}}else{ return value;}}};}); if(!jQuery.support.opacity){ jQuery.cssHooks.opacity={ get:function(elem,computed){ return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")? (parseFloat(RegExp.$1)/100)+"": computed?"1":"";}, set:function(elem,value){ var style=elem.style, currentStyle=elem.currentStyle; style.zoom=1; var opacity=jQuery.isNaN(value)?"":"alpha(opacity="+value*100+")", filter=currentStyle&¤tStyle.filter||style.filter||""; style.filter=ralpha.test(filter)? filter.replace(ralpha,opacity): filter+" "+opacity;}};} jQuery(function(){ if(!jQuery.support.reliableMarginRight){ jQuery.cssHooks.marginRight={ get:function(elem,computed){ var ret; jQuery.swap(elem,{"display":"inline-block"},function(){ if(computed){ ret=curCSS(elem,"margin-right","marginRight");}else{ ret=elem.style.marginRight;}}); return ret;}};}}); if(document.defaultView&&document.defaultView.getComputedStyle){ getComputedStyle=function(elem,name){ var ret,defaultView,computedStyle; name=name.replace(rupper,"-$1").toLowerCase(); if(!(defaultView=elem.ownerDocument.defaultView)){ return undefined;} if((computedStyle=defaultView.getComputedStyle(elem,null))){ ret=computedStyle.getPropertyValue(name); if(ret===""&&!jQuery.contains(elem.ownerDocument.documentElement,elem)){ ret=jQuery.style(elem,name);}} return ret;};} if(document.documentElement.currentStyle){ currentStyle=function(elem,name){ var left, ret=elem.currentStyle&&elem.currentStyle[name], rsLeft=elem.runtimeStyle&&elem.runtimeStyle[name], style=elem.style; if(!rnumpx.test(ret)&&rnum.test(ret)){ left=style.left; if(rsLeft){ elem.runtimeStyle.left=elem.currentStyle.left;} style.left=name==="fontSize"?"1em":(ret||0); ret=style.pixelLeft+"px"; style.left=left; if(rsLeft){ elem.runtimeStyle.left=rsLeft;}} return ret===""?"auto":ret;};} curCSS=getComputedStyle||currentStyle; function getWH(elem,name,extra){ var val=name==="width"?elem.offsetWidth:elem.offsetHeight, which=name==="width"?cssWidth:cssHeight; if(val>0){ if(extra!=="border"){ jQuery.each(which,function(){ if(!extra){ val-=parseFloat(jQuery.css(elem,"padding"+this))||0;} if(extra==="margin"){ val+=parseFloat(jQuery.css(elem,extra+this))||0;}else{ val-=parseFloat(jQuery.css(elem,"border"+this+"Width"))||0;}});} return val+"px";} val=curCSS(elem,name,name); if(val<0||val==null){ val=elem.style[name]||0;} val=parseFloat(val)||0; if(extra){ jQuery.each(which,function(){ val+=parseFloat(jQuery.css(elem,"padding"+this))||0; if(extra!=="padding"){ val+=parseFloat(jQuery.css(elem,"border"+this+"Width"))||0;} if(extra==="margin"){ val+=parseFloat(jQuery.css(elem,extra+this))||0;}});} return val+"px";} if(jQuery.expr&&jQuery.expr.filters){ jQuery.expr.filters.hidden=function(elem){ var width=elem.offsetWidth, height=elem.offsetHeight; return(width===0&&height===0)||(!jQuery.support.reliableHiddenOffsets&&(elem.style.display||jQuery.css(elem,"display"))==="none");}; jQuery.expr.filters.visible=function(elem){ return!jQuery.expr.filters.hidden(elem);};} var r20=/%20/g, rbracket=/\[\]$/, rCRLF=/\r?\n/g, rhash=/#.*$/, rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg, rinput=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, rlocalProtocol=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/, rnoContent=/^(?:GET|HEAD)$/, rprotocol=/^\/\//, rquery=/\?/, rscript=/)<[^<]*)*<\/script>/gi, rselectTextarea=/^(?:select|textarea)/i, rspacesAjax=/\s+/, rts=/([?&])_=[^&]*/, rurl=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, _load=jQuery.fn.load, prefilters={}, transports={}, ajaxLocation, ajaxLocParts; try{ ajaxLocation=location.href;}catch(e){ ajaxLocation=document.createElement("a"); ajaxLocation.href=""; ajaxLocation=ajaxLocation.href;} ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[]; function addToPrefiltersOrTransports(structure){ return function(dataTypeExpression,func){ if(typeof dataTypeExpression!=="string"){ func=dataTypeExpression; dataTypeExpression="*";} if(jQuery.isFunction(func)){ var dataTypes=dataTypeExpression.toLowerCase().split(rspacesAjax), i=0, length=dataTypes.length, dataType, list, placeBefore; for(;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=undefined;}else if(typeof params==="object"){ params=jQuery.param(params,jQuery.ajaxSettings.traditional); type="POST";}} var self=this; jQuery.ajax({ url:url, type:type, dataType:"html", data:params, complete:function(jqXHR,status,responseText){ responseText=jqXHR.responseText; if(jqXHR.isResolved()){ jqXHR.done(function(r){ responseText=r;}); self.html(selector? jQuery("
").append(responseText.replace(rscript,"")).find(selector): responseText);} if(callback){ self.each(callback,[responseText,status,jqXHR]);}}}); 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||rselectTextarea.test(this.nodeName)|| rinput.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.replace(rCRLF,"\r\n")};}): {name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}}); jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){ jQuery.fn[o]=function(f){ return this.bind(o,f);};}); jQuery.each(["get","post"],function(i,method){ jQuery[method]=function(url,data,callback,type){ if(jQuery.isFunction(data)){ type=type||callback; callback=data; data=undefined;} return jQuery.ajax({ type:method, url:url, data:data, success:callback, dataType:type});};}); jQuery.extend({ getScript:function(url,callback){ return jQuery.get(url,undefined,callback,"script");}, getJSON:function(url,data,callback){ return jQuery.get(url,data,callback,"json");}, ajaxSetup:function(target,settings){ if(!settings){ settings=target; target=jQuery.extend(true,jQuery.ajaxSettings,settings);}else{ jQuery.extend(true,target,jQuery.ajaxSettings,settings);} for(var field in{context:1,url:1}){ if(field in settings){ target[field]=settings[field];}else if(field in jQuery.ajaxSettings){ target[field]=jQuery.ajaxSettings[field];}} return target;}, ajaxSettings:{ url:ajaxLocation, isLocal:rlocalProtocol.test(ajaxLocParts[1]), global:true, type:"GET", contentType:"application/x-www-form-urlencoded", processData:true, async:true, accepts:{ xml:"application/xml, text/xml", html:"text/html", text:"text/plain", json:"application/json, text/javascript","*":"*/*"}, contents:{ xml:/xml/, html:/html/, json:/json/}, responseFields:{ xml:"responseXML", text:"responseText"}, converters:{"* text":window.String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML}}, ajaxPrefilter:addToPrefiltersOrTransports(prefilters), ajaxTransport:addToPrefiltersOrTransports(transports), ajax:function(url,options){ if(typeof url==="object"){ options=url; url=undefined;} options=options||{}; var s=jQuery.ajaxSetup({},options), callbackContext=s.context||s, globalEventContext=callbackContext!==s&& (callbackContext.nodeType||callbackContext instanceof jQuery)? jQuery(callbackContext):jQuery.event, deferred=jQuery.Deferred(), completeDeferred=jQuery._Deferred(), statusCode=s.statusCode||{}, ifModifiedKey, requestHeaders={}, requestHeadersNames={}, responseHeadersString, responseHeaders, transport, timeoutTimer, parts, state=0, fireGlobals, i, jqXHR={ readyState:0, setRequestHeader:function(name,value){ if(!state){ var lname=name.toLowerCase(); name=requestHeadersNames[lname]=requestHeadersNames[lname]||name; requestHeaders[name]=value;} return this;}, getAllResponseHeaders:function(){ return state===2?responseHeadersString:null;}, getResponseHeader:function(key){ var match; if(state===2){ if(!responseHeaders){ responseHeaders={}; while((match=rheaders.exec(responseHeadersString))){ responseHeaders[match[1].toLowerCase()]=match[2];}} match=responseHeaders[key.toLowerCase()];} return match===undefined?null:match;}, overrideMimeType:function(type){ if(!state){ s.mimeType=type;} return this;}, abort:function(statusText){ statusText=statusText||"abort"; if(transport){ transport.abort(statusText);} done(0,statusText); return this;}}; function done(status,statusText,responses,headers){ if(state===2){ return;} state=2; if(timeoutTimer){ clearTimeout(timeoutTimer);} transport=undefined; responseHeadersString=headers||""; jqXHR.readyState=status?4:0; var isSuccess, success, error, response=responses?ajaxHandleResponses(s,jqXHR,responses):undefined, lastModified, etag; if(status>=200&&status<300||status===304){ if(s.ifModified){ if((lastModified=jqXHR.getResponseHeader("Last-Modified"))){ jQuery.lastModified[ifModifiedKey]=lastModified;} if((etag=jqXHR.getResponseHeader("Etag"))){ jQuery.etag[ifModifiedKey]=etag;}} if(status===304){ statusText="notmodified"; isSuccess=true;}else{ try{ success=ajaxConvert(s,response); statusText="success"; isSuccess=true;}catch(e){ statusText="parsererror"; error=e;}}}else{ error=statusText; if(!statusText||status){ statusText="error"; if(status<0){ status=0;}}} jqXHR.status=status; jqXHR.statusText=statusText; if(isSuccess){ deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{ deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);} jqXHR.statusCode(statusCode); statusCode=undefined; if(fireGlobals){ globalEventContext.trigger("ajax"+(isSuccess?"Success":"Error"), [jqXHR,s,isSuccess?success:error]);} completeDeferred.resolveWith(callbackContext,[jqXHR,statusText]); if(fireGlobals){ globalEventContext.trigger("ajaxComplete",[jqXHR,s]); if(!(--jQuery.active)){ jQuery.event.trigger("ajaxStop");}}} deferred.promise(jqXHR); jqXHR.success=jqXHR.done; jqXHR.error=jqXHR.fail; jqXHR.complete=completeDeferred.done; jqXHR.statusCode=function(map){ if(map){ var tmp; if(state<2){ for(tmp in map){ statusCode[tmp]=[statusCode[tmp],map[tmp]];}}else{ tmp=map[jqXHR.status]; jqXHR.then(tmp,tmp);}} return this;}; s.url=((url||s.url)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"); s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().split(rspacesAjax); if(s.crossDomain==null){ parts=rurl.exec(s.url.toLowerCase()); s.crossDomain=!!(parts&& (parts[1]!=ajaxLocParts[1]||parts[2]!=ajaxLocParts[2]|| (parts[3]||(parts[1]==="http:"?80:443))!= (ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?80:443))));} if(s.data&&s.processData&&typeof s.data!=="string"){ s.data=jQuery.param(s.data,s.traditional);} inspectPrefiltersOrTransports(prefilters,s,options,jqXHR); if(state===2){ return false;} fireGlobals=s.global; s.type=s.type.toUpperCase(); s.hasContent=!rnoContent.test(s.type); if(fireGlobals&&jQuery.active++===0){ jQuery.event.trigger("ajaxStart");} if(!s.hasContent){ if(s.data){ s.url+=(rquery.test(s.url)?"&":"?")+s.data;} ifModifiedKey=s.url; if(s.cache===false){ var ts=jQuery.now(), ret=s.url.replace(rts,"$1_="+ts); s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}} if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){ jqXHR.setRequestHeader("Content-Type",s.contentType);} if(s.ifModified){ ifModifiedKey=ifModifiedKey||s.url; if(jQuery.lastModified[ifModifiedKey]){ jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[ifModifiedKey]);} if(jQuery.etag[ifModifiedKey]){ jqXHR.setRequestHeader("If-None-Match",jQuery.etag[ifModifiedKey]);}} jqXHR.setRequestHeader("Accept", s.dataTypes[0]&&s.accepts[s.dataTypes[0]]? s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", */*; q=0.01":""): s.accepts["*"]); for(i in s.headers){ jqXHR.setRequestHeader(i,s.headers[i]);} if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){ jqXHR.abort(); return false;} for(i in{success:1,error:1,complete:1}){ jqXHR[i](s[i]);} transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR); if(!transport){ done(-1,"No Transport");}else{ jqXHR.readyState=1; if(fireGlobals){ globalEventContext.trigger("ajaxSend",[jqXHR,s]);} if(s.async&&s.timeout>0){ timeoutTimer=setTimeout(function(){ jqXHR.abort("timeout");},s.timeout);} try{ state=1; transport.send(requestHeaders,done);}catch(e){ if(status<2){ done(-1,e);}else{ jQuery.error(e);}}} return jqXHR;}, param:function(a,traditional){ var s=[], add=function(key,value){ value=jQuery.isFunction(value)?value():value; s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);}; if(traditional===undefined){ traditional=jQuery.ajaxSettings.traditional;} if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){ jQuery.each(a,function(){ add(this.name,this.value);});}else{ for(var prefix in a){ buildParams(prefix,a[prefix],traditional,add);}} return s.join("&").replace(r20,"+");}}); function buildParams(prefix,obj,traditional,add){ if(jQuery.isArray(obj)){ jQuery.each(obj,function(i,v){ if(traditional||rbracket.test(prefix)){ add(prefix,v);}else{ buildParams(prefix+"["+(typeof v==="object"||jQuery.isArray(v)?i:"")+"]",v,traditional,add);}});}else if(!traditional&&obj!=null&&typeof obj==="object"){ for(var name in obj){ buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{ add(prefix,obj);}} jQuery.extend({ active:0, lastModified:{}, etag:{}}); function ajaxHandleResponses(s,jqXHR,responses){ var contents=s.contents, dataTypes=s.dataTypes, responseFields=s.responseFields, ct, type, finalDataType, firstDataType; for(type in responseFields){ if(type in responses){ jqXHR[responseFields[type]]=responses[type];}} while(dataTypes[0]==="*"){ dataTypes.shift(); if(ct===undefined){ ct=s.mimeType||jqXHR.getResponseHeader("content-type");}} if(ct){ for(type in contents){ if(contents[type]&&contents[type].test(ct)){ dataTypes.unshift(type); break;}}} if(dataTypes[0]in responses){ finalDataType=dataTypes[0];}else{ for(type in responses){ if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){ finalDataType=type; break;} if(!firstDataType){ firstDataType=type;}} finalDataType=finalDataType||firstDataType;} if(finalDataType){ if(finalDataType!==dataTypes[0]){ dataTypes.unshift(finalDataType);} return responses[finalDataType];}} function ajaxConvert(s,response){ if(s.dataFilter){ response=s.dataFilter(response,s.dataType);} var dataTypes=s.dataTypes, converters={}, i, key, length=dataTypes.length, tmp, current=dataTypes[0], prev, conversion, conv, conv1, conv2; for(i=1;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=jQuery.noop;}, bodyOffset:function(body){ var top=body.offsetTop, left=body.offsetLeft; jQuery.offset.initialize(); if(jQuery.offset.doesNotIncludeMarginInBodyOffset){ top+=parseFloat(jQuery.css(body,"marginTop"))||0; left+=parseFloat(jQuery.css(body,"marginLeft"))||0;} return{top:top,left:left};}, setOffset:function(elem,options,i){ var position=jQuery.css(elem,"position"); if(position==="static"){ elem.style.position="relative";} var curElem=jQuery(elem), curOffset=curElem.offset(), curCSSTop=jQuery.css(elem,"top"), curCSSLeft=jQuery.css(elem,"left"), calculatePosition=(position==="absolute"||position==="fixed")&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1, props={},curPosition={},curTop,curLeft; if(calculatePosition){ curPosition=curElem.position(); curTop=curPosition.top; curLeft=curPosition.left;}else{ curTop=parseFloat(curCSSTop)||0; curLeft=parseFloat(curCSSLeft)||0;} if(jQuery.isFunction(options)){ options=options.call(elem,i,curOffset);} if(options.top!=null){ props.top=(options.top-curOffset.top)+curTop;} if(options.left!=null){ props.left=(options.left-curOffset.left)+curLeft;} if("using"in options){ options.using.call(elem,props);}else{ curElem.css(props);}}}; jQuery.fn.extend({ position:function(){ if(!this[0]){ return null;} var elem=this[0], offsetParent=this.offsetParent(), offset=this.offset(), parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset(); offset.top-=parseFloat(jQuery.css(elem,"marginTop"))||0; offset.left-=parseFloat(jQuery.css(elem,"marginLeft"))||0; parentOffset.top+=parseFloat(jQuery.css(offsetParent[0],"borderTopWidth"))||0; parentOffset.left+=parseFloat(jQuery.css(offsetParent[0],"borderLeftWidth"))||0; return{ top:offset.top-parentOffset.top, left:offset.left-parentOffset.left};}, offsetParent:function(){ return this.map(function(){ var offsetParent=this.offsetParent||document.body; while(offsetParent&&(!rroot.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static")){ offsetParent=offsetParent.offsetParent;} return offsetParent;});}}); jQuery.each(["Left","Top"],function(i,name){ var method="scroll"+name; jQuery.fn[method]=function(val){ var elem,win; if(val===undefined){ elem=this[0]; if(!elem){ return null;} win=getWindow(elem); return win?("pageXOffset"in win)?win[i?"pageYOffset":"pageXOffset"]: jQuery.support.boxModel&&win.document.documentElement[method]|| win.document.body[method]: elem[method];} return this.each(function(){ win=getWindow(this); if(win){ win.scrollTo(!i?val:jQuery(win).scrollLeft(), i?val:jQuery(win).scrollTop());}else{ this[method]=val;}});};}); function getWindow(elem){ return jQuery.isWindow(elem)? elem: elem.nodeType===9? elem.defaultView||elem.parentWindow: false;} jQuery.each(["Height","Width"],function(i,name){ var type=name.toLowerCase(); jQuery.fn["inner"+name]=function(){ var elem=this[0]; return elem&&elem.style? parseFloat(jQuery.css(elem,type,"padding")): null;}; jQuery.fn["outer"+name]=function(margin){ var elem=this[0]; return elem&&elem.style? parseFloat(jQuery.css(elem,type,margin?"margin":"border")): null;}; jQuery.fn[type]=function(size){ var elem=this[0]; if(!elem){ return size==null?null:this;} if(jQuery.isFunction(size)){ return this.each(function(i){ var self=jQuery(this); self[type](size.call(this,i,self[type]()));});} if(jQuery.isWindow(elem)){ var docElemProp=elem.document.documentElement["client"+name]; return elem.document.compatMode==="CSS1Compat"&&docElemProp|| elem.document.body["client"+name]||docElemProp;}else if(elem.nodeType===9){ return Math.max( elem.documentElement["client"+name], elem.body["scroll"+name],elem.documentElement["scroll"+name], elem.body["offset"+name],elem.documentElement["offset"+name]);}else if(size===undefined){ var orig=jQuery.css(elem,type), ret=parseFloat(orig); return jQuery.isNaN(ret)?orig:ret;}else{ return this.css(type,typeof size==="string"?size:size+"px");}};}); window.jQuery=window.$=jQuery;})(window);; _i18n_locale={"scientific_format":"#E0","quarters":{"format":{"narrow":{"1":"1","2":"2","3":"3","4":"4"},"abbreviated":{"1":"Q1","2":"Q2","3":"Q3","4":"Q4"},"wide":{"1":"1st quarter","2":"2nd quarter","3":"3rd quarter","4":"4th quarter"}},"stand-alone":{"narrow":{"1":"1","2":"2","3":"3","4":"4"},"abbreviated":{"1":"1st quarter","2":"2nd quarter","3":"3rd quarter","4":"4th quarter"},"wide":{"1":"1st quarter","2":"2nd quarter","3":"3rd quarter","4":"4th quarter"}}},"exp_symbol":"E","plus_sign":"+","date_formats":{"medium":{"format":"%(MMM)s %(d)s, %(yyyy)s","pattern":"MMM d, yyyy"},"full":{"format":"%(EEEE)s, %(MMMM)s %(d)s, %(yyyy)s","pattern":"EEEE, MMMM d, yyyy"},"short":{"format":"%(M)s/%(d)s/%(yy)s","pattern":"M/d/yy"},"long":{"format":"%(MMMM)s %(d)s, %(yyyy)s","pattern":"MMMM d, yyyy"}},"months":{"format":{"narrow":{"1":"J","2":"F","3":"M","4":"A","5":"M","6":"J","7":"J","8":"A","9":"S","10":"O","11":"N","12":"D"},"abbreviated":{"1":"Jan","2":"Feb","3":"Mar","4":"Apr","5":"May","6":"Jun","7":"Jul","8":"Aug","9":"Sep","10":"Oct","11":"Nov","12":"Dec"},"wide":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"}},"stand-alone":{"narrow":{"1":"J","2":"F","3":"M","4":"A","5":"M","6":"J","7":"J","8":"A","9":"S","10":"O","11":"N","12":"D"},"abbreviated":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"},"wide":{"1":"January","2":"February","3":"March","4":"April","5":"May","6":"June","7":"July","8":"August","9":"September","10":"October","11":"November","12":"December"}}},"minus_sign":"-","percent_format":"#,##0%","datetime_formats":{"null":"{1} {0}"},"number_format":"#,##0.###","group_symbol":",","min_week_days":1,"decimal_symbol":".","locale_name":"en_US","eras":{"narrow":{"0":"B","1":"A"},"abbreviated":{"0":"BC","1":"AD"},"wide":{"0":"Before Christ","1":"Anno Domini"}},"periods":{"am":"AM","pm":"PM"},"first_week_day":6,"days":{"format":{"narrow":{"0":"M","1":"T","2":"W","3":"T","4":"F","5":"S","6":"S"},"abbreviated":{"0":"Mon","1":"Tue","2":"Wed","3":"Thu","4":"Fri","5":"Sat","6":"Sun"},"wide":{"0":"Monday","1":"Tuesday","2":"Wednesday","3":"Thursday","4":"Friday","5":"Saturday","6":"Sunday"}},"stand-alone":{"narrow":{"0":"M","1":"T","2":"W","3":"T","4":"F","5":"S","6":"S"},"abbreviated":{"0":"Monday","1":"Tuesday","2":"Wednesday","3":"Thursday","4":"Friday","5":"Saturday","6":"Sunday"},"wide":{"0":"Monday","1":"Tuesday","2":"Wednesday","3":"Thursday","4":"Friday","5":"Saturday","6":"Sunday"}}},"time_formats":{"medium":{"format":"%(h)s:%(mm)s:%(ss)s %(a)s","pattern":"h:mm:ss a"},"full":{"format":"%(h)s:%(mm)s:%(ss)s %(a)s %(v)s","pattern":"h:mm:ss a v"},"short":{"format":"%(h)s:%(mm)s %(a)s","pattern":"h:mm a"},"long":{"format":"%(h)s:%(mm)s:%(ss)s %(a)s %(z)s","pattern":"h:mm:ss a z"}}}; function _(message){ if(_i18n_locale.locale_name=='en_DEBUG')return __debug_trans_str(message); var entry=_i18n_catalog['+-'+message]; return entry==undefined?message:entry;} function ungettext(msgid1,msgid2,n){ if(_i18n_locale.locale_name=='en_DEBUG')return __debug_trans_str(msgid1); var id=''+_i18n_plural(n)+'-'+msgid1; var entry=_i18n_catalog[id]; return entry==undefined?(n==1?msgid1:msgid2):entry;} function __debug_trans_str(str){ var parts=str.split(/(\%(:?\(\w+\))?\w)|(<[^>]+>)|(\s+)/); parts=jQuery.grep(parts,function(en){return en!==undefined;}); var result=[]; for(var i=0;i-1&&formatStr.indexOf('%(m)')>-1){ return(formatStr.indexOf('%(d)')=digits.length){ add=0;}else if(digits.substr(i,1)>'5'){ add=1;}else if(digits.substr(i,1)=='5'&&'13579'.indexOf(digits[i-1])!==-1){ add=1;} var scale=Math.pow(10,ndigits); return parseInt(value*scale+add,10)/scale*sign;}; NumberPattern.prototype.apply=function(value,locale){ if(!locale) locale=_i18n_locale; value*=this.scale; var is_negative=value<0?1:0; if(this.exp_prec){ value=Math.abs(value); var exp; if(value) exp=Math.floor(Math.log(value)/Math.log(10)); else exp=0; if(this.int_prec[0]==this.int_prec[1]) exp-=this.int_prec[0]-1; else if(this.int_prec[1]) exp=parseInt(exp,10)/this.int_prec[1]*this.int_prec[1]; if(exp<0) value=value*Math.pow(10,-exp); else value=value/Math.pow(10,exp); var exp_sign=''; if(exp<0) exp_sign=locale.minus_sign; else if(this.exp_plus) exp_sign=locale.plus_sign; exp=Math.abs(exp); var num=''+ this._format_sigdig(value,this.frac_prec[0],this.frac_prec[1]) +locale.exp_symbol +exp_sign +this._format_int(''+exp,this.exp_prec[0],this.exp_prec[1],locale);}else if(this.pattern.indexOf('@')!==-1){ var text=this._format_sigdig(Math.abs(value),this.int_prec[0],this.int_prec[1]); if(text.indexOf('.')!==-1){ var a,b; var sp=text.split('.'); a=sp[0];b=sp[1]; a=this._format_int(a,0,1000,locale); if(b) b=locale.decimal_symbol+b; num=a+b;}else{ num=this._format_int(text,0,1000,locale);}}else{ var c,d; var cd_sp=split_number(bankersround(Math.abs(value),this.frac_prec[1])); c=cd_sp[0];d=cd_sp[1]; d=d||'0'; c=this._format_int(c,this.int_prec[0],this.int_prec[1],locale); d=this._format_frac(d,locale); num=c+d;} retval=''+this.prefix[is_negative]+num+this.suffix[is_negative]; return retval;}; NumberPattern.prototype._format_sigdig=function(value,min,max){ var a,b; var sp=split_number(value); a=sp[0];b=sp[1]; var ndecimals=a.length; if(a=='0'&&b!=''){ ndecimals=0; while(b[0]=='0'){ b=b.substr(1); ndecimals-=1;}} sp=split_number(bankersround(value,max-ndecimals)); a=sp[0];b=sp[1]; var digits=((a+b).replace(/^0+/,'')).length; if(!digits) digits=1; if(a.length>=max&&a!='0') return a; if(digitsgsize){ ret=symbol+value.substr(value.length-gsize)+ret; value=value.substr(0,value.length-gsize); gsize=this.grouping[1];} return value+ret;}; NumberPattern.prototype._format_frac=function(value,locale){ var min=this.frac_prec[0]; var max=this.frac_prec[1]; if(value.lengthmin&&value.substr(value.length-1)=='0') value=value.substr(0,value.length-1); return locale.decimal_symbol+value;};})(); function get_period_names(locale){ if(!locale) locale=_i18n_locale; return locale.periods;} function get_day_names(width,context,locale){ if(!width) width='wide'; if(!context) context='format'; if(!locale) locale=_i18n_locale; return locale.days[context][width];} function get_month_names(width,context,locale){ if(!width) width='wide'; if(!context) context='format'; if(!locale) locale=_i18n_locale; return locale.months[context][width];} function get_quarter_names(width,context,locale){ if(!width) width='wide'; if(!context) context='format'; if(!locale) locale=_i18n_locale; return locale.quarters[context][width];} function get_erar_names(width,locale){ if(!width) width='wide'; if(!locale) locale=_i18n_locale; return locale.eras[width];} function get_date_format(format,locale){ if(!format) format='medium'; if(!locale) locale=_i18n_locale; var dtp=locale.date_formats[format]; return new DateTimePattern(dtp.pattern,dtp.format);} function get_datetime_format(format,locale){ if(!format) format='medium'; if(!locale) locale=_i18n_locale; if(locale.datetime_formats[format]==undefined) return locale.datetime_formats[null]; return locale.datetime_formats[format];} function get_time_format(format,locale){ if(!format) format='medium'; if(!locale) locale=_i18n_locale; var dtp=locale.time_formats[format]; return new DateTimePattern(dtp.pattern,dtp.format);} var PATTERN_CHARS={'G':[1,2,3,4,5],'y':null,'Y':null,'u':null,'Q':[1,2,3,4],'q':[1,2,3,4],'M':[1,2,3,4,5],'L':[1,2,3,4,5],'w':[1,2],'W':[1],'d':[1,2],'D':[1,2,3],'F':[1],'g':null,'E':[1,2,3,4,5],'e':[1,2,3,4,5],'c':[1,3,4,5],'a':[1],'h':[1,2],'H':[1,2],'K':[1,2],'k':[1,2],'m':[1,2],'s':[1,2],'S':null,'A':null,'T':null,'z':[1,2,3,4],'Z':[1,2,3,4],'v':[1,4],'V':[1,4],'_':[1]}; function parse_datetime_pattern(pattern){ if(pattern instanceof DateTimePattern) return pattern; var result=[]; var quotebuf=null; var charbuf=[]; var fieldchar=['']; var fieldnum=[0]; function append_chars(){ result.push(charbuf.join('').replace('%','%%')); charbuf=[];} function append_field(){ var limit=PATTERN_CHARS[fieldchar[0]]; if(limit&&limit.indexOf(fieldnum[0])==-1){ return alert('Invalid length for field: '+fieldchar[0].repeat(fieldnum[0]));} result.push('%('+(fieldchar[0].repeat(fieldnum[0]))+')s'); fieldchar[0]=''; fieldnum[0]=0;} var patterntmp=pattern.replace("''",'\0'); for(var idx=0;idx=0?1:0; return get_era_names(width,this.locale)[era];}; DateTimeFormat.prototype.format_year=function(ch,num){ var value=this.value.year; if(ch==ch.toUpperCase()){ var week=this.get_week_number(this.get_day_of_year()); if(week==0) value-=1;} var year=this.format(value,num); if(num==2) year=year.substr(year.length-2); return year;}; DateTimeFormat.prototype.format_quarter=function(ch,num){ var quarter=Math.floor((this.value.month-1)/3+1); if(num<=2) return sprintf(sprintf('%%0%dd',num),quarter); var width={3:'abbreviated',4:'wide',5:'narrow'}[num]; var context={'Q':'format','q':'stand-alone'}[ch]; return get_quarter_names(width,context,this.locale)[quarter];}; DateTimeFormat.prototype.format_month=function(ch,num){ if(num<=2) return sprintf(sprintf('%%0%dd',num),this.value.month); var width={3:'abbreviated',4:'wide',5:'narrow'}[num]; var context={'M':'format','L':'stand-alone'}[ch]; return get_month_names(width,context,this.locale)[this.value.month];}; DateTimeFormat.prototype.format_week=function(ch,num){ if(ch==ch.toLowerCase()){ var day_of_year=this.get_day_of_year(); var week=this.get_week_number(day_of_year); if(week==0){ var date=this.value-timedelta(days=day_of_year); week=this.get_week_number(this.get_day_of_year(date),date.weekday());} return this.format(week,num);}else{ var mon_week=this.get_week_number(this.value.day); if(mon_week==0){ var mon_date=this.value-timedelta(days=this.value.day); mon_week=this.get_week_number(mon_date.day,mon_date.weekday());} return mon_week;}}; DateTimeFormat.prototype.format_weekday=function(ch,num){ if(num<3){ if(ch==ch.toLowerCase()){ var value=7-this.locale.first_week_day+this.value.weekday(); return this.format(value%7+1,num);} num=3;} var weekday=this.value.weekday(); var width={3:'abbreviated',4:'wide',5:'narrow'}[num]; var context={3:'format',4:'format',5:'stand-alone'}[num]; return get_day_names(width,context,this.locale)[weekday];}; DateTimeFormat.prototype.format_day_of_year=function(num){ return this.format(this.get_day_of_year(),num);}; DateTimeFormat.prototype.format_day_of_week_in_month=function(){ return((this.value.day-1)/7+1);}; DateTimeFormat.prototype.format_period=function(ch){ var period={0:'am',1:'pm'}[this.value.hour>=12?1:0]; return get_period_names(this.locale)[period];}; DateTimeFormat.prototype.format_frac_seconds=function(num){ var value=this.value.microsecond; return this.format(parseFloat('0.'+value)*Math.pow(10,num),num);}; DateTimeFormat.prototype.format_decimal_frac_seconds=function(num){ return this.format(this.value.microsecond,6).substr(0,num);}; DateTimeFormat.prototype.format_milliseconds_in_day=function(num){ var msecs=Math.floor(this.value.microsecond/1000)+this.value.second*1000+this.value.minute*60000+this.value.hour*3600000; return this.format(msecs,num);}; DateTimeFormat.prototype.format_timezone=function(ch,num){ return'';}; DateTimeFormat.prototype.format=function(value,length){ return sprintf(sprintf('%%0%dd',length),value);}; DateTimeFormat.prototype.get_day_of_year=function(date){ if(date==undefined) date=this.value; var yearstart=new Date(date.year,0,1); return Math.ceil((date.date-yearstart)/86400000)+1;}; DateTimeFormat.prototype.get_week_number=function(day_of_period,day_of_week){ if(day_of_week==undefined) day_of_week=this.value.weekday(); var first_day=(day_of_week-this.locale.first_week_day-day_of_period+1)%7; if(first_day<0) first_day+=7; var week_number=(day_of_period+first_day-1)/7; if(7-first_day>=this.locale.min_week_days) week_number+=1; return week_number;}; var _i18n_catalog={}; var _i18n_plural=undefined; function i18n_register(catalog){ _i18n_plural=catalog['plural']; for(var k in catalog['catalog']){ _i18n_catalog[k]=catalog['catalog'][k];}} function BaseTimeRangeFormatter(){ this.DATE_METHODS=[ {name:"year",getter:"getFullYear",setter:"setFullYear",minValue:"1974"}, {name:"month",getter:"getMonth",setter:"setMonth",minValue:"0"}, {name:"day",getter:"getDate",setter:"setDate",minValue:"1"}, {name:"hour",getter:"getHours",setter:"setHours",minValue:"0"}, {name:"minute",getter:"getMinutes",setter:"setMinutes",minValue:"0"}, {name:"second",getter:"getSeconds",setter:"setSeconds",minValue:"0"}, {name:"millisecond",getter:"getMilliseconds",setter:"setMilliseconds",minValue:"0"}];} BaseTimeRangeFormatter.prototype.get_summary_data=function(absEarliest,absLatest){ var differAtLevel=this.get_differing_level(absEarliest,absLatest); var valuesDifferAt=(differAtLevel=this.DATE_METHODS.length){ return{"rangeIsSingleUnitOf":false,"rangeIsIntegerUnitsOf":false,"valuesDifferAt":false,"valuesHighestNonMinimalAt":false};} var methodDict=this.DATE_METHODS[differAtLevel]; var earliestCopy; var highestNonMinimalLevel=this.get_highest_non_minimal_level(absEarliest,absLatest); var valuesHighestNonMinimalAt=(highestNonMinimalLevel=0;i--){ var methodDict=this.DATE_METHODS[i]; var name=methodDict.name; var minValue=methodDict.minValue; var earliestValue=absEarliest[methodDict["getter"]](); var latestValue=absLatest[methodDict["getter"]](); if(earliestValue!=minValue||latestValue!=minValue){ return i;}}}; BaseTimeRangeFormatter.prototype.get_differing_level=function(absEarliest,absLatest){ var differAtLevel=0; for(var i=0;i29)?1900:2000); break; case"%H": hr=parseInt(a[i],10); break; case"%M": min=parseInt(a[i],10); break; case"%S": sec=parseInt(a[i],10); break; default: break;}} if(y!=0&&m!=-1&&d!=0){ var ourDate=new Date(y,m,d,hr,min,sec); return ourDate;}else{ return false;}}, getTimezoneOffsetDelta:function(serverOffsetThen,d){ if(!Splunk.util.isInt(serverOffsetThen)){ return 0;} var clientOffsetThen=d.getTimezoneOffset()*60; serverOffsetThen=serverOffsetThen*-60; return 1000*(serverOffsetThen-clientOffsetThen);}, getEpochTimeFromISO:function(isoStr){ if(!this._isoTimeRegex){ this._isoTimeRegex=/([\+\-])?(\d{4,})(?:(?:\-(\d{2}))(?:(?:\-(\d{2}))(?:(?:[T ](\d{2}))(?:(?:\:(\d{2}))(?:(?:\:(\d{2}(?:\.\d+)?)))?)?(?:(Z)|([\+\-])(\d{2})(?:\:(\d{2}))?)?)?)?)?/;} var m=this._isoTimeRegex.exec(isoStr); var seconds,milliseconds; if(m[7]){ seconds=m[7].substring(0,2); millisecondsStr=m[7].substring(2);}else{ millisecondsStr="";} var offset=eval(m[9]+(60*m[10]+parseInt(m[11],10))); var str=sprintf("%s/%s/%s %s:%s:%s",m[3],m[4],m[2],m[5],m[6],seconds); var t=new Date(str); t.setTime(t.getTime()+this.getTimezoneOffsetDelta(offset,t)); var startTime=t.getTime()/1000; return startTime+millisecondsStr;}, getConfigValue:function(configKey,optionalDefault){ if(window.$C&&window.$C.hasOwnProperty(configKey))return window.$C[configKey]; else{ if(typeof optionalDefault!='undefined'){ return optionalDefault;} throw new Error('getConfigValue - '+configKey+' not set, no default provided');}}, make_url:function(){ var output='',seg,len; for(var i=0,l=arguments.length;i1&&seg.charAt(len-1)=='/'){ seg=seg.substring(0,len-1);} if(seg.charAt(0)!='/'){ output+='/'+seg;}else{ output+=seg;}} if(output!='/'){ var segments=output.split('/'); var firstseg=segments[1]; if(firstseg=='static'||firstseg=='modules'){ var postfix=output.substring(firstseg.length+2,output.length); output='/'+firstseg+'/@'+window.$C['BUILD_NUMBER']; if(window.$C['BUILD_PUSH_NUMBER'])output+='.'+window.$C['BUILD_PUSH_NUMBER']; if(segments[2]=='app') output+=':'+this.getConfigValue('APP_BUILD',0); output+='/'+postfix;}} var root=Splunk.util.getConfigValue('MRSPARKLE_ROOT_PATH','/'); var locale=Splunk.util.getConfigValue('LOCALE','en-US'); if(root==''||root=='/'){ return'/'+locale+output;}else{ return root+'/'+locale+output;}}, make_full_url:function(url,options){ url=this.make_url(url); if(options)url=url+'?'+this.propToQueryString(options); return url;}, redirect_to:function(uri,options,windowObj,focus){ uri=this.make_full_url(uri,options); if(!windowObj)windowObj=window; windowObj.document.location=uri; if(focus&&windowObj.focus)windowObj.focus(); return;}, getCurrentApp:function(){ return $(document.body).attr("s:app")||'UNKNOWN_APP';}, getCurrentView:function(){ return $(document.body).attr("s:view")||'UNKNOWN_VIEW';}, getCurrentDisplayView:function(){ return $(document.body).attr("s:displayview")||this.getCurrentView();}, getAutoCancelInterval:function(){ var interval=$(document.body).attr("s:autoCancelInterval"); if(!interval){ this.logger.error("no autoCancelInterval found. Returning 0"); interval=0;} return interval;}, getCurrentViewConfig:function(){ return $.extend({},Splunk.ViewConfig);}, getPath:function(path){ if(path===undefined){ path=document.location.pathname;} var locale=this.getConfigValue('LOCALE').toString(); if(!this.getConfigValue('LOCALE')||path.indexOf(locale)==-1){ return path;} var start=locale.length+path.indexOf(locale); return path.slice(start);}, getCumlativeOffsetTop:function(element){ if(!element)return 0; return element.offsetTop+this.getCumlativeOffsetTop(element.offsetParent);}, getCumlativeOffsetLeft:function(element){ if(!element)return 0; return element.offsetLeft+this.getCumlativeOffsetLeft(element.offsetParent);}, getPageYOffset:function(){ var pageYOffset=0; if(window.pageYOffset){ pageYOffset=window.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){ pageYOffset=document.documentElement.scrollTop;} return pageYOffset;}, getWindowDimensions:function(){ return{ width:(!isNaN(window.innerWidth))?window.innerWidth:document.documentElement.clientWidth||0, height:(!isNaN(window.innerHeight))?window.innerHeight:document.documentElement.clientHeight||0};}, getComputedStyleHelper:function(el,styleProperty){ if(el.currentStyle){ return el.currentStyle[styleProperty];}else if(window.getComputedStyle){ var cssProperty=styleProperty.replace(/([A-Z])/g,"-$1").toLowerCase(); var computedStyle=window.getComputedStyle(el,""); return computedStyle.getPropertyValue(cssProperty);}else{ return"";}}, getParameter:function(p,s){ s=s||window.location.search; if(!s){ return null;} if(!(s.indexOf(p+'=')+1)){ return null;} return s.split(p+'=')[1].split('&')[0];}, getHEX:function(rgb){ var parts=rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); var hex=(parts[1]<<16|parts[2]<<8|parts[3]).toString(16); return"#"+Array(6-hex.length).concat([hex]).toString().replace(/,/g,0);}, normalizeColor:function(color){ normalizedColor=null; if(color.charAt(0)==="#"){ if(color.length===4){ normalizedColor=color+color.charAt(1)+color.charAt(2)+color.charAt(3);}else{ normalizedColor=color;}}else{ try{ normalizedColor=this.getHEX(color);}catch(e){}} return normalizedColor;}, validateCronString:function(cronString){ var cronRegEx=/^(\*\/\d+|\*|\d+-\d+|\d+(,\d+)+|\d+)(\s(\*\/\d+|\*|\d+-\d+|\d+(,\d+)+|\d+)){4}$/; if(!cronRegEx.test(cronString)){ return false;} return true;}, turboInnerHTML:function(target,innerHTML){ var targetClone=target.cloneNode(false); targetClone.innerHTML=innerHTML; target.parentNode.replaceChild(targetClone,target); return targetClone;}, normalizeBoolean:function(test,strictMode){ if(typeof(test)=='string'){ test=test.toLowerCase();} switch(test){ case true: case 1: case'1': case'yes': case'on': case'true': return true; case false: case 0: case'0': case'no': case'off': case'false': return false; default: if(strictMode)throw TypeError("Unable to cast value into boolean: "+test); return test;}}, getCommaFormattedNumber:function(nStr){ nStr+=''; var x=nStr.split('.'); var x1=x[0]; var x2=x.length>1?'.'+x[1]:''; var rgx=/(\d+)(\d{3})/; while(rgx.test(x1)){ x1=x1.replace(rgx,'$1'+','+'$2');} return x1+x2;}, reLTrim:/^[\s\t\r\n]+/, reLTrimCommand:/^[\s\t\r\n\|]+/, reRNormalize:/[\s\t\r\n]+$/, addLeadingSearchCommand:function(q,isUserEntered){ var workingQ=''+q; workingQ=workingQ.replace(this.reLTrim,'').replace(this.reRNormalize,' '); if(workingQ.substring(0,1)=='|'){ return q;} if(!isUserEntered&&(workingQ.substring(0,7)=='search '&&workingQ.length>7)) { return q;} return'search '+workingQ;}, stripLeadingSearchCommand:function(q){ var workingQ=''+q; workingQ=workingQ.replace(this.reLTrimCommand,''); if(workingQ.substring(0,7)=='search '){ return workingQ.substring(7).replace(this.reLTrimCommand,'');} return q;}, stringToFieldList:function(strList){ if(typeof(strList)!='string'||!strList)return[]; var items=[]; var field_name_buffer=[]; var inquote=false; var str=$.trim(strList); for(var i=0,j=str.length;inextidx&&(str.charAt(nextidx)=='\\'||str.charAt(nextidx)=='"')){ field_name_buffer.push(str.charAt(nextidx)); i++; continue;}else{ field_name_buffer.push(str.charAt(i)); continue;}} if(str.charAt(i)=='"'){ if(!inquote){ inquote=true; continue;}else{ inquote=false; items.push(field_name_buffer.join('')); field_name_buffer=[]; continue;}} if((str.charAt(i)==' '||str.charAt(i)==',')&&!inquote){ if(field_name_buffer.length>0){ items.push(field_name_buffer.join(''));} field_name_buffer=[]; continue;} field_name_buffer.push(str.charAt(i));} if(field_name_buffer.length>0)items.push(field_name_buffer.join('')); return items;}, _sflQuotable:/([\\",\s])/, _sflEscapable:/([\\"])/g, fieldListToString:function(fieldArray){ if(!fieldArray)return''; var output=[]; for(var i=0,L=fieldArray.length;i-1){ v=v.replace(this._sflEscapable,"\\$1");} if(v.search(this._sflQuotable)>-1){ v=['"',v,'"'].join('');} output.push(v);}} return output.join(',');}, searchEscape:function(str){ if(!str.match(/[\s\,=|\[\]\"]/)) return str; return'"'+str.replace(/(\"|\\)/g,"\\$1")+'"';}, objectSimilarity:function(obj1,obj2){ if(obj1 instanceof Array&&obj2 instanceof Array){ if(obj1.length!==obj2.length){ return false;}else{ for(var i=0;i=clamp_time)return parseFloat(max_interval); return Math.min(max_interval*Math.pow(elapsed_time/parseFloat(clamp_time),3)+min_interval,max_interval);}, escapeHtml:function(input){ return(""+input).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''');}, escapeBackslash:function(input){ return(""+input).replace(/\\/g,'\\\\');}, escapeRegex:function(input){ return(input+'').replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");}, escapeSelector:function(input){ return(""+input).replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,'\\$1');}, trim:function(str,delim){ if(delim)return str.replace(new RegExp("^[\\s"+delim+"]+"),'').replace(new RegExp("[\\s"+delim+"]+$"),''); else return str.replace(/^\s\s*/,'').replace(/\s\s*$/,'');}, focusFirstField:function(popup){ var firstInput=$(":input:visible:enabled:first",popup), firstSelect=$("select:visible:enabled:first",popup), firstInputOffset=(firstInput.length)?firstInput.offset().top:false, firstSelectOffset=(firstSelect.length)?firstSelect.offset().top:false, firstElem=firstInput; if(firstInputOffset&&firstSelectOffset){ if(firstSelectOffsetlimit){ var r=[]; for(var i=0;i=len)?'':Array(1+len-str.length>>>0).join(chr); return leftJustify?str+padding:padding+str;}; var justify=function(value,prefix,leftJustify,minWidth,zeroPad){ var diff=minWidth-value.length; if(diff>0){ if(leftJustify||!zeroPad){ value=pad(value,minWidth,' ',leftJustify);}else{ value=value.slice(0,prefix.length)+pad('',diff,'0',true)+value.slice(prefix.length);}} return value;}; var formatBaseX=function(value,base,prefix,leftJustify,minWidth,precision,zeroPad){ var number=value>>>0; prefix=prefix&&number&&{'2':'0b','8':'0','16':'0x'}[base]||''; value=prefix+pad(number.toString(base),precision||0,'0',false); return justify(value,prefix,leftJustify,minWidth,zeroPad);}; var formatString=function(value,leftJustify,minWidth,precision,zeroPad){ if(precision!=null){ value=value.slice(0,precision);} return justify(value,'',leftJustify,minWidth,zeroPad);}; var doFormat=function(substring,valueIndex,valueName,flags,minWidth,_,precision,type){ if(substring=='%%')return'%'; var leftJustify=false,positivePrefix='',zeroPad=false,prefixBaseX=false; var flagsl=flags.length; for(var j=0;flags&&j-1?6:(type=='d')?0:void(0);}else if(precision=='*'){ precision=+a[i]; i++;}else if(precision.charAt(0)=='*'){ precision=+a[precision.slice(1,-1)];}else{ precision=+precision;} var value; if(valueName){ valueName=valueName.substr(1,valueName.length-2); value=a[1].__getitem__?a[1].__getitem__(valueName):a[1][valueName];}else{ if(valueIndex){ value=a[valueIndex.slice(0,-1)];} else { value=a[i]; i++;}} var number; var prefix; switch(type){ case's':return formatString(String(value),leftJustify,minWidth,precision,zeroPad); case'c':return formatString(String.fromCharCode(+value),leftJustify,minWidth,precision,zeroPad); case'b':return formatBaseX(value,2,prefixBaseX,leftJustify,minWidth,precision,zeroPad); case'o':return formatBaseX(value,8,prefixBaseX,leftJustify,minWidth,precision,zeroPad); case'x':return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad); case'X':return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad).toUpperCase(); case'u':return formatBaseX(value,10,prefixBaseX,leftJustify,minWidth,precision,zeroPad); case'i': case'd':{ number=parseInt(+value,10); prefix=number<0?'-':positivePrefix; value=prefix+pad(String(Math.abs(number)),precision,'0',false); return justify(value,prefix,leftJustify,minWidth,zeroPad);} case'e': case'E': case'f': case'F': case'g': case'G': { number=+value; prefix=number<0?'-':positivePrefix; var method=['toExponential','toFixed','toPrecision']['efg'.indexOf(type.toLowerCase())]; var textTransform=['toString','toUpperCase']['eEfFgG'.indexOf(type)%2]; value=prefix+Math.abs(number)[method](precision); return justify(value,prefix,leftJustify,minWidth,zeroPad)[textTransform]();} default:return substring;}}; return format.replace(regex,doFormat);}; (function($){ var addMethods=function(source){ var ancestor=this.superclass&&this.superclass.prototype; var properties=$.keys(source); if(!$.keys({toString:true}).length)properties.push("toString","valueOf"); for(var i=0,length=properties.length;i0)) return rules[selector].apply(this,[target].concat($.makeArray(arguments)));}}}}); var bindEvents=function(instance){ for(var member in instance){ if(member.match(/^on(.+)/)&&typeof instance[member]=='function'){ instance.element.bind(RegExp.$1,$.bind(instance[member],instance));}}} var behaviorWrapper=function(behavior){ return $.klass(behavior,{ initialize:function($super,element,args){ this.element=$(element); if($super)$super.apply(this,args);}});} var attachBehavior=function(el,behavior,args){ var wrapper=behaviorWrapper(behavior); instance=new wrapper(el,args); bindEvents(instance); if(!behavior.instances)behavior.instances=[]; behavior.instances.push(instance); return instance;}; $.fn.extend({ attach:function(){ var args=$.makeArray(arguments),behavior=args.shift(); if($.livequery&&this.selector){ return this.livequery(function(){ attachBehavior(this,behavior,args);});}else{ return this.each(function(){ attachBehavior(this,behavior,args);});}}, attachAndReturn:function(){ var args=$.makeArray(arguments),behavior=args.shift(); return $.map(this,function(el){ return attachBehavior(el,behavior,args);});}, delegate:function(type,rules){ return this.bind(type,$.delegate(rules));}, attached:function(behavior){ var instances=[]; if(!behavior.instances)return instances; this.each(function(i,element){ $.each(behavior.instances,function(i,instance){ if(instance.element.get(0)==element)instances.push(instance);});}); return instances;}, firstAttached:function(behavior){ return this.attached(behavior)[0];}}); Remote=$.klass({ initialize:function(options){ if(this.element.attr('nodeName')=='FORM')this.element.attach(Remote.Form,options); else this.element.attach(Remote.Link,options);}}); Remote.Base=$.klass({ initialize:function(options){ this.options=$.extend({},options||{});}, _makeRequest:function(options){ $.ajax(options); return false;}}); Remote.Link=$.klass(Remote.Base,{ onclick:function(){ var options=$.extend({url:this.element.attr('href'),type:'GET'},this.options); return this._makeRequest(options);}}); Remote.Form=$.klass(Remote.Base,{ onclick:function(e){ var target=e.target; if($.inArray(target.nodeName.toLowerCase(),['input','button'])>=0&&target.type.match(/submit|image/)) this._submitButton=target;}, onsubmit:function(){ var data=this.element.serializeArray(); if(this._submitButton)data.push({name:this._submitButton.name,value:this._submitButton.value}); var options=$.extend({ url:this.element.attr('action'), type:this.element.attr('method')||'GET', data:data},this.options); this._makeRequest(options); return false;}}); $.ajaxSetup({ beforeSend:function(xhr){ xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*");}});})(jQuery);; if(!this.JSON){ JSON={};} (function(){ function f(n){ return n<10?'0'+n:n;} if(typeof Date.prototype.toJSON!=='function'){ Date.prototype.toJSON=function(key){ return this.getUTCFullYear()+'-'+ f(this.getUTCMonth()+1)+'-'+ f(this.getUTCDate())+'T'+ f(this.getUTCHours())+':'+ f(this.getUTCMinutes())+':'+ f(this.getUTCSeconds())+'Z';}; String.prototype.toJSON= Number.prototype.toJSON= Boolean.prototype.toJSON=function(key){ return this.valueOf();};} var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'}, rep; function quote(string){ escapable.lastIndex=0; return escapable.test(string)?'"'+string.replace(escapable,function(a){ var c=meta[a]; return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';} function str(key,holder){ var i, k, v, length, mind=gap, partial, value=holder[key]; if(value&&typeof value==='object'&& typeof value.toJSON==='function'){ value=value.toJSON(key);} if(typeof rep==='function'){ value=rep.call(holder,key,value);} switch(typeof value){ case'string': return quote(value); case'number': return isFinite(value)?String(value):'null'; case'boolean': case'null': return String(value); case'object': if(!value){ return'null';} gap+=indent; partial=[]; if(Object.prototype.toString.apply(value)==='[object Array]'){ length=value.length; for(i=0;i0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab'); for(var i=0;i','', escapeHTML(name),'',''); appendObject(value,html); html.push('');} html.push(''); logRow(html,"dir");}, dirxml:function(node) { var html=[]; appendNode(node,html); logRow(html,"dirxml");}, group:function() { logRow(arguments,"group",pushGroup);}, groupEnd:function() { logRow(arguments,"",popGroup);}, time:function(name) { timeMap[name]=(new Date()).getTime();}, timeEnd:function(name) { if(name in timeMap) { var delta=(new Date()).getTime()-timeMap[name]; logFormatted([name+":",delta+"ms"]); delete timeMap[name];}}, count:function() { this.warn(["count() not supported."]);}, trace:function() { this.warn(["trace() not supported."]);}, profile:function() { this.warn(["profile() not supported."]);}, profileEnd:function() {}, clear:function() { consoleBody.innerHTML="";}, open:function() { toggleConsole(true);}, close:function() { if(frameVisible) toggleConsole();}}; var consoleFrame=null; var consoleBody=null; var commandLine=null; var frameVisible=false; var messageQueue=[]; var groupStack=[]; var timeMap={}; var clPrefix=">>> "; var isFirefox=navigator.userAgent.indexOf("Firefox")!=-1; var isIE=navigator.userAgent.indexOf("MSIE")!=-1; var isOpera=navigator.userAgent.indexOf("Opera")!=-1; var isSafari=navigator.userAgent.indexOf("AppleWebKit")!=-1; function toggleConsole(forceOpen) { frameVisible=forceOpen||!frameVisible; if(consoleFrame) consoleFrame.style.visibility=frameVisible?"visible":"hidden"; else waitForBody();} function focusCommandLine() { toggleConsole(true); if(commandLine) commandLine.focus();} function waitForBody() { if(document.body) createFrame(); else setTimeout(waitForBody,200);} function createFrame() { if(consoleFrame) return; window.onFirebugReady=function(doc) { window.onFirebugReady=null; var toolbar=doc.getElementById("toolbar"); toolbar.onmousedown=onSplitterMouseDown; commandLine=doc.getElementById("commandLine"); addEvent(commandLine,"keydown",onCommandLineKeyDown); addEvent(doc,isIE||isSafari?"keydown":"keypress",onKeyDown); consoleBody=doc.getElementById("log"); layout(); flush();} var baseURL=getFirebugURL(); consoleFrame=document.createElement("iframe"); consoleFrame.setAttribute("src",baseURL+"/html/firebug.html"); consoleFrame.setAttribute("frameBorder","0"); consoleFrame.style.visibility=(frameVisible?"visible":"hidden"); consoleFrame.style.zIndex="2147483583"; consoleFrame.style.position=document.all?"absolute":"fixed"; consoleFrame.style.width="100%"; consoleFrame.style.left="0"; consoleFrame.style.bottom="0"; consoleFrame.style.height="200px"; document.body.appendChild(consoleFrame);} function getFirebugURL() { if(Splunk&&Splunk.util&&Splunk.util.make_url){ return Splunk.util.make_url('/static');}else{ return'/en-US/static';}} function evalCommandLine() { var text=commandLine.value; commandLine.value=""; logRow([clPrefix,text],"command"); var value; try { value=eval(text);} catch(exc) {} console.log(value);} function layout() { var toolbar=consoleBody.ownerDocument.getElementById("toolbar"); var height=consoleFrame.offsetHeight-(toolbar.offsetHeight+commandLine.offsetHeight); height=height<0?0:height; consoleBody.style.top=toolbar.offsetHeight+"px"; consoleBody.style.height=height+"px"; commandLine.style.top=(consoleFrame.offsetHeight-commandLine.offsetHeight)+"px";} function logRow(message,className,handler) { if(consoleBody) writeMessage(message,className,handler); else { messageQueue.push([message,className,handler]); waitForBody();}} function flush() { var queue=messageQueue; messageQueue=[]; for(var i=0;i=consoleBody.scrollHeight; if(!handler) handler=writeRow; handler(message,className); if(isScrolledToBottom) consoleBody.scrollTop=consoleBody.scrollHeight-consoleBody.offsetHeight;} function appendRow(row) { var container=groupStack.length?groupStack[groupStack.length-1]:consoleBody; container.appendChild(row);} function writeRow(message,className) { var row=consoleBody.ownerDocument.createElement("div"); row.className="logRow"+(className?" logRow-"+className:""); row.innerHTML=message.join(""); appendRow(row);} function pushGroup(message,className) { logFormatted(message,className); var groupRow=consoleBody.ownerDocument.createElement("div"); groupRow.className="logGroup"; var groupRowBox=consoleBody.ownerDocument.createElement("div"); groupRowBox.className="logGroupBox"; groupRow.appendChild(groupRowBox); appendRow(groupRowBox); groupStack.push(groupRowBox);} function popGroup() { groupStack.pop();} function logFormatted(objects,className) { var html=[]; var format=objects[0]; var objIndex=0; if(typeof(format)!="string") { format=""; objIndex=-1;} var parts=parseFormat(format); for(var i=0;i": return">"; case"&": return"&"; case"'": return"'"; case'"': return""";} return"?";}; return String(value).replace(/[<>&"']/g,replaceChars);} function objectToString(object) { try { return object+"";} catch(exc) { return null;}} function appendText(object,html) { html.push(escapeHTML(objectToString(object)));} function appendNull(object,html) { html.push('',escapeHTML(objectToString(object)),'');} function appendString(object,html) { html.push('"',escapeHTML(objectToString(object)),'"');} function appendInteger(object,html) { html.push('',escapeHTML(objectToString(object)),'');} function appendFloat(object,html) { html.push('',escapeHTML(objectToString(object)),'');} function appendFunction(object,html) { var reName=/function ?(.*?)\(/; var m=reName.exec(objectToString(object)); var name=m?m[1]:"function"; html.push('',escapeHTML(name),'()');} function appendObject(object,html) { try { if(object==undefined) appendNull("undefined",html); else if(object==null) appendNull("null",html); else if(typeof object=="string") appendString(object,html); else if(typeof object=="number") appendInteger(object,html); else if(typeof object=="function") appendFunction(object,html); else if(object.nodeType==1) appendSelector(object,html); else if(typeof object=="object") appendObjectFormatted(object,html); else appendText(object,html);} catch(exc) {}} function appendObjectFormatted(object,html) { var text=objectToString(object); var reObject=/\[object (.*?)\]/; var m=reObject.exec(text); html.push('',m?m[1]:text,'')} function appendSelector(object,html) { html.push(''); html.push('',escapeHTML(object.nodeName.toLowerCase()),''); if(object.id) html.push('#',escapeHTML(object.id),''); if(object.className) html.push('.',escapeHTML(object.className),''); html.push('');} function appendNode(node,html) { if(node.nodeType==1) { html.push('
','<',node.nodeName.toLowerCase(),''); for(var i=0;i',attr.nodeName.toLowerCase(),'="',escapeHTML(attr.nodeValue),'"')} if(node.firstChild) { html.push('>
'); for(var child=node.firstChild;child;child=child.nextSibling) appendNode(child,html); html.push('
</', node.nodeName.toLowerCase(),'>
');} else html.push('/>');} else if(node.nodeType==3) { html.push('
',escapeHTML(node.nodeValue),'
');}} function addEvent(object,name,handler) { if(document.all) object.attachEvent("on"+name,handler); else object.addEventListener(name,handler,false);} function removeEvent(object,name,handler) { if(document.all) object.detachEvent("on"+name,handler); else object.removeEventListener(name,handler,false);} function cancelEvent(event) { if(document.all) event.cancelBubble=true; else event.stopPropagation();} function onError(msg,href,lineNo) { var html=[]; var lastSlash=href.lastIndexOf("/"); var fileName=lastSlash==-1?href:href.substr(lastSlash+1); html.push('',msg,'',''); logRow(html,"error");}; function onKeyDown(event) { if(event.keyCode==123) toggleConsole(); else if((event.keyCode==108||event.keyCode==76)&&event.shiftKey&&(event.metaKey||event.ctrlKey)) focusCommandLine(); else return; cancelEvent(event);} function onSplitterMouseDown(event) { if(isSafari||isOpera) return; addEvent(document,"mousemove",onSplitterMouseMove); addEvent(document,"mouseup",onSplitterMouseUp); for(var i=0;i=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);; (function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);; (function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create: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")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, _mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.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";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, 10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), 10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.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,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), 10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, (a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!="hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), 10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= {width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false}, _mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f, {top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight: Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(cb.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left= null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+ a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+ c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]); b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(), 10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top- f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType? e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a= e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing, step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement= e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset; var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left: a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top- d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition, f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25, display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b= e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height= d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery);; (function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable"); this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top, left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b= this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f= d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")|| 0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out", a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h- f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g- this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this, this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop", a,this._uiHash());for(e=0;e'))}function N(a){return a.bind("mouseout", function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv}, setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('
'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f==""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker(): d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a, b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+= 1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/ 2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b= d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e= a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f== a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input", a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b); c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing= true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}); a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(), h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b= this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, _checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): 0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a); this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField"); if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"? b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd", COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames: null)||this._defaults.monthNames;var i=function(o){(o=k+1 12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&& a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay? new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a)); n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m, g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+s+"":f?"":''+s+"";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&& a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
'+(c?h:"")+(this._isInRange(a,s)?'":"")+(c?"":h)+"
":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='
'+(/all|left/.test(t)&& x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'
';var z=j?'":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+""}y+=z+"";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q";var R=!j?"":'";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&ro;R+='";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
'+this._get(a,"weekHeader")+"
'+this._get(a,"calculateWeek")(r)+""+(F&&!D?" ":L?''+ r.getDate()+"":''+r.getDate()+"")+"
"+(l?""+(i[0]>0&&G==i[1]-1?'
':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ (c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery);;; (function($){ $.extend({ tablesorter:new function(){ var parsers=[],widgets=[]; this.defaults={ cssHeader:"header", cssAsc:"headerSortUp", cssDesc:"headerSortDown", sortInitialOrder:"asc", sortMultiSortKey:"shiftKey", sortForce:null, sortAppend:null, textExtraction:"simple", parsers:{}, widgets:[], widgetZebra:{css:["even","odd"]}, headers:{}, widthFixed:false, cancelSelection:true, sortList:[], headerList:[], dateFormat:"us", decimal:'.', debug:false}; function benchmark(s,d){ log(s+","+(new Date().getTime()-d.getTime())+"ms");} this.benchmark=benchmark; function log(s){ if(typeof console!="undefined"&&typeof console.debug!="undefined"){ console.log(s);}else{ alert(s);}} function buildParserCache(table,$headers){ if(table.config.debug){var parsersDebug="";} var rows=table.tBodies[0].rows; if(table.tBodies[0].rows[0]){ var list=[],cells=rows[0].cells,l=cells.length; for(var i=0;i1){ arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{ if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){ arr.push(cell);}}} return arr;}; function checkHeaderMetadata(cell){ if(($.metadata)&&($(cell).metadata().sorter===false)){return true;}; return false;} function checkHeaderOptions(table,i){ if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;}; return false;} function applyWidget(table){ var c=table.config.widgets; var l=c.length; for(var i=0;i'); $("tr:first td",table.tBodies[0]).each(function(){ colgroup.append($('').css('width',$(this).width()));}); $(table).prepend(colgroup);};} function updateHeaderSortCount(table,sortList){ var c=table.config,l=sortList.length; for(var i=0;ib)?1:0));}; function sortTextDesc(a,b){ return((ba)?1:0));}; function sortNumeric(a,b){ return a-b;}; function sortNumericDesc(a,b){ return b-a;}; function getCachedSortType(parsers,i){ return parsers[i].type;}; this.construct=function(settings){ return this.each(function(){ if(!this.tHead||!this.tBodies)return; var $this,$document,$headers,cache,config,shiftDown=0,sortOrder; this.config={}; config=$.extend(this.config,$.tablesorter.defaults,settings); $this=$(this); $headers=buildHeaders(this); this.config.parsers=buildParserCache(this,$headers); cache=buildCache(this); var sortCSS=[config.cssDesc,config.cssAsc]; fixColumnWidth(this); $headers.click(function(e){ $this.trigger("sortStart"); var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0; if(!this.sortDisabled&&totalRows>0){ var $cell=$(this); var i=this.column; this.order=this.count++%2; if(!e[config.sortMultiSortKey]){ config.sortList=[]; if(config.sortForce!=null){ var a=config.sortForce; for(var j=0;j0){ $this.trigger("sorton",[config.sortList]);} applyWidget(this);});}; this.addParser=function(parser){ var l=parsers.length,a=true; for(var i=0;i';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c}})(jQuery);; jQuery.cookie=function(name,value,options){ if(typeof value!='undefined'){ options=options||{}; if(value===null){ value=''; options.expires=-1;} var expires=''; if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){ var date; if(typeof options.expires=='number'){ date=new Date(); date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{ date=options.expires;} expires='; expires='+date.toUTCString();} var path=options.path?'; path='+(options.path):''; var domain=options.domain?'; domain='+(options.domain):''; var secure=options.secure?'; secure':''; document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{ var cookieValue=null; if(document.cookie&&document.cookie!=''){ var cookies=document.cookie.split(';'); for(var i=0;i=0?'&':'?')+q; options.data=null;} else{ options.data=q;} var 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){ var fn=options.replaceTarget?'replaceWith':'html'; $(options.target)[fn](data).each(oldSuccess,arguments);});} else if(options.success){ callbacks.push(options.success);} options.success=function(data,status,xhr){ var context=options.context||options; for(var i=0,max=callbacks.length;i0; var mp='multipart/form-data'; var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp); if(options.iframe!==false&&(fileInputs||options.iframe||multipart)){ if(options.closeKeepAlive){ $.get(options.closeKeepAlive,function(){fileUpload(a);});} else{ fileUpload(a);}} else{ if($.browser.msie&&method=='get'){ var ieMeth=$form[0].getAttribute('method'); if(typeof ieMeth==='string') options.type=ieMeth;} $.ajax(options);} this.trigger('form-submit-notify',[this,options]); return this; function fileUpload(a){ var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle; var useProp=!!$.fn.prop; if(a){ for(i=0;i'); $io.css({position:'absolute',top:'-1000px',left:'-1000px'});} io=$io[0]; xhr={ aborted:0, responseText:null, responseXML:null, status:0, statusText:'n/a', getAllResponseHeaders:function(){}, getResponseHeader:function(){}, setRequestHeader:function(){}, abort:function(status){ var e=(status==='timeout'?'timeout':'aborted'); log('aborting upload... '+e); this.aborted=1; $io.attr('src',s.iframeSrc); xhr.error=e; s.error&&s.error.call(s.context,xhr,e,status); g&&$.event.trigger("ajaxError",[xhr,s,e]); s.complete&&s.complete.call(s.context,xhr,e);}}; g=s.global; if(g&&!$.active++){ $.event.trigger("ajaxStart");} if(g){ $.event.trigger("ajaxSend",[xhr,s]);} if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){ if(s.global){ $.active--;} return;} if(xhr.aborted){ return;} sub=form.clk; if(sub){ n=sub.name; if(n&&!sub.disabled){ s.extraData=s.extraData||{}; s.extraData[n]=sub.value; if(sub.type=="image"){ s.extraData[n+'.x']=form.clk_x; s.extraData[n+'.y']=form.clk_y;}}} var CLIENT_TIMEOUT_ABORT=1; var SERVER_ABORT=2; function getDoc(frame){ var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document; return doc;} function doSubmit(){ var t=$form.attr('target'),a=$form.attr('action'); form.setAttribute('target',id); if(!method){ form.setAttribute('method','POST');} if(a!=s.url){ form.setAttribute('action',s.url);} if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){ $form.attr({ encoding:'multipart/form-data', enctype:'multipart/form-data'});} if(s.timeout){ timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);} function checkState(){ try{ var state=getDoc(io).readyState; log('state = '+state); if(state&&state.toLowerCase()=='uninitialized') setTimeout(checkState,50);} catch(e){ log('Server abort: ',e,' (',e.name,')'); cb(SERVER_ABORT); timeoutHandle&&clearTimeout(timeoutHandle); timeoutHandle=undefined;}} var extraInputs=[]; try{ if(s.extraData){ for(var n in s.extraData){ extraInputs.push( $('').attr('value',s.extraData[n]).appendTo(form)[0]);}} if(!s.iframeTarget){ $io.appendTo('body'); io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);} setTimeout(checkState,15); form.submit();} finally{ form.setAttribute('action',a); if(t){ form.setAttribute('target',t);}else{ $form.removeAttr('target');} $(extraInputs).remove();}} if(s.forceSync){ doSubmit();} else{ setTimeout(doSubmit,10);} var data,doc,domCheckCount=50,callbackProcessed; function cb(e){ if(xhr.aborted||callbackProcessed){ return;} try{ doc=getDoc(io);} catch(ex){ log('cannot access response document: ',ex); e=SERVER_ABORT;} if(e===CLIENT_TIMEOUT_ABORT&&xhr){ xhr.abort('timeout'); return;} else if(e==SERVER_ABORT&&xhr){ xhr.abort('server abort'); return;} if(!doc||doc.location.href==s.iframeSrc){ if(!timedOut) return;} io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false); var status='success',errMsg; try{ if(timedOut){ throw'timeout';} var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc); log('isXml='+isXml); if(!isXml&&window.opera&&(doc.body==null||doc.body.innerHTML=='')){ if(--domCheckCount){ log('requeing onLoad callback, DOM not available'); setTimeout(cb,250); return;}} var docRoot=doc.body?doc.body:doc.documentElement; xhr.responseText=docRoot?docRoot.innerHTML:null; xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc; if(isXml) s.dataType='xml'; xhr.getResponseHeader=function(header){ var headers={'content-type':s.dataType}; return headers[header];}; if(docRoot){ xhr.status=Number(docRoot.getAttribute('status'))||xhr.status; xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;} var dt=s.dataType||''; var scr=/(json|script|text)/.test(dt.toLowerCase()); if(scr||s.textarea){ var ta=doc.getElementsByTagName('textarea')[0]; if(ta){ xhr.responseText=ta.value; xhr.status=Number(ta.getAttribute('status'))||xhr.status; xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;} else if(scr){ var pre=doc.getElementsByTagName('pre')[0]; var b=doc.getElementsByTagName('body')[0]; if(pre){ xhr.responseText=pre.textContent?pre.textContent:pre.innerHTML;} else if(b){ xhr.responseText=b.innerHTML;}}} else if(s.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){ xhr.responseXML=toXml(xhr.responseText);} try{ data=httpData(xhr,s.dataType,s);} catch(e){ status='parsererror'; xhr.error=errMsg=(e||status);}} catch(e){ log('error caught: ',e); status='error'; xhr.error=errMsg=(e||status);} if(xhr.aborted){ log('upload aborted'); status=null;} if(xhr.status){ status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';} if(status==='success'){ s.success&&s.success.call(s.context,data,'success',xhr); g&&$.event.trigger("ajaxSuccess",[xhr,s]);} else if(status){ if(errMsg==undefined) errMsg=xhr.statusText; s.error&&s.error.call(s.context,xhr,status,errMsg); g&&$.event.trigger("ajaxError",[xhr,s,errMsg]);} g&&$.event.trigger("ajaxComplete",[xhr,s]); if(g&&!--$.active){ $.event.trigger("ajaxStop");} s.complete&&s.complete.call(s.context,xhr,status); callbackProcessed=true; if(s.timeout) clearTimeout(timeoutHandle); setTimeout(function(){ if(!s.iframeTarget) $io.remove(); xhr.responseXML=null;},100);} var toXml=$.parseXML||function(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.nodeName!='parsererror')?doc:null;}; var parseJSON=$.parseJSON||function(s){ return window['eval']('('+s+')');}; var httpData=function(xhr,type,s){ var ct=xhr.getResponseHeader('content-type')||'', xml=type==='xml'||!type&&ct.indexOf('xml')>=0, data=xml?xhr.responseXML:xhr.responseText; if(xml&&data.documentElement.nodeName==='parsererror'){ $.error&&$.error('parsererror');} if(s&&s.dataFilter){ data=s.dataFilter(data,type);} if(typeof data==='string'){ if(type==='json'||!type&&ct.indexOf('json')>=0){ data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){ $.globalEval(data);}} return data;};}}; $.fn.ajaxForm=function(options){ if(this.length===0){ var o={s:this.selector,c:this.context}; if(!$.isReady&&o.s){ log('DOM not ready, queuing ajaxForm'); $(function(){ $(o.s,o.c).ajaxForm(options);}); return this;} log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)')); return this;} return this.ajaxFormUnbind().bind('submit.form-plugin',function(e){ if(!e.isDefaultPrevented()){ e.preventDefault(); $(this).ajaxSubmit(options);}}).bind('click.form-plugin',function(e){ var target=e.target; var $el=$(target); if(!($el.is(":submit,input:image"))){ var t=$el.closest(':submit'); if(t.length==0){ return;} target=t[0];} var form=this; form.clk=target; if(target.type=='image'){ if(e.offsetX!=undefined){ form.clk_x=e.offsetX; form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){ var offset=$el.offset(); form.clk_x=e.pageX-offset.left; form.clk_y=e.pageY-offset.top;}else{ form.clk_x=e.pageX-target.offsetLeft; form.clk_y=e.pageY-target.offsetTop;}} setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);});}; $.fn.ajaxFormUnbind=function(){ return this.unbind('submit.form-plugin click.form-plugin');}; $.fn.formToArray=function(semantic){ var a=[]; if(this.length===0){ return a;} var form=this[0]; var els=semantic?form.getElementsByTagName('*'):form.elements; if(!els){ return a;} var i,j,n,v,el,max,jmax; for(i=0,max=els.length;i';}, _buttonHtml:function(){ return''+'';}, _start:function(event){ if(!this.spinning&&this._trigger('start',event,{value:this.value()})!==false){ if(!this.counter){ this.counter=1;} this.spinning=true; return true;} return false}, _spin:function(step,event){ if(this.options.disabled){ return;} if(!this.counter){ this.counter=1;} var newVal=this._value()+step*(this.options.incremental&&this.counter>100?this.counter>200?100:10:1); if(this._trigger('spin',event,{value:newVal})!==false){ this._value(newVal); this.counter++;}}, _stop:function(event){ this.counter=0; if(this.timer){ window.clearInterval(this.timer);} this.element[0].focus(); this.spinning=false; this._trigger('stop',event);}, _change:function(event){ this._trigger('change',event);}, _repeat:function(i,steps,event){ var self=this; i=i||100; if(this.timer){ window.clearInterval(this.timer);} this.timer=window.setInterval(function(){ self._repeat(self.options.incremental&&self.counter>20?20:i,steps,event);},i); self._spin(steps*self._step(),event);}, _keydown:function(event){ var o=this.options, KEYS=$.ui.keyCode; switch(event.keyCode){ case KEYS.UP:this._repeat(null,event.shiftKey?o.page:1,event);break; case KEYS.DOWN:this._repeat(null,event.shiftKey?-o.page:-1,event);break; case KEYS.PAGE_UP:this._repeat(null,o.page,event);break; case KEYS.PAGE_DOWN:this._repeat(null,-o.page,event);break; case KEYS.HOME:this._value(this._min());break; case KEYS.END:this._value(this._max());break; case KEYS.TAB: case KEYS.BACKSPACE: case KEYS.LEFT: case KEYS.RIGHT: case KEYS.PERIOD: case KEYS.NUMPAD_DECIMAL: case KEYS.NUMPAD_SUBTRACT: return true; case KEYS.ENTER: this.value(this.element.val()); return true; default: if((event.keyCode>=96&&event.keyCode<=105)|| (new RegExp('['+this._validChars()+']','i').test(String.fromCharCode(event.keyCode)))){ return true;};} return false;}, _mousewheel:function(){ var self=this; if($.fn.mousewheel&&self.options.mouseWheel){ this.element.mousewheel(function(event,delta){ delta=($.browser.opera?-delta/Math.abs(delta):delta); if(!self._start(event)){ return false;} self._spin((delta>0?1:-1)*self._step(),event); if(self.timeout){ window.clearTimeout(self.timeout);} self.timeout=window.setTimeout(function(){ if(self.spinning){ self._stop(event); self._change(event);}},400); event.preventDefault();});}}, _value:function(newVal){ if(!arguments.length){ return this._parse(this.element.val());} this._setData('value',newVal);}, _getData:function(key){ switch(key){ case'min': case'max': case'step': return this['_'+key](); break;} return $.widget.prototype._getData.call(this,key);}, _setData:function(key,value){ switch(key){ case'value': value=this._parse(value); if(valuethis._max()){ value=this._max();} break; case'spinnerClass': this.uiSpinner.removeClass(this.options.spinnerClass).addClass(uiSpinnerClasses+value); break;} $.widget.prototype._setData.call(this,key,value); this._afterSetData(key,value); this._aria();}, _afterSetData:function(key,value){ switch(key){ case'buttons': this._hide('hide'); break; case'max': case'min': case'step': if(value!=null){ if(this.element.attr(key)){ this.element.attr(key,value);}} break; case'width': this.element.width(value); break; case'precision': case'value': this._format(this._parse(this.options.value)); break;}}, _aria:function(){ this.uiSpinner&&this.uiSpinner.attr('aria-valuemin',this._min()).attr('aria-valuemax',this._max()).attr('aria-valuenow',this.value());}, _validChars:function(){ var radix=parseInt(this.options.radix); return'\\-\\'+this.options.radixPoint+(this.options.groupSeparator?'\\'+this.options.groupSeparator:'')+(radix<10?'0-'+radix:'0-9'+(radix>10?'a-'+String.fromCharCode('a'.charCodeAt(0)+radix-11):''));}, _parse:function(val){ if(typeof val=='string'){ if(this.options.groupSeparator){ val=val.replace(new RegExp('\\'+this.options.groupSeparator,'g'),'');} val=val.replace(new RegExp('[^'+this._validChars()+']','gi'),'').split(this.options.radixPoint); result=parseInt(val[0]=='-'?0:val[0]||0,this.options.radix); if(val.length>1){ result+=parseInt(val[1],this.options.radix)/Math.pow(this.options.radix,val[1].length)* (val[0].substr(0,1)=='-'?-1:1);} val=result;} return isNaN(val)?null:val;}, _format:function(num){ var regex=/(\d+)(\d{3})/, options=this.options, sym=options.currency||'', dec=options.precision, radix=options.radix, group=options.groupSeparator, pt=options.radixPoint, neg=num<0?'-':''; for( num=( isNaN(num)?options.value:radix===10?parseFloat(num,radix).toFixed(dec):parseInt(num,radix)).toString(radix).replace('.',pt); regex.test(num)&&group; num=num.replace(regex,'$1'+group+'$2')); result=num.replace('-',''); while(options.padding&&(result.length');var tiptip_content=$('
');var tiptip_arrow=$('
');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('
')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);;;(function($,iphoneStyle){ $[iphoneStyle]=function(elem,options){ this.$elem=$(elem); var obj=this; $.each(options,function(key,value){ obj[key]=value;}); this.wrapCheckboxWithDivs(); this.attachEvents(); this.disableTextSelection(); if(this.resizeHandle){this.optionallyResize('handle');} if(this.resizeContainer){this.optionallyResize('container');} this.initialPosition();}; $.extend($[iphoneStyle].prototype,{ wrapCheckboxWithDivs:function(){ this.$elem.wrap('
'); this.container=this.$elem.parent(); this.offLabel=$(''+''+this.uncheckedLabel+''+'').appendTo(this.container); this.offSpan=this.offLabel.children('span'); this.onLabel=$(''+''+this.checkedLabel+''+'').appendTo(this.container); this.onSpan=this.onLabel.children('span'); this.handle=$('
'+'
'+'
'+'
'+'
').appendTo(this.container);}, disableTextSelection:function(){ if(!$.browser.msie){return;} $.each([this.handle,this.offLabel,this.onLabel,this.container],function(i,el){ $(el).attr("unselectable","on");});}, optionallyResize:function(mode){ var onLabelWidth=this.onLabel.width(), offLabelWidth=this.offLabel.width(), newWidth=(onLabelWidth1){p=1;} obj.handle.css({left:p*obj.rightSide}); obj.onLabel.css({width:p*obj.rightSide+4}); obj.offSpan.css({marginRight:-p*obj.rightSide}); obj.onSpan.css({marginLeft:-(1-p)*obj.rightSide});}).bind('iPhoneDragEnd',function(event,x){ if(obj.$elem.is(':disabled')){return;} if($[iphoneStyle].dragging){ var p=(x-$[iphoneStyle].dragStartPosition)/obj.rightSide; obj.$elem.attr('checked',(p>=0.5));}else{ obj.$elem.attr('checked',!obj.$elem.attr('checked'));} $[iphoneStyle].currentlyClicking=null; $[iphoneStyle].dragging=null; obj.$elem.change();}); this.$elem.change(function(){ if(obj.$elem.is(':disabled')){ obj.container.addClass(obj.disabledClass); return false;}else{ obj.container.removeClass(obj.disabledClass);} var new_left=obj.$elem.attr('checked')?obj.rightSide:0; obj.handle.animate({left:new_left},obj.duration); obj.onLabel.animate({width:new_left+4},obj.duration); obj.offSpan.animate({marginRight:-new_left},obj.duration); obj.onSpan.animate({marginLeft:new_left-obj.rightSide},obj.duration);});}, initialPosition:function(){ this.contWidth=(this.container.width()<=0)?63:this.container.width(); this.handleWidth=(this.handle.width()<=0)?25:this.handle.width(); this.offLabel.css({width:this.contWidth-5}); var offset=($.browser.msie&&$.browser.version<7)?3:6; this.rightSide=this.contWidth-this.handleWidth-offset; if(this.$elem.is(':checked')){ this.handle.css({left:this.rightSide}); this.onLabel.css({width:this.rightSide+4}); this.offSpan.css({marginRight:-this.rightSide});}else{ this.onLabel.css({width:0}); this.onSpan.css({marginLeft:-this.rightSide});} if(this.$elem.is(':disabled')){ this.container.addClass(this.disabledClass);}}}); $.fn[iphoneStyle]=function(options){ var checkboxes=this.filter(':checkbox'); if(!checkboxes.length){return this;} var opt=$.extend({},$[iphoneStyle].defaults,options); checkboxes.each(function(){ $(this).data(iphoneStyle,new $[iphoneStyle](this,opt));}); if(!$[iphoneStyle].initComplete){ $(document).bind('mousemove touchmove',function(event){ if(!$[iphoneStyle].currentlyClicking){return;} event.preventDefault(); var x=event.pageX||event.originalEvent.changedTouches[0].pageX; if(!$[iphoneStyle].dragging&& (Math.abs($[iphoneStyle].dragStartPosition-x)>opt.dragThreshold)){ $[iphoneStyle].dragging=true;} $(event.target).trigger('iPhoneDrag',[x]);}).bind('mouseup touchend',function(event){ if(!$[iphoneStyle].currentlyClicking){return;} event.preventDefault(); var x=event.pageX||event.originalEvent.changedTouches[0].pageX; $($[iphoneStyle].currentlyClicking).trigger('iPhoneDragEnd',[x]);}); $[iphoneStyle].initComplete=true;} return this;}; $[iphoneStyle].defaults={ duration:200, checkedLabel:'ON', uncheckedLabel:'OFF', resizeHandle:true, resizeContainer:true, disabledClass:'iPhoneCheckDisabled', containerClass:'iPhoneCheckContainer', labelOnClass:'iPhoneCheckLabelOn', labelOffClass:'iPhoneCheckLabelOff', handleClass:'iPhoneCheckHandle', handleCenterClass:'iPhoneCheckHandleCenter', handleRightClass:'iPhoneCheckHandleRight', dragThreshold:5};})(jQuery,'iphoneStyle');; (function($){ $.widget("ui.nestedSortable",$.extend({},$.ui.sortable.prototype,{ options:{ tabSize:20, disableNesting:'ui-nestedSortable-no-nesting', errorClass:'ui-nestedSortable-error'}, _create:function(){ this.element.data('sortable',this.element.data('sortableTree')); return $.ui.sortable.prototype._create.apply(this,arguments);}, _mouseDrag:function(event){ this.position=this._generatePosition(event); this.positionAbs=this._convertPositionTo("absolute"); if(!this.lastPositionAbs){ this.lastPositionAbs=this.positionAbs;} if(this.options.scroll){ var o=this.options,scrolled=false; if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML'){ if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY=0;i--){ var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item); if(!intersection)continue; if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=='semi-dynamic'?!$.ui.contains(this.element[0],itemElement):true)){ this.direction=intersection==1?"down":"up"; if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){ this._rearrange(event,item);}else{ break;} this._clearUls(itemElement); this._trigger("change",event,this._uiHash()); break;}} itemBefore=this.placeholder[0].previousSibling; while(itemBefore!=null){ if(itemBefore.nodeType==1&&itemBefore!=this.currentItem[0]){ break;}else{ itemBefore=itemBefore.previousSibling;}} parentItem=this.placeholder[0].parentNode.parentNode; newUl=document.createElement('ul'); if(parentItem!=null&&parentItem.nodeName=='LI'&&this.positionAbs.left<$(parentItem).offset().left){ $(parentItem).after(this.placeholder[0]); this._clearUls(parentItem);}else if(itemBefore!=null&&itemBefore.nodeName=='LI'&&this.positionAbs.left>$(itemBefore).offset().left+this.options.tabSize){ if(!($(itemBefore).hasClass(this.options.disableNesting))){ if($(this.placeholder[0]).hasClass(this.options.errorClass)){ $(this.placeholder[0]).css('marginLeft',0).removeClass(this.options.errorClass);} if(itemBefore.children[1]==null){ itemBefore.appendChild(newUl);} itemBefore.children[1].appendChild(this.placeholder[0]);}else{ $(this.placeholder[0]).addClass(this.options.errorClass).css('marginLeft',this.options.tabSize);}}else if(itemBefore!=null){ if($(this.placeholder[0]).hasClass(this.options.errorClass)){ $(this.placeholder[0]).css('marginLeft',0).removeClass(this.options.errorClass);} $(itemBefore).after(this.placeholder[0]);}else{ if($(this.placeholder[0]).hasClass(this.options.errorClass)){ $(this.placeholder[0]).css('marginLeft',0).removeClass(this.options.errorClass);}} this._contactContainers(event); if($.ui.ddmanager)$.ui.ddmanager.drag(this,event); this._trigger('sort',event,this._uiHash()); this.lastPositionAbs=this.positionAbs; return false;}, serialize:function(o){ var items=this._getItemsAsjQuery(o&&o.connected); var str=[];o=o||{}; $(items).each(function(){ var res=($(o.item||this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/)); var pid=($(o.item||this).parent('ul').parent('li').attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/)); if(res)str.push((o.key||res[1]+'['+(o.key&&o.expression?res[1]:res[2])+']')+'='+(pid?(o.key&&o.expression?pid[1]:pid[2]):'root'));}); if(!str.length&&o.key){ str.push(o.key+'=');} return str.join('&');}, toArray:function(o){ o=o||{}; var sDepth=o.startDepthCount||0; var ret=[]; var left=2; ret.push({"item_id":'root',"parent_id":'none',"depth":sDepth,"left":'1',"right":($('li',this.element).length+1)*2}); $(this.element).children('li').each(function(){ left=_recursiveArray($(this),sDepth+1,left);}); return ret; function _recursiveArray(item,depth,left){ right=left+1; if($(item).children('ul').children('li').length>0){ depth++; $(item).children('ul').children('li').each(function(){ right=_recursiveArray($(this),depth,right);}); depth--;} id=$(item).attr('id').match(o.expression||(/(.+)[-=_](.+)/)); if(depth===sDepth+1)pid='root'; else{ parent=$(item).parent('ul').parent('li').attr('id').match(o.expression||(/(.+)[-=_](.+)/)); pid=parent[2];} ret.push({"item_id":id[2],"parent_id":pid,"depth":depth,"left":left,"right":right}); return left=right+1;}}, _createPlaceholder:function(that){ var self=that||this,o=self.options; if(!o.placeholder||o.placeholder.constructor==String){ var className=o.placeholder; o.placeholder={ element:function(){ var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; if(!className) el.style.visibility="hidden"; return el;}, update:function(container,p){ if(className&&!o.forcePlaceholderSize)return; if(!p.height()||p.css('height')=='auto'){p.height(self.currentItem.height());}; if(!p.width()){p.width(self.currentItem.width());};}};} self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem)); self.currentItem.after(self.placeholder); o.placeholder.update(self,self.placeholder);}, _clear:function(event,noPropagation){ $.ui.sortable.prototype._clear.apply(this,arguments); for(var i=this.items.length-1;i>=0;i--){ var item=this.items[i].item[0]; this._clearUls(item);} return true;}, _clearUls:function(item){ if(item.children[1]&&item.children[1].children.length==0){ item.removeChild(item.children[1]);}}})); $.ui.nestedSortable.prototype.options=$.extend({},$.ui.sortable.prototype.options,$.ui.nestedSortable.prototype.options);})(jQuery);; (function(f,z){var e=z in document.createElement('input'),a=z in document.createElement('textarea');if(e&&a){f.fn.placeholder=function(){return this}}else{f.fn.placeholder=function(){return this.filter((e?'textarea':':input')+'['+z+']').bind('focus.'+z,b).bind('blur.'+z,d).trigger('blur.'+z).end()}}function c(h){var g={},i=/^jQuery\d+$/;f.each(h.attributes,function(k,j){if(j.specified&&!i.test(j.name)){g[j.name]=j.value}});return g}function b(){var g=f(this);if(g.val()===g.attr(z)&&g.hasClass(z)){if(g.data(z+'-password')){g.hide().next().show().focus()}else{g.val('').removeClass(z)}}}function d(g){var j,i=f(this);if(i.val()===''||i.val()===i.attr(z)){if(i.is(':password')){if(!i.data(z+'-textinput')){try{j=i.clone().attr({type:'text'})}catch(h){j=f('').attr(f.extend(c(i[0]),{type:'text'}))}j.removeAttr('name').data(z+'-password',true).bind('focus.'+z,b);i.data(z+'-textinput',j).before(j)}i=i.hide().prev().show()}i.addClass(z).val(i.attr(z))}else{i.removeClass(z)}}f(function(){f('form').bind('submit.'+z,function(){var g=f('.'+z,this).each(b);setTimeout(function(){g.each(d)},10)})});f(window).bind('unload.'+z,function(){f('.'+z).val('')})})(jQuery,'placeholder');;;(function($){ $.extend($.fn,{ swapClass:function(c1,c2){ var c1Elements=this.filter('.'+c1); this.filter('.'+c2).removeClass(c2).addClass(c1); c1Elements.removeClass(c1).addClass(c2); return this;}, replaceClass:function(c1,c2){ return this.filter('.'+c1).removeClass(c1).addClass(c2).end();}, hoverClass:function(className){ className=className||"hover"; return this.hover(function(){ $(this).addClass(className);},function(){ $(this).removeClass(className);});}, heightToggle:function(animated,callback){ animated? this.animate({height:"toggle"},animated,callback): this.each(function(){ jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"](); if(callback) callback.apply(this,arguments);});}, heightHide:function(animated,callback){ if(animated){ this.animate({height:"hide"},animated,callback);}else{ this.hide(); if(callback) this.each(callback);}}, prepareBranches:function(settings){ if(!settings.prerendered){ this.filter(":last-child:not(ul)").addClass(CLASSES.last); this.filter((settings.collapsed?"":"."+CLASSES.closed)+":not(."+CLASSES.open+")").children("ul").hide();} return this.has("ul");}, applyClasses:function(settings,toggler){ this.has('ul').children('span').unbind("click.treeview").bind("click.treeview",function(event){ if(this==event.target) toggler.apply($(this).next());}).bind("dblclick",function(){ $('#btSubmit').click();}).add($("a",this)).hoverClass(); if(!settings.prerendered){ this.has('ul:hidden').not('.'+CLASSES.open).not('.'+CLASSES.leaf).addClass(CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable); this.filter('.'+CLASSES.open).addClass(CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable); var hitarea=this.find("div."+CLASSES.hitarea); if(!hitarea.length||hitarea.length!=$('li',this).children().length) this.not('ul').prepend("
"); hitarea=this.find("div."+CLASSES.hitarea); hitarea.removeClass().addClass(CLASSES.hitarea).each(function(){ var classes=""; $.each($(this).parent().attr("class").split(" "),function(){ classes+=this+"-hitarea ";}); $(this).addClass(classes);})} this.find("div."+CLASSES.hitarea).click(toggler);}, treeview:function(settings){ settings=$.extend({ cookieId:"treeview"},settings); if(settings.toggle){ var callback=settings.toggle; settings.toggle=function(){ return callback.apply($(this).parent()[0],arguments);};} function treeController(tree,control){ function handler(filter){ return function(){ toggler.apply($("div."+CLASSES.hitarea,tree).filter(function(){ return filter?$(this).parent("."+filter).length:true;})); return false;};} $("a:eq(0)",control).click(handler(CLASSES.collapsable)); $("a:eq(1)",control).click(handler(CLASSES.expandable)); $("a:eq(2)",control).click(handler());} function toggler(){ $(this).parent().children(".hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).children("ul").heightToggle(settings.animated,settings.toggle); if(settings.unique){ $(this).parent().siblings().children(".hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).replaceClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().replaceClass(CLASSES.collapsable,CLASSES.expandable).replaceClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).children("ul").heightHide(settings.animated,settings.toggle);}} this.data("toggler",toggler); function serialize(){ function binary(arg){ return arg?1:0;} var data=[]; branches.each(function(i,e){ data[i]=$(e).is(":has(ul:visible)")?1:0;}); $.cookie(settings.cookieId,data.join(""),settings.cookieOptions);} function deserialize(){ var stored=$.cookie(settings.cookieId); if(stored){ var data=stored.split(""); branches.each(function(i,e){ $(e).children("ul")[parseInt(data[i])?"show":"hide"]();});}} this.addClass("treeview"); var branches=this.find("li").prepareBranches(settings); switch(settings.persist){ case"cookie": var toggleCallback=settings.toggle; settings.toggle=function(){ serialize(); if(toggleCallback){ toggleCallback.apply(this,arguments);}}; deserialize(); break; case"location": var current=this.find("a").filter(function(){ return this.href.toLowerCase()==location.href.toLowerCase();}); if(current.length){ var items=current.addClass("selected").parents("ul, li").add(current.next()).show(); if(settings.prerendered){ items.filter("li").swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(".hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea);}} break;} branches.applyClasses(settings,toggler); if(settings.control){ treeController(this,settings.control); $(settings.control).show();} return this;}}); $.treeview={}; var CLASSES=($.treeview.classes={ open:"open", closed:"closed", expandable:"expandable", expandableHitarea:"expandable-hitarea", lastExpandableHitarea:"lastExpandable-hitarea", collapsable:"collapsable", collapsableHitarea:"collapsable-hitarea", lastCollapsableHitarea:"lastCollapsable-hitarea", lastCollapsable:"lastCollapsable", lastExpandable:"lastExpandable", last:"last", leaf:"leaf", hitarea:"hitarea"});})(jQuery);; (function($){ var CLASSES=$.treeview.classes; var proxied=$.fn.treeview; $.fn.treeview=function(settings){ settings=$.extend({},settings); if(settings.add){ return this.trigger("add",[settings.add]);} if(settings.remove){ return this.trigger("remove",[settings.remove]);} return proxied.apply(this,arguments).bind("add",function(event,branches){ $(branches).prev().removeClass(CLASSES.last).removeClass(CLASSES.lastCollapsable).removeClass(CLASSES.lastExpandable).children(".hitarea").removeClass(CLASSES.lastCollapsableHitarea).removeClass(CLASSES.lastExpandableHitarea); $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler"));}).bind("remove",function(event,branches){ var prev=$(branches).prev(); var parent=$(branches).parent(); $(branches).remove(); prev.filter(":last-child").addClass(CLASSES.last).filter("."+CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable).end().children(".hitarea").replaceClass(CLASSES.expandableHitarea,CLASSES.lastExpandableHitarea).end().filter("."+CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable).end().children(".hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.lastCollapsableHitarea); if(parent.children().size()==0&&parent[0]!=this){ parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable) parent.siblings(".hitarea").andSelf().remove();}});};})(jQuery);;;(function($){ function load(settings,root,child,container,offset){ function createNode(parent){ var current=$("
  • ").attr("id",escape(this.id||"")).append($("").text(this.text)); if(settings.separate_children&&this.hasChildren&&this.offset==undefined){ if($('.hasChildren',parent).length>0){ $('.hasChildren:last',parent).after(current);}else{ current.prependTo(parent);}}else{ current.appendTo(parent);} if(this.classes){ current.children("span").addClass(this.classes);} if(this.expanded){ current.addClass("open");} if(this.offset!=undefined){ current.attr('offset',this.offset); current.addClass('showmore')} if(!this.selectable){ current.addClass('noSelection')} if(this.hasChildren!=undefined&&!this.hasChildren){ current.append('
  • ').append('

    '+this._options['title']+'

    ').append('
    ').prependTo('body'); if(this._options['pclass']){ this._popup.addClass(this._options['pclass']);}else{ this._popup.addClass('ieBugFixer');} this.setPopupContents(this.popupContents); if(this._options['buttons']){ this._popup.append('
    '); this.setPopupButtons(this._options['buttons']);}} this.positionPopup(); $(this._popup).css({visibility:'visible',display:'block'}); if($.browser.msie&&$.browser.version=='6.0'){ $('.vmPanelContainer').bgIframe({top:-1,left:-1,width:398});} if($(this._popup).children('.splHeader-popup').length){ $(this._popup).draggable({ handle:".splHeader-popup h2", containment:'document'});} this._setupEventHandlers(); this.isActive=true; Splunk.Popup._globalPopupCount+=1; Splunk.util.focusFirstField(this._popup); if(this._options['isModal']){ $(this._popup).trap();} return this._popup;}, createPopup:function(popupParent,popupTitle,popupContents,handleOK,handleCancel,handleAccept){ this.logger.error('splunk.Popup: Function signature changed, please see /exposed/js/popup.js for details');}, _setupEventHandlers:function(){ $(this._popup).find('.splHeader .splIcon-close').click(function(){ this.destroyPopup(); return false;}.bind(this)); $(document).bind('keydown.Popup',function(event){ if(event.keyCode==27){ event.preventDefault(); this.destroyPopup();}}.bind(this));}, setPopupContents:function(popupContents){ $(this._popup).find('.popupContent').empty(); var newContents=$(popupContents); if(this._options['cloneFlag']){ newContents=$(popupContents).clone(true).appendTo($(this._popup).find('.popupContent')).show();}else{ newContents=$(popupContents).appendTo($(this._popup).find('.popupContent')).show();} if($.browser.msie){ this.setPopupDimensions(newContents);}}, setPopupButtons:function(buttons){ var popupInstance=this; $.each(buttons,function(i,button){ if(button.hasOwnProperty('label')){ buttonText=button.label;}else{ buttonText='';} if(button.hasOwnProperty('type')){ buttonType=button.type;}else{ buttonType='primary';} if(button.hasOwnProperty('callback')){ buttonHandler=button.callback;}else{ popupInstance.logger.warn('Splunk.Popup: Button has no callback defined'); buttonHandler=function(){return true;};} popupInstance.addButton(buttonText,buttonType,buttonHandler);});}, addButton:function(buttonText,buttonType,buttonHandler){ buttonType=buttonType.toLowerCase(); var newbutton=$('').addClass('splButton-'+buttonType).append(''+buttonText+'').appendTo($(this._popup).children('div.popupFooter')).click(function(){ if(buttonHandler()){ this.destroyPopup();}}.bind(this));}, createOverlay:function(popupParent){ if(Splunk.Popup._globalPopupCount>0)return; $('
    ').prependTo('body').show(); if($.browser.mozilla&&$.browser.version.substr(0,3)<"1.9"){ $('.FlashWrapperContainer').css('z-index','-1');} if($.browser.msie&&$.browser.version=='6.0'){ var h,w; h=$('body').height(); w=$('body').width(); $('.splOverlay').css({height:h,width:w}).bgIframe();}}, destroyOverlay:function(){ if(Splunk.Popup._globalPopupCount>0)return; $('.splOverlay').remove();}, setPopupDimensions:function(popupContents){ var popupContentWidth=$(popupContents).outerWidth(); $(this._popup).css({width:popupContentWidth});}, positionPopup:function(){ var posX,posY, height=this._popup.outerHeight(), width=this._popup.outerWidth(), wst, wsl, ww=$(window).width(), wh=$(window).height(); posX=0; posY=0; if($.fn.scrollTop) { wst=$(window).scrollTop(); posY=wst; if(wh>height) { posY=(wh-height)/2+wst;}} if($.fn.scrollLeft) { wsl=$(window).scrollLeft(); if(ww>width) { posX=(ww-width)/2;}} this._popup.css({top:posY,left:posX});}, onPopupLoaded:function(){ if($('#runMe').length){ eval($('#runMe').text());}}, getPopup:function(){ return this._popup;}, destroyPopup:function(){ Splunk.Popup._globalPopupCount-=1; if(this._options['onBeforeDestroy'])this._options['onBeforeDestroy'](this); if(this._options['inlineMode']){ $(this._popup).hide();}else{ $(this._popup).remove();} if(this._options['isModal']){ this.destroyOverlay();} if($.browser.mozilla&&$.browser.version.substr(0,3)<"1.9"){ $('.FlashWrapperContainer').css('z-index','auto');} this.isActive=false; $(document).unbind('keydown.Popup'); if(this._options['onDestroy'])this._options['onDestroy'](this);}}); Splunk.Popup.createExportResultsForm=function(formContainer,job,type){ if(typeof type==='undefined'){ type='event';} var exportPopupHandle=null; var exportPopup=new Splunk.Popup(formContainer,{ title:_('Export Results'), buttons:[ { label:_('Cancel'), type:'secondary', callback:function(){ return true;}}, { label:_('Export'), type:'primary', callback:function(){ var limit=$(exportPopupHandle).find('[name="spl_ctrl-limit"]:checked').val(); if(limit=='unlimited'){ $(exportPopupHandle).find('[name="count"]').val('0');}else{ var countstr=$(exportPopupHandle).find('[name="spl_ctrl-count"]').val(); var count=parseInt(countstr,10); if(isNaN(count)||count<1||countstr!=count){ alert(_("Must export at least one result")); return false;} $(exportPopupHandle).find('[name="count"]').val(count);} return $(exportPopupHandle).find(".exForm").submit();}}]}); exportPopupHandle=exportPopup.getPopup(); var exportForm=$(exportPopupHandle).find(".exForm")[0]; exportForm.action=Splunk.util.make_url('api/search/jobs/'+job.getSID()+'/'+type); if(job.areResultsTransformed()){ $("option[value='raw']",exportForm).remove();}}; Splunk.Popup.createEventtypeForm=function(formContainer,title,search,tags){ options={ url:Splunk.util.make_url('manager',Splunk.util.getCurrentApp(),'/saved/eventtypes/_new?action=edit&noContainer=2&viewFilter=modal&eleOnly=1'), titlebar_class:'TitleBareventtypePopup', setupPopup:function(EAIPopup){ if(search){ var searchStr=Splunk.util.stripLeadingSearchCommand(search.toString()); $('form.entityEditForm textarea[name="search"]',EAIPopup.getPopup()).val(searchStr);} if(tags){ $('form.entityEditForm input[name="tags"]',EAIPopup.getPopup()).val(tags);}}, beforeSaveForm:function(eai){ var name=$('form.entityEditForm input[name="name"]').val(); eai.success_message=sprintf(_("Your eventtype '%(eventtypeName)s' was saved."),{eventtypeName:name});}, onAjaxError:function(){ var messenger=Splunk.Messenger.System.getInstance(); messenger.send('error','splunk.eventtype', _("Splunk encountered an error when it attempted to retrieve the eventtype form. Try again or contact an admin."));}}; return Splunk.Popup.createEAIForm(formContainer,title,options);}; Splunk.Popup.createSavedSearchForm=function(formContainer,title,search){ options={ url:Splunk.util.make_url('manager',Splunk.util.getCurrentApp(),"/saved/searches/_new?action=edit&noContainer=1&viewFilter=modal&eleOnly=1"), titlebar_class:'TitleBarSavedSearchPopup', setupPopup:function(EAIPopup){ if(search){ var searchStr=search.toString(); var timeRange=search.getTimeRange(); var earliestTime=timeRange.getEarliestTimeTerms(); var latestTime=timeRange.getLatestTimeTerms(); if(searchStr){ $('form.entityEditForm textarea[name="search"]').val(Splunk.util.stripLeadingSearchCommand(searchStr));} if(earliestTime){ $('form.entityEditForm input[name="dispatch.earliest_time"]').val(earliestTime);} if(latestTime){ $('form.entityEditForm input[name="dispatch.latest_time"]').val(latestTime);}} $('form.entityEditForm input[name="displayview"]',EAIPopup.getPopup()).val(Splunk.util.getCurrentDisplayView()); $('form.entityEditForm input[name="request.ui_dispatch_view"]',EAIPopup.getPopup()).val(Splunk.util.getCurrentDisplayView());}, beforeSaveForm:function(eai){ var vs_id=Splunk.Globals.ModuleLoader.commitViewParams(null,true); var vs_input=$('form.entityEditForm input[name="vsid"]'); if(!vs_input){ search.logger.error('handleSaveSubmit - Cannot find vsid element; viewstate will not be saved');}else{ vs_input.val(vs_id);} var name=$('form.entityEditForm input[name="name"]').val(); eai.success_message=sprintf(_("Your search '%(savedSearchName)s' was saved."),{savedSearchName:name});}, onAjaxError:function(){ var messenger=Splunk.Messenger.System.getInstance(); messenger.send('error','splunk.savedsearches', _("Splunk encountered an error when it attempted to retrieve the save search form. Try again or contact an admin."));}}; return Splunk.Popup.createEAIForm(formContainer,title,options);}; Splunk.Popup.createSchedulePDFForm=function(formContainer,title,pdfService){ var pdfUrl; if(pdfService==="deprecated"){ var pdfParams={output:'pdf'}; pdfUrl=Splunk.util.make_url('app',Splunk.util.getCurrentApp(),Splunk.util.getCurrentView())+'?'+Splunk.util.propToQueryString(pdfParams);}else{ pdfUrl=Splunk.pdf.get_render_url_for_current_dashboard();} var scheduledViewsUrl=Splunk.util.make_full_url('scheduledview/'+Splunk.util.getCurrentApp()+'/'+Splunk.util.getCurrentView(),{"pdfPreviewUrl":pdfUrl}); return Splunk.Popup.IFramer(scheduledViewsUrl,_('Schedule PDF Delivery'),{'pclass':'schedulePdfPopup'});}; Splunk.Popup.createUserOptionsForm=function(formContainer,title){ var options={ url:Splunk.util.make_url('manager',Splunk.util.getCurrentApp(),'authentication','changepassword','admin','?action=edit&noContainer=1&eleOnly=1'), titlebar_class:'TitleBarSavedSearchPopup', beforeSaveForm:function(eai){ eai.success_message=_('Successfully changed user options');}, onAjaxError:function(){}}; return Splunk.Popup.createEAIForm(formContainer,title,options);}; Splunk.Popup.createEAIForm=function(formContainer,title,options){ if(Splunk.Popup.createEAIForm.opened)return; var logger=Splunk.Logger.getLogger("Splunk.Popup.createEAIForm"); var loadingContainer=$('
    ').appendTo(formContainer); $(loadingContainer).html('
    Loading...
    '); if($.browser.msie){ $(loadingContainer).css({"overflow":"","height":""});} var EAIPopup=new Splunk.Popup(loadingContainer,{ title:title, pclass:options.titlebar_class, cloneFlag:false, onDestroy:function(){ Splunk.Popup.createEAIForm.opened=false;}}); $('.popupFooter',EAIPopup.getPopup()).hide(); var messenger=Splunk.Messenger.System.getInstance(); var cancel=function(){return true;}; var handleSaveSubmit=function(){ var form=$('form.entityEditForm',EAIPopup.getPopup()); var eai=Splunk.EAI.getInstance(); eai.redirect=false; if(options.beforeSaveForm) options.beforeSaveForm(eai); $('div.popupFooter button.splButton-primary span',this._popup).text(_('Saving...')); $('div.popupFooter button.splButton-primary',this._popup).unbind('click').removeClass('primary').addClass('secondary'); eai.saveForm(form, function(){ Splunk.Globals.ModuleLoader.refreshViewData(); if(window.opener&&!window.opener.closed){ try{ window.opener.Splunk.Globals.ModuleLoader.refreshViewData();}catch(e){ logger.warn("Could not refresh view data for parent opener",e);}} EAIPopup.destroyPopup();}, function(){ loadedFormContainer.scrollTop(0); $('div.popupFooter button.splButton-primary span',this._popup).text(_('Save')); $('div.popupFooter button.splButton-primary',this._popup).bind('click',handleSaveSubmit).removeClass('secondary').addClass('primary');}); return false;}; var setupPopup=function(){ if(EAIPopup)EAIPopup.destroyPopup(); EAIPopup=new Splunk.Popup(loadedFormContainer,{ title:title, pclass:options.titlebar_class, cloneFlag:false, onDestroy:function(){ Splunk.Popup.createEAIForm.opened=false;}, buttons:[ { label:_('Cancel'), type:'secondary', callback:cancel}, { label:_('Save'), type:'primary', callback:handleSaveSubmit}]}); $('form.entityEditForm input[name="name"]',EAIPopup.getPopup()).focus(); Splunk.EAI.getInstance().use_messenger_on_error=false; if(options.setupPopup) options.setupPopup(EAIPopup); $("form",loadedFormContainer).unbind('submit'); $("form",loadedFormContainer).submit(handleSaveSubmit);}; Splunk.Popup.createEAIForm.opened=true; $.ajax({ url:options.url, dataType:'html', error:function(){ if(EAIPopup){ EAIPopup.destroyPopup(); Splunk.Popup.createEAIForm.opened=false;} if(options.onAjaxError) options.onAjaxError();}, success:function(resp,status){ if(options.prefix){ resp=options.prefix+resp;} if(options.suffix){ resp=resp+options.suffix;} $(loadedFormContainer).html(resp); var safeHeight=$(window).height()-200; if($.browser.msie){ $(loadedFormContainer).css("overflow","scroll"); if((parseInt($.browser.version,10)<7)){ $(loadedFormContainer).css("height",safeHeight+"px");}else{ $(loadedFormContainer).css("max-height",safeHeight+"px");}}else{ $(loadedFormContainer).css("overflow","auto"); $(loadedFormContainer).css("max-height",safeHeight+"px");} setupPopup();}});}; Splunk.Popup._globalPopupCount=0; Splunk.Popup.createShareLinkForm=function(formContainer,title,search){ var messenger=Splunk.Messenger.System.getInstance(); var onSaveSuccess=function(){ var app=Splunk.util.getCurrentApp(); var view=Splunk.util.getCurrentDisplayView(); var args={"sid":search.job.getSearchId()}; args["vs"]=Splunk.Globals.ModuleLoader.commitViewParams(null,true); url=[]; url.push(document.location.protocol); url.push("//"); url.push(document.location.host); url.push(Splunk.util.make_url("app",app,view)); url.push("?"+Splunk.util.propToQueryString(args)); setTimeout(function(){ $(".linkTextInput").val(url.join("")).focus(function(){this.select();}).focus();},0); var undoEverything=function(event){ var undoSaveSuccess=function(){ search.logger.debug("results are now unsaved again.");}; var undoSaveFailure=function(){ messenger.send('error','splunk.search',_("Splunk encountered an error while trying to undo the saving of your results. Try again or contact an admin."));}; search.job.unsave(undoSaveSuccess,undoSaveFailure); var undoACLSuccess=function(){ search.logger.debug("results are now again marked as NOT world readable.");}; var undoACLFailure=function(){ messenger.send('error','splunk.search',_("Splunk encountered an error while trying to make your results not world-readable. Try again or contact an admin."));}; search.job.undoWorldReadable(undoACLSuccess,undoACLFailure);}; var linkPopup=null; $("a.undoEverything",formContainer).click(function(){ undoEverything(); linkPopup.destroyPopup();}); linkPopup=new Splunk.Popup(formContainer,{ title:title, buttons:[ { label:_('Close'), type:'primary', callback:function(){ return true;}}]});}; var onSaveFailure=function(e){ messenger.send('error','splunk.search',_("Splunk encountered an error when it tried to save your results. It cannot generate a link. Try again or contact an admin.")+e);}; search.job.save(onSaveSuccess,onSaveFailure); var onACLSuccess=function(){ search.logger.debug("results are now marked as world readable.");}; var onACLFailure=function(){ messenger.send('error','splunk.search',_("Splunk encountered an error when it tried to make your results world-readable. Try again or contact an admin."));}; search.job.makeWorldReadable(onACLSuccess,onACLFailure);}; Splunk.Popup.createEAIForm.opened=false; Splunk.Popup.createEventtypeForm.opened=false; Splunk.Popup.createTagFieldForm=function(formContainer,title,fieldName,fieldValue,successCallback){ var resource=Splunk.util.make_url("/tags/"+Splunk.util.getCurrentApp()+"/fields/"+encodeURIComponent(fieldName)+"/"+encodeURIComponent(fieldValue)); var logger=Splunk.Logger.getLogger("Splunk.Popup.createTagFieldForm"); $.ajax({ type:"GET", url:resource, dataType:"html", async:false, error:function(){ logger.error(sprintf(_("Could not load %(resource)s"),{resource:resource}));}.bind(this), complete:function(data,textStatus){ var content=(data.status==200)?data.responseText:"Could not tag field"; formContainer.html(content);}.bind(this)}); var popup=new Splunk.Popup(formContainer,{ title:title, buttons:[ { label:_("Cancel"), type:'secondary', callback:function(){return true;}}, { label:_("Ok"), type:'primary', callback:function(){return false;}}]}); $("input[name='add']",popup.getPopup()).focus(); var ajaxFormOptions={ complete:function(xhr,statusText){ if(statusText=="error"){ alert(_("Your tag(s) could not be saved.\nOnly alphanumeric characters, underscores, hyphens and periods are allowed for tags."));}else{ successCallback.apply(null,arguments); popup.destroyPopup();}}.bind(this), target:formContainer}; var popupForm=$("form",popup.getPopup()); popupForm.ajaxForm(ajaxFormOptions); $("input[name='add']",popup.getPopup()).keydown(function(event){ if(event.keyCode==13){ popupForm.submit();}}); $("button.splButton-primary",popup.getPopup()).click(function(){popupForm.submit();});}; Splunk.Popup.IFramer=function(path,title,options){ options=options||{}; var isInit=true; var data=options.data||null; var scrolling=options.scrolling||false; var src; var popopOptions={ title:title}; if(options.onBeforeDestroy){ popopOptions.onBeforeDestroy=options.onBeforeDestroy;} if(options.pclass){ popopOptions.pclass=options.pclass;} if("isModal"in options){ popopOptions.isModal=options.isModal;} var iframe=$('