jQuery.effects||(function($){$.effects={};$.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(i,attr){$.fx.step[attr]=function(fx){if(!fx.colorInit){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);fx.colorInit=true}fx.elem.style[attr]="rgb("+Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0)+","+Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0)+","+Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)+")"}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3){return color}if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)){return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)]}if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)){return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55]}if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)){return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]}if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)){return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)]}if(result=/rgba\(0, 0, 0, 0\)/.exec(color)){return colors["transparent"]}return colors[$.trim(color).toLowerCase()]}function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=""&&color!="transparent"||$.nodeName(elem,"body")){break}attr="backgroundColor"}while(elem=elem.parentNode);return getRGB(color)}var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function getElementStyles(){var style=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,newStyle={},key,camelCase;if(style&&style.length&&style[0]&&style[style[0]]){var len=style.length;while(len--){key=style[len];if(typeof style[key]=="string"){camelCase=key.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});newStyle[camelCase]=style[key]}}}else{for(key in style){if(typeof style[key]==="string"){newStyle[key]=style[key]}}}return newStyle}function filterStyles(styles){var name,value;for(name in styles){value=styles[name];if(value==null||$.isFunction(value)||name in shorthandStyles||(/scrollbar/).test(name)||(!(/color/i).test(name)&&isNaN(parseFloat(value)))){delete styles[name]}}return styles}function styleDifference(oldStyle,newStyle){var diff={_:0},name;for(name in newStyle){if(oldStyle[name]!=newStyle[name]){diff[name]=newStyle[name]}}return diff}$.effects.animateClass=function(value,duration,easing,callback){if($.isFunction(easing)){callback=easing;easing=null}return this.each(function(){var that=$(this),originalStyleAttr=that.attr("style")||" ",originalStyle=filterStyles(getElementStyles.call(this)),newStyle,className=that.attr("className");$.each(classAnimationActions,function(i,action){if(value[action]){that[action+"Class"](value[action])}});newStyle=filterStyles(getElementStyles.call(this));that.attr("className",className);that.animate(styleDifference(originalStyle,newStyle),duration,easing,function(){$.each(classAnimationActions,function(i,action){if(value[action]){that[action+"Class"](value[action])}});if(typeof that.attr("style")=="object"){that.attr("style").cssText="";that.attr("style").cssText=originalStyleAttr}else{that.attr("style",originalStyleAttr)}if(callback){callback.apply(this,arguments)}})})};$.fn.extend({_addClass:$.fn.addClass,addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames)},_removeClass:$.fn.removeClass,removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames)},_toggleClass:$.fn.toggleClass,toggleClass:function(classNames,force,speed,easing,callback){if(typeof force=="boolean"||force===undefined){if(!speed){return this._toggleClass(classNames,force)}else{return $.effects.animateClass.apply(this,[(force?{add:classNames}:{remove:classNames}),speed,easing,callback])}}else{return $.effects.animateClass.apply(this,[{toggle:classNames},force,speed,easing])}},switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback])}});$.extend($.effects,{version:"1.8rc3",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.data("ec.storage."+set[i],element[0].style[set[i]])}}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.css(set[i],element.data("ec.storage."+set[i]))}}},setMode:function(el,mode){if(mode=="toggle"){mode=el.is(":hidden")?"show":"hide"}return mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent()}var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")},wrapper=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});element.wrap(wrapper);wrapper=element.parent();if(element.css("position")=="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto"}});element.css({position:"relative",top:0,left:0})}return wrapper.css(props).show()},removeWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent().replaceWith(element)}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1]}});return value}});function _normalizeArguments(effect,options,speed,callback){if(typeof effect=="object"){callback=options;speed=null;options=effect;effect=options.effect}if($.isFunction(options)){callback=options;speed=null;options={}}if(typeof options=="number"||$.fx.speeds[options]){callback=speed;speed=options;options={}}options=options||{};speed=speed||options.duration;speed=$.fx.off?0:typeof speed=="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;callback=callback||options.complete;return[effect,options,speed,callback]}$.fn.extend({effect:function(effect,options,speed,callback){var args=_normalizeArguments.apply(this,arguments),args2={options:args[1],duration:args[2],callback:args[3]},effectMethod=$.effects[effect];return effectMethod&&!$.fx.off?effectMethod.call(this,args2):this},_show:$.fn.show,show:function(speed){if(!speed||typeof speed=="number"||$.fx.speeds[speed]){return this._show.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args[1].mode="show";return this.effect.apply(this,args)}},_hide:$.fn.hide,hide:function(speed){if(!speed||typeof speed=="number"||$.fx.speeds[speed]){return this._hide.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args[1].mode="hide";return this.effect.apply(this,args)}},__toggle:$.fn.toggle,toggle:function(speed){if(!speed||typeof speed=="number"||$.fx.speeds[speed]||typeof speed=="boolean"||$.isFunction(speed)){return this.__toggle.apply(this,arguments)}else{var args=_normalizeArguments.apply(this,arguments);args[1].mode="toggle";return this.effect.apply(this,args)}},cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit]}});return val}});$.easing.jswing=$.easing.swing;$.extend($.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b}return -c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b}return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return -c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b}return -c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b}return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return -c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0){return b}if(t==d){return b+c}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b}return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return -c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1){return -c/2*(Math.sqrt(1-t*t)-1)+b}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2){return $.easing.easeInBounce(x,t*2,0,c,d)*0.5+b}return $.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}})})(jQuery);
(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret}})(name,prop[name]):prop[name]}function Class(){if(!initializing&&this.init){this.init.apply(this,arguments)}}Class.prototype=prototype;Class.constructor=Class;Class.extend=arguments.callee;return Class}})();
jQuery.fn.moveTo=function(transition){var that=this,topOffset=this.offset().top,commandBarHeight=jQuery("#stalker").outerHeight()+35,scrollTarget,maxScrollTop=jQuery.getDocHeight();if(topOffset<=jQuery("#stalker.not(.detached)").offset().top){commandBarHeight=0}if((jQuery(window).scrollTop()+jQuery(window).height()-this.outerHeight()<topOffset||jQuery(window).scrollTop()+commandBarHeight>topOffset)&&jQuery(window).height()>commandBarHeight){if(topOffset-commandBarHeight>maxScrollTop){scrollTarget=maxScrollTop}else{scrollTarget=topOffset-commandBarHeight}if(!jQuery.fn.moveTo.animating&&transition){jQuery(document).trigger("moveToStarted",this);jQuery.fn.moveTo.animating=true;jQuery("html,body").animate({scrollTop:scrollTarget},1000,function(){jQuery("#stalker").trigger("positionChanged");jQuery(document).trigger("moveToFinished",that);delete jQuery.fn.moveTo.animating});return this}else{if(jQuery("html, body").is(":animated")){jQuery("html, body").stop();delete jQuery.fn.moveTo.animating}jQuery(document).trigger("moveToStarted");jQuery(window).scrollTop(scrollTarget);jQuery("#stalker").trigger("positionChanged");setTimeout(function(){jQuery(document).trigger("moveToFinished",that)},100);return this}}jQuery(document).trigger("moveToFinished",this);return this};
jQuery.getDocHeight=function(){return Math.max(jQuery(document).height(),jQuery(window).height(),document.documentElement.clientHeight)};
AJS.containDropdown=function(dropdown,containerSelector,dynamic){function getDropdownOffset(){return dropdown.$.offset().top-jQuery(containerSelector).offset().top}var container,ddOffset,availableArea,shadowOffset=25;if(dropdown.$.parents(containerSelector).length!==-1){container=jQuery(containerSelector),ddOffset=getDropdownOffset(),shadowOffset=30,availableArea=container.outerHeight()-ddOffset-shadowOffset;if(availableArea<=parseInt(dropdown.$.attr("scrollHeight"),10)){AJS.containDropdown.containHeight(dropdown,availableArea)}else{if(dynamic){AJS.containDropdown.releaseContainment(dropdown)}}dropdown.reset()}};AJS.containDropdown.containHeight=function(dropdown,availableArea){dropdown.$.css({height:availableArea});if(dropdown.$.css("overflowY")!=="scroll"){dropdown.$.css({width:15+dropdown.$.attr("scrollWidth"),overflowY:"scroll",overflowX:"hidden"})}};AJS.containDropdown.releaseContainment=function(dropdown){dropdown.$.css({height:"",width:"",overflowY:"",overflowX:""})};
(function(){jQuery.fn.expandOnInput=function(){function setHeight(){if(!that.is(":visible")){return}var maxHeight=parseInt(that.css("maxHeight"),10),scrollHeight=parseInt(that.attr("scrollHeight"),10);if(isNaN(maxHeight)||scrollHeight<=maxHeight){if(scrollHeight-5>that.height()){that.css("overflowY","hidden").height(scrollHeight)}}else{if(that.height!==scrollHeight){that.height(scrollHeight).css({overflowY:"",overflowX:"hidden"})}}jQuery(that).trigger("stalkerHeightUpdated")}var that=this;if(this.length===0){return this}this.bind("refreshInputHeight",function(){that.height("");setHeight()});this.unbind("keyup",setHeight).bind("keyup",function(e){setHeight();e.preventDefault()});window.setTimeout(function(){setHeight();setHeight()},0);return this}})();
jQuery.os={};if(navigator.platform.toLowerCase().indexOf("win")!=-1){jQuery.os.windows=true}if(navigator.platform.toLowerCase().indexOf("mac")!=-1){jQuery.os.mac=true}if(navigator.platform.toLowerCase().indexOf("linux")!=-1){jQuery.os.linux=true};
jQuery.namespace=function(str,noclobber){var i,a=str.split("."),o=window,callthrough=false;if(/[^a-zA-Z.]/.test(str)){return false}for(i=0;i<a.length;i++){if(!o[a[i]]){o[a[i]]={};callthrough=true}o=o[a[i]]}if(!!noclobber){return callthrough}return true};
AJS.$.deactivateLinkedMenu=function(){};AJS.$.linkedMenuInstances=[];AJS.$.fn.linkedMenu=function(opts){var idx,that=this,onDisable,enabled=false,focusElement=function(elem){elem=AJS.$(elem);that.blur();elem.trigger("click","focus","mousedown")},keyHandler=function(e){var targ;if(e.keyCode===37||e.keyCode===39||e.keyCode===27){if(e.keyCode===37){targ=idx-1;if(idx-1>=0){if(isNotActive(that[targ])){idx=targ;focusElement(that[idx])}}else{targ=that.length-1;if(isNotActive(that[targ])){idx=targ;focusElement(that[idx])}}}else{if(e.keyCode===39){targ=idx+1;if(targ<that.length){if(isNotActive(that[targ])){idx=targ;focusElement(that[idx])}}else{targ=0;if(isNotActive(that[targ])){idx=targ;focusElement(that[idx])}}}else{that.disableLinkedMenu(e)}}e.preventDefault()}},isNotActive=function(elem){if(elem!==that[idx]){return true}},focusBridge=function(){if(isNotActive(this)){idx=AJS.$.inArray(this,that);focusElement(this)}},reflectionBridge=function(){var targ=AJS.$.inArray(this,AJS.$(opts.reflectFocus));if(isNotActive(that[targ])){idx=targ;focusElement(that[idx])}},enable=function(){var elem,clss;if(!enabled){AJS.$.currentLinkedMenu=that;if(opts.onFocusRemoveClass){elem=AJS.$(opts.onFocusRemoveClass);clss=opts.onFocusRemoveClass.match(/\.([a-z]*)$/);if(clss&&clss[1]&&elem.length>0){AJS.$(opts.onFocusRemoveClass).removeClass(clss[1]);onDisable=function(){AJS.$(elem).addClass(clss[1])}}}enabled=true;idx=AJS.$.inArray(this,that);that.mouseover(focusBridge);if(AJS.$.browser.mozilla){AJS.$(document).keypress(keyHandler)}else{AJS.$(document).keydown(keyHandler)}AJS.$(document).mousedown(that.disableLinkedMenu);if(opts.reflectFocus){AJS.$(opts.reflectFocus).mouseover(reflectionBridge)}}};that.disableLinkedMenu=function(e){AJS.$(document).unbind("keypress",keyHandler);AJS.$(document).unbind("keydown",keyHandler);that.unbind("mouseover",focusBridge);AJS.$(document).unbind("mousedown",arguments.callee);if(opts.reflectFocus){AJS.$(opts.reflectFocus).unbind("mouseover",reflectionBridge)}if(onDisable){onDisable()}that.blur();if(jQuery.fn.isDirty&&jQuery.fn.isDirty.fieldInFocus){AJS.$(jQuery.fn.isDirty.fieldInFocus).trigger("focus")}delete AJS.$.currentLinkedMenu;window.setTimeout(function(){enabled=false},200)};opts=opts||{};that.click(enable);return that};
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,escapeable=/[\\\"\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){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}return"\\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(typeof value.length==="number"&&!value.propertyIsEnumerable("length")){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();
(function(){var $doc=jQuery(document);function getWindow(){if(window.top){return window.top}else{return window}}function listenForLayerEvents($doc){$doc.bind("showLayer",function(e,type,item){var topWindow=getWindow().AJS;if(topWindow){if(topWindow.currentLayerItem&&topWindow.currentLayerItem.type!=="popup"&&item!==topWindow.currentLayerItem){topWindow.currentLayerItem.hide()}if(item){topWindow.currentLayerItem=item;topWindow.currentLayerItem.type=type}}}).bind("hideLayer",function(e,type,item){var topWindow=getWindow().AJS;if(topWindow.currentLayerItem&&item===topWindow.currentLayerItem){topWindow.currentLayerItem=null}}).click(function(){var topWindow=getWindow().AJS;if(topWindow.currentLayerItem&&topWindow.currentLayerItem.type!=="popup"){topWindow.currentLayerItem.hide()}})}$doc.bind("iframeAppended",function(e,iframe){iframe=jQuery(iframe);iframe.load(function(){listenForLayerEvents(iframe.contents())})});listenForLayerEvents($doc)})();
jQuery.namespace("jira.widget.dropdown");jira.widget.dropdown=function(){var instances=[];return{addInstance:function(){instances.push(this)},hideInstances:function(){var that=this;jQuery(instances).each(function(){if(that!==this){this.hideDropdown()}})},getHash:function(){if(!this.hash){this.hash={container:this.dropdown,hide:this.hideDropdown,show:this.displayDropdown}}return this.hash},displayDropdown:function(){jira.widget.dropdown.current=this;this.hideInstances();this.dropdown.css({display:"block"}).parent().css({position:"relative",zIndex:9000}).addClass("active");this.displayed=true},hideDropdown:function(){jira.widget.dropdown.current=null;this.dropdown.css({display:"none"}).parent().removeClass("active");this.dropdown.parent().css({zIndex:"1"});this.displayed=false},addShim:function(){jQuery.aop.after({target:this,method:"hideDropdown"},function(){if(this.shim){this.shim.css("display","none")}});jQuery.aop.after({target:this,method:"displayDropdown"},function(){if(!this.shim){this.shim=jQuery(document.createElement("iframe"));this.shim.attr({marginWidth:"0",marginHeight:"0",scrolling:"no",frameBorder:0,align:"left"}).css({position:"absolute",top:this.dropdown.css("top"),display:"none",left:this.dropdown.css("left"),right:this.dropdown.css("right"),height:0,width:0,listStyle:"none",border:"3",margin:"0",zIndex:"-1"}).insertBefore(this.dropdown)}else{this.shim.css({display:"block",height:this.dropdown.outerHeight()+"px",width:this.dropdown.outerWidth()+"px"})}})},addPageScroller:function(){var that=this,getScrollPosition=function(){return(that.dropdown.offset().top-jQuery(window).height())+that.dropdown.height()},enableDisplay=function(){that.displayed=true;that.eventBlockerEl.css({display:"none"})};jQuery.aop.before({target:this,method:"displayDropdown"},function(){if(!this.eventBlockerEl){this.eventBlockerEl=jQuery(document.createElement("div"));this.eventBlockerEl.appendTo(this.dropdown.parent()).css({position:"absolute",zIndex:"9999",top:0})}this.eventBlockerEl.css({height:this.dropdown.height()+"px",width:this.dropdown.width()+"px",left:this.dropdown.css("left"),right:this.dropdown.css("right"),display:"block"})});jQuery.aop.after({target:this,method:"displayDropdown"},function(){if(getScrollPosition()>jQuery(window).scrollTop()){jQuery("html,body").animate({scrollTop:getScrollPosition()},300,"linear",function(){enableDisplay()})}else{enableDisplay()}});jQuery.aop.after({target:this,method:"hideDropdown"},function(){if(jQuery("html,body").is(":animated")){jQuery("html,body").stop()}})},init:function(trigger,dropdown){var that=this;this.addInstance(this);this.dropdown=jQuery(dropdown);this.dropdown.css({display:"none"});this.addPageScroller();if(jQuery.browser.msie){this.addShim()}jQuery(document).keydown(function(e){if(e.keyCode===9){that.hideDropdown()}});if(trigger.target){jQuery.aop.before(trigger,function(){if(!that.displayed){that.displayDropdown()}})}else{that.dropdown.css("top",jQuery(trigger).outerHeight()+"px");trigger.click(function(e){if(!that.displayed){that.displayDropdown();e.stopPropagation()}else{that.hideDropdown()}e.preventDefault()})}jQuery(document.body).click(function(){if(that.displayed){that.hideDropdown()}})}}}();jira.widget.dropdown.Standard=function(trigger,dropdown){var that=begetObject(jira.widget.dropdown);that.init(trigger,dropdown);return that};jira.widget.dropdown.Autocomplete=function(trigger,dropdown){var that=begetObject(jira.widget.dropdown);that.init=function(trigger,dropdown){this.addInstance(this);this.dropdown=jQuery(dropdown).click(function(e){e.stopPropagation()});this.dropdown.css({display:"none"});this.addPageScroller();if(jQuery.browser.msie){this.addShim()}if(trigger.target){jQuery.aop.before(trigger,function(){if(!that.displayed){that.displayDropdown()}})}else{trigger.click(function(e){if(!that.displayed){that.displayDropdown();e.stopPropagation()}})}jQuery(document.body).click(function(){if(that.displayed){that.hideDropdown()}})};that.init(trigger,dropdown);return that};
jQuery.namespace("JIRA.Twixi");JIRA.ToggleBlock=Class.extend({getDefautOptions:function(){return{blockSelector:".twixi-block",triggerSelector:".twixi",eventType:"click",collapsedClass:"collapsed",expandedClass:"expanded",cookieName:"jira.viewissue.cong.cookie",cookieCollectionName:"twixi-blocks"}},_collapseTwixiBlocksFromCookie:function(){var block,val=readFromConglomerateCookie(this.options.cookieName,this.options.cookieCollectionName,"");if(/#\w+/.test(val)){block=AJS.$(val);if(block.is(this.options.blockSelector)){block.removeClass(this.options.expandedClass).addClass(this.options.collapsedClass)}}return this},_updateTwixiBlockIdInCookie:function(blockId){if(!/#\w+/.test(blockId)){return this}var val=readFromConglomerateCookie(this.options.cookieName,this.options.cookieCollectionName,""),blockLength=(","+val+",").indexOf(","+blockId+",")+1;if(blockLength){if(val.indexOf(","+blockId)+1){val=val.replace(","+blockId,"")}else{val=val.replace(blockId,"")}}else{val=val.length?val+","+blockId:blockId}saveToConglomerateCookie(this.options.cookieName,this.options.cookieCollectionName,val);return this},contract:function(block){block=jQuery(block);if(block.is(this.options.blockSelector)){block.removeClass(this.options.expandedClass).addClass(this.options.collapsedClass);this._updateTwixiBlockIdInCookie("#"+block.attr("id"))}return this},expand:function(block){block=jQuery(block);if(block.is(this.options.blockSelector)){block.removeClass(this.options.collapsedClass).addClass(this.options.expandedClass);this._updateTwixiBlockIdInCookie("#"+block.attr("id"))}return this},toggle:function(twikiBlockChild){function clearSelection(){var sel;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(window.getSelection){sel=window.getSelection();if(sel&&sel.removeAllRanges){sel.removeAllRanges()}}}}var block=AJS.$(twikiBlockChild).closest(this.options.blockSelector);if(!block.hasClass(this.options.collapsedClass)){this.contract(block)}else{this.expand(block)}clearSelection();block.find(this.options.triggerSelector+":visible").focus();return this},addTrigger:function(triggerSelector,eventType){var thisInstance=this;if(triggerSelector){eventType=eventType||"click";AJS.$(triggerSelector).live(eventType,function(e){thisInstance.toggle(this);e.preventDefault()})}return this},addCallback:function(methodName,callback){jQuery.aop.after({target:this,method:methodName},callback);return this},init:function(options){var thisInstance=this;options=options||{};this.options=jQuery.extend(this.getDefautOptions(),options);AJS.$(this.options.triggerSelector).live(this.options.eventType,function(e){thisInstance.toggle(this);e.preventDefault()});jQuery(function(){thisInstance._collapseTwixiBlocksFromCookie()})}});
jQuery.fn.toggleBlock=function(options){options=options||{};options.blockSelector=this.selector;return new JIRA.ToggleBlock(options)};
jira.widget.jsonLister=function(options){options=options||{};AJS.$.extend(options,{ajaxOptions:function(){return{url:this.trigger.attr("href"),data:"json=true&decorator=none",dataType:"json"}},formatResults:function(response){var html;AJS.$(response).each(function(){var listElNode=AJS.$("<li>"),linkNode;if(this.groupmarker){listElNode.addClass("groupmarker")}if(this.text&&this.url&&this.url!==""){linkNode=AJS.$("<a>").addClass("item").attr("href",this.url).text(this.text).appendTo(listElNode);if(this.text.length>100){linkNode.css({whiteSpace:"normal",width:400+"px"})}}else{if(this.text){listElNode.addClass("none").text(this.text)}}if(!html){html=AJS.$(listElNode)}else{html=html.add(listElNode)}});return html}});return AJS.dropDown.Ajax.call(this,options)};AJS.$.fn.jsonLister=function(options){return jira.widget.jsonLister.call(this,options)};
jQuery.fn.tooltip=function(){var defaults={activeClass:"active",delay:0.8};return function(options){var tts=[];options=jQuery.extend(defaults,options);this.each(function(){var $this=jQuery(this);$this.extend($this,{showToolTip:function(){if(!$this.hasClass(options.activeClass)){$this.showToolTip.timer=setTimeout(function(){$this.addClass(options.activeClass);if(options.onShow){options.onShow.call($this)}},options.delay*1000)}else{clearTimeout($this.hideToolTip.timer)}},hideToolTip:function(){if(!$this.hasClass(options.activeClass)){clearTimeout($this.showToolTip.timer)}else{$this.hideToolTip.timer=setTimeout(function(){$this.removeClass(options.activeClass);if(options.onHide){options.onHide.call($this)}},options.delay*1000)}}});$this.click(function(){clearTimeout($this.showToolTip.timer);$this.removeClass(options.activeClass);if(options.onHide){options.onHide.call($this)}});$this.hover($this.showToolTip,$this.hideToolTip);tts.push($this)});return jQuery(tts)}}();
jQuery.fn.toggleField=function(field){var that=this,field=jQuery(field),setFieldAttr=function(){field.attr("disabled",function(){if(that.attr("checked")===false){that.parent().addClass("disabled");return true}else{that.parent().removeClass("disabled");return false}}());return arguments.callee}();jQuery(document[this.attr("name")]).click(setFieldAttr).change(setFieldAttr);return this};
jQuery.fn.isDirty=function(){var pageModified,fields=[];window.onbeforeunload=function(){var onunload=window.onbeforeunload;if(pageModified!==false){jQuery.each(fields,function(){if(this.initVal!==AJS.$(this).val()){pageModified=true;return false}})}if(pageModified){window.onbeforeunload=null;window.setTimeout(function(){jQuery(document).bind("mousemove",function(){window.onbeforeunload=onunload;jQuery(document).unbind("mousemove",arguments.callee)})},1000);pageModified=undefined;return AJS.params.dirtyMessage}};return function(options){if(this.length===0){return}function storeField(e){var $this=jQuery(this);jQuery.fn.isDirty.fieldInFocus=jQuery(this);if(jQuery.inArray(this,fields)===-1){this.initVal=$this.val();fields.push(this);$this.die(e.type,storeField)}}jQuery(":not(:input)").live("mousedown",function(){delete jQuery.fn.isDirty.fieldInFocus});jQuery(":input[type != hidden]",this.selector).bind("keydown",storeField).bind("keypress",storeField).bind("click",storeField);jQuery(options.ignoreUnloadFromElems).live("mousedown",function(){pageModified=false});this.each(function(){this.onsubmit=function(onsubmit){return function(){pageModified=false;if(onsubmit){return onsubmit.apply(this,arguments)}}}(this.onsubmit);AJS.$(this).submit(function(){pageModified=false})})}}();jQuery(function(){jQuery("form[name=jiraform], #jqlform, form[name=filterform]").isDirty({ignoreUnloadFromElems:"#switchnavtype, #refresh-dependant-fields, #projectRefreshPanel"})});
jQuery.noConflict();(function($){$.readData=function(s){var r={},n="";$(s).children().each(function(i){if(i%2){r[n]=jQuery.trim($(this).text())}else{n=jQuery.trim($(this).text())}}).remove();$(s).remove();return r}})(jQuery);jQuery.aop.after({target:jQuery,method:"append"},function(elem){var iframes;if(elem.attr("tagName")==="iframe"){if(!elem.data("iframeAppendedFired")){elem.data("iframeAppendedFired",true);jQuery(document).trigger("iframeAppended",elem)}}iframes=jQuery("iframe",elem);if(iframes.length>0){jQuery.each(iframes,function(i){var iframe=iframes.eq(i);if(!iframe.data("iframeAppendedFired")){iframe.data("iframeAppendedFired",true);jQuery(document).trigger("iframeAppended",iframes.eq(i))}})}return elem});AJS.isSelenium=function(){return window.name==="selenium_main_app_window"};begetObject=function(obj){var f=function(){};f.prototype=obj;return new f()};jQuery(function(){jQuery("textarea").keypress(submitOnCtrlEnter)});jQuery(function(){var jQueryRef=jQuery("#jqltext");if(jQueryRef){if(!(AJS.$.browser.msie&&(AJS.$.browser.version=="8.0"))){jQueryRef.focus()}jQueryRef.unbind("keypress",submitOnCtrlEnter).keypress(submitOnEnter);if(!(AJS.$.browser.msie&&(AJS.$.browser.version=="8.0"))){if(jQueryRef.val()){var end=jQueryRef.val().length;jQueryRef.selectionRange(end,end)}}}});function submitOnEnter(e){if(e.keyCode==13&&e.target.form&&!e.ctrlKey&&!e.shiftKey){jQuery(e.target.form).submit();return false}return true}function submitOnCtrlEnter(e){if(e.ctrlKey&&e.target.form&&(e.keyCode==13||e.keyCode==10)){jQuery(e.target.form).submit();return false}return true}function getMultiSelectValues(selectObject){var selectedValues="";for(var i=0;i<selectObject.length;i++){if(selectObject.options[i].selected){if(selectObject.options[i].value&&selectObject.options[i].value.length>0){selectedValues=selectedValues+" "+selectObject.options[i].value}}}return selectedValues}function getMultiSelectValuesAsArray(selectObject){var selectedValues=new Array();for(var i=0;i<selectObject.length;i++){if(selectObject.options[i].selected){if(selectObject.options[i].value&&selectObject.options[i].value.length>0){selectedValues[selectedValues.length]=selectObject.options[i].value}}}return selectedValues}function arrayContains(array,value){for(var i=0;i<array.length;i++){if(array[i]==value){return true}}return false}function addClassName(elementId,classNameToAdd){var elem=document.getElementById(elementId);if(elem){elem.className=elem.className+" "+classNameToAdd}}function removeClassName(elementId,classNameToRemove){var elem=document.getElementById(elementId);if(elem){elem.className=(" "+elem.className+" ").replace(" "+classNameToRemove+" "," ")}}function getEscapedFieldValue(id){var e=document.getElementById(id);if(e.value){return id+"="+encodeURIComponent(e.value)}else{return""}}function getEscapedFieldValues(ids){var s="";for(i=0;i<ids.length;i++){s=s+"&"+getEscapedFieldValue(ids[i])}return s}var GuiPrefs={toggleVisibility:function(elementId){var elem=document.getElementById(elementId);if(elem){if(readFromConglomerateCookie("jira.conglomerate.cookie",elementId,"1")=="1"){elem.style.display="none";removeClassName(elementId+"header","headerOpened");addClassName(elementId+"header","headerClosed");saveToConglomerateCookie("jira.conglomerate.cookie",elementId,"0")}else{elem.style.display="";removeClassName(elementId+"header","headerClosed");addClassName(elementId+"header","headerOpened");eraseFromConglomerateCookie("jira.conglomerate.cookie",elementId)}}}};function toggle(elementId){GuiPrefs.toggleVisibility(elementId)}function toggleDivsWithCookie(elementShowId,elementHideId){var elementShow=document.getElementById(elementShowId);var elementHide=document.getElementById(elementHideId);if(elementShow.style.display=="none"){elementHide.style.display="none";elementShow.style.display="block";saveToConglomerateCookie("jira.viewissue.cong.cookie",elementShowId,"1");saveToConglomerateCookie("jira.viewissue.cong.cookie",elementHideId,"0")}else{elementShow.style.display="none";elementHide.style.display="block";saveToConglomerateCookie("jira.viewissue.cong.cookie",elementHideId,"1");saveToConglomerateCookie("jira.viewissue.cong.cookie",elementShowId,"0")}}function restoreDivFromCookie(elementId,cookieName,defaultValue){if(defaultValue==null){defaultValue="1"}var elem=document.getElementById(elementId);if(elem){if(readFromConglomerateCookie(cookieName,elementId,defaultValue)!="1"){elem.style.display="none";removeClassName(elementId+"header","headerOpened");addClassName(elementId+"header","headerClosed")}else{elem.style.display="";removeClassName(elementId+"header","headerClosed");addClassName(elementId+"header","headerOpened")}}}function restore(elementId){restoreDivFromCookie(elementId,"jira.conglomerate.cookie","1")}function saveToConglomerateCookie(cookieName,name,value){var cookieValue=getCookieValue(cookieName);cookieValue=addOrAppendToValue(name,value,cookieValue);saveCookie(cookieName,cookieValue,365)}function readFromConglomerateCookie(cookieName,name,defaultValue){var cookieValue=getCookieValue(cookieName);var value=getValueFromCongolmerate(name,cookieValue);if(value!=null){return value}return defaultValue}function eraseFromConglomerateCookie(cookieName,name){saveToConglomerateCookie(cookieName,name,"")}function getValueFromCongolmerate(name,cookieValue){if(cookieValue==null){cookieValue=""}var eq=name+"=";var cookieParts=cookieValue.split("|");for(var i=0;i<cookieParts.length;i++){var cp=cookieParts[i];while(cp.charAt(0)==" "){cp=cp.substring(1,cp.length)}if(cp.indexOf(name)==0){return cp.substring(eq.length,cp.length)}}return null}function addOrAppendToValue(name,value,cookieValue){var newCookieValue="";if(cookieValue==null){cookieValue=""}var cookieParts=cookieValue.split("|");for(var i=0;i<cookieParts.length;i++){var cp=cookieParts[i];if(cp!=""){while(cp.charAt(0)==" "){cp=cp.substring(1,cp.length)}if(cp.indexOf(name)!=0){newCookieValue+=cp+"|"}}}if(value!=null&&value!=""){var pair=name+"="+value;if((newCookieValue.length+pair.length)<4020){newCookieValue+=pair}}return newCookieValue}function getCookieValue(name){var eq=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(eq)==0){return c.substring(eq.length,c.length)}}return null}function saveCookie(name,value,days){var ex;if(days){var d=new Date();d.setTime(d.getTime()+(days*24*60*60*1000));ex="; expires="+d.toGMTString()}else{ex=""}document.cookie=name+"="+value+ex+((contextPath)?";path="+contextPath:";path=/")}function readCookie(name,defaultValue){var cookieVal=getCookieValue(name);if(cookieVal!=null){return cookieVal}if(defaultValue){saveCookie(name,defaultValue,365);return defaultValue}else{return null}}function eraseCookie(name){saveCookie(name,"",-1)}function recolourSimpleTableRows(tableId){recolourTableRows(tableId,"rowNormal","rowAlternate",tableId+"_empty")}function recolourTableRows(tableId,rowNormal,rowAlternate,emptyTableId){var tbl=document.getElementById(tableId);var emptyTable=document.getElementById(emptyTableId);var alternate=false;var rowsFound=0;var rows=tbl.rows;var firstVisibleRow=null;var lastVisibleRow=null;for(var i=1;i<rows.length;i++){var row=rows[i];if(row.style.display!="none"){if(!alternate){row.className=rowNormal}else{row.className=rowAlternate}rowsFound++;alternate=!alternate}if(row.style.display!="none"){if(firstVisibleRow==null){firstVisibleRow=row}lastVisibleRow=row}}if(firstVisibleRow!=null){firstVisibleRow.className=firstVisibleRow.className+" first-row"}if(lastVisibleRow!=null){lastVisibleRow.className=lastVisibleRow.className+" last-row"}if(emptyTable){if(rowsFound==0){tbl.style.display="none";emptyTable.style.display=""}else{tbl.style.display="";emptyTable.style.display="none"}}}function htmlEscape(str){var divE=document.createElement("div");divE.appendChild(document.createTextNode(str));return divE.innerHTML}function atl_token(){return jQuery("meta#atlassian-token").attr("content")}jQuery.namespace("jira.app.ready");jira.app.ready=function(func){jQuery(document).ready(func)};jQuery(function(){AJS.$(".dismissable-hint").each(function(){var $this=AJS.$(this);var state=readFromConglomerateCookie("jira.hintstate.cookie",$this.attr("id"),"0");if(state==="0"){$this.show();$this.find(".hide").click(function(e){saveToConglomerateCookie("jira.hintstate.cookie",$this.attr("id"),"1");$this.hide();e.preventDefault()})}})});jQuery(function(){AJS.$("label.overlabel").each(function(){var label=AJS.$(this).removeClass("overlabel").addClass("overlabel-apply show").click(function(){AJS.$("#"+AJS.$(this).attr("for")).focus()});var field=AJS.$("#"+label.attr("for")).focus(function(){label.removeClass("show").hide()}).blur(function(){if(AJS.$(this).val()===""){label.addClass("show").show()}});if(field.val()!==""){label.removeClass("show").hide()}})});jQuery(function(){AJS.dropDown.Ajax.ActionOptions={selector:".action-dropdown",trigger:".aui-dd-link",ajaxOptions:function(){return{url:this.trigger.attr("href"),dataType:"json"}},selectionHandler:function(e,selected){if(selected){if(e.type==="keydown"){if(selected.get(0).nodeName.toLowerCase()!=="a"){window.location=selected.find("a").attr("href")}else{window.location=selected.attr("href")}}}},formatResults:function(response){var html=AJS.$("<div/>");var listNode;var listItemNode,linkNode;listNode=AJS.$("<ul/>").addClass("operations").addClass("first");listItemNode=AJS.$("<li/>").addClass("dropdown-item");linkNode=AJS.$("<a/>").attr("href",contextPath+"/browse/"+response.key).text(response.viewIssue);listItemNode.append(linkNode);listNode.append(listItemNode);html.append(listNode);var addSelected=function(issueId){if(self!=top){return encodeURIComponent(window.top.location.href)}var url=window.location.href;var newUrl=url;if(/selectedIssueId=[0-9]*/.test(url)){newUrl=newUrl.replace(/selectedIssueId=[0-9]*/g,"selectedIssueId="+issueId)}else{if(/\?/.test(url)){newUrl=newUrl+"&"}else{newUrl=newUrl+"?"}newUrl=newUrl+"selectedIssueId="+issueId}return encodeURIComponent(newUrl)};if(response.actions){listNode=AJS.$("<ul/>").addClass("operations");AJS.$(response.actions).each(function(){listItemNode=AJS.$("<li/>").addClass("dropdown-item");var url=contextPath+"/secure/WorkflowUIDispatcher.jspa?id="+response.id+"&action="+this.action+"&atl_token="+response.atlToken;url=url+"&returnUrl="+addSelected(response.id);linkNode=AJS.$("<a/>").attr("href",url).text(this.name);listItemNode.append(linkNode);listNode.append(listItemNode)});html.append(listNode)}if(response.operations){listNode=AJS.$("<ul/>").addClass("operations");AJS.$(response.operations).each(function(){listItemNode=AJS.$("<li/>").addClass("dropdown-item");var url=this.url;url=url+"&returnUrl="+addSelected(response.id);url=url+"&atl_token="+response.atlToken;linkNode=AJS.$("<a/>").attr("href",url).text(this.name);listItemNode.append(linkNode);listNode.append(listItemNode)});html.append(listNode)}if(listNode){listNode.addClass("last")}return html}};AJS.dropDown.actionDropdowns=AJS.dropDown.Ajax.call(this,AJS.dropDown.Ajax.ActionOptions);AJS.$("#navigator-options .aui-dd-parent").dropDown("Standard",{trigger:".aui-dd-link"});AJS.$(".command-bar .aui-dd-parent").dropDown("Standard",{trigger:"a.drop"});AJS.$(".dashboard .menu .aui-dd-parent").dropDown("Standard",{trigger:".aui-dd-link"});AJS.$("#main-nav .aui-dd-link").linkedMenu({reflectFocus:"#main-nav .lnk",onFocusRemoveClass:"#main-nav .selected"});AJS.$("#navigator-options .aui-dd-link").linkedMenu()});AJS.$(function(){AJS.$(".fieldTabs li").click(function(e){e.preventDefault();e.stopPropagation();var $this=AJS.$(this);if(!$this.hasClass("active")){AJS.$(".fieldTabs li.active").removeClass("active");$this.addClass("active");AJS.$(".fieldTabArea.active").removeClass("active");AJS.$("#"+$this.attr("rel")).addClass("active")}})});AJS.$(function(){AJS.$("#commentFieldArea #comment").expandOnInput();AJS.$("#environmentFieldArea #environment").expandOnInput();AJS.$("#descriptionFieldArea #description").expandOnInput();jQuery(document).bind("showWikiInput",function(){AJS.$("#commentFieldArea #comment").expandOnInput();AJS.$("#environmentFieldArea #environment").expandOnInput();AJS.$("#descriptionFieldArea #description").expandOnInput()})});jQuery(function(){var issueNavWrap=jQuery(".issue-nav-wrap"),issueNavWrapWidth=issueNavWrap.width(),resultsResize=function(){issueNavWrap.css("width",97/issueNavWrapWidth*(issueNavWrapWidth-(parseInt(jQuery(document.documentElement).attr("scrollWidth"))-jQuery(window).width()))+"%")};jQuery(window).resize(resultsResize);resultsResize()});(function(){var actionTwixi,moduleTwixi;actionTwixi=jQuery(".twixi-block").toggleBlock({cookieName:"twixi"}).addCallback("toggle",function(){jQuery("#stalker").trigger("stalkerHeightUpdated")}).addTrigger(".action-details","dblclick")})();
AJS.InlineForm=function(options){var opts={width:400,height:200,id:"default_inlineform"};AJS.$.extend(opts,options);var popup=AJS.popup(opts.width,opts.height,opts.id);var keypressListener=function(e){if(e.keyCode===27){popup.hide()}};AJS.$.extend(popup,{setContent:function(response,opts){popup.element.empty().html(response).addClass("inlineform").prepend(AJS.$("<button class='close'></button>"));popup.element.find("form").submit(function(e){var $this=AJS.$(this);$this.addClass("loading");$this.find("input[type='submit']").attr("disabled","true");AJS.$.ajax({url:$this.attr("action")+"?decorator=none&"+$this.serialize(),method:"get",data:{inline:true,decorator:"inline"},dataType:"html",complete:function(opts){return function(XMLHttpRequest,textStatus){$this.removeClass("loading");if(XMLHttpRequest.status===204||XMLHttpRequest.status==1223){opts.callback();if(opts.autoClose){popup.hide()}}else{if(XMLHttpRequest.status===200){popup.setContent(XMLHttpRequest.responseText,opts)}}}}(opts)});return false});popup.element.find("button.close").click(function(e){popup.hide();return false});if(popup.changeSize){popup.element.css("height",null);popup.changeSize(undefined,popup.element.outerHeight())}},init:function(options){var initOpts={callback:function(){window.location.reload()},autoClose:true};AJS.$.extend(initOpts,options);AJS.$.ajax({url:initOpts.url,data:{inline:true,decorator:"inline"},method:"get",dataType:"html",complete:function(XMLHttpRequest,textStatus){if(XMLHttpRequest.status===204||XMLHttpRequest.status==1223){initOpts.callback();if(initOpts.autoClose){popup.hide()}}else{if(XMLHttpRequest.status===200){if(popup.changeSize){popup.element.css("height","")}popup.setContent(XMLHttpRequest.responseText,initOpts);AJS.$(document).keydown(keypressListener);popup.show();if(initOpts.formLoad){initOpts.formLoad()}AJS.$("#"+opts.id+" form :input:first").focus();if(popup.changeSize){popup.changeSize(undefined,popup.element.outerHeight())}}}}})}});AJS.$.aop.before({target:popup,method:"hide"},function(){AJS.$(document).unbind("keydown",keypressListener)});return popup};jQuery(function(){var confirm=AJS.InlineForm({id:"delete-dshboard"});AJS.$("a.icon-tools").live("mousedown",function(e){AJS.$("a#delete_dashboard").unbind("mousedown").click(function(e){e.stopPropagation();e.preventDefault();confirm.element.click();var dashId=/pageId=([0-9]*)/.exec(AJS.$(this).attr("href"))[1];confirm.init({url:contextPath+"/secure/DeletePortalPage!default.jspa?pageId="+dashId+"&decorator=none",callback:function(){window.location=contextPath+"/secure/Dashboard.jspa"},autoClose:false})});AJS.$(this).die(e.type,arguments.callee)})});

