$j.cookie=function(a,b,c){if(typeof b!="undefined"){c=c||{};if(b===null){b="";c.expires=-1}var d="";if(c.expires&&(typeof c.expires=="number"||c.expires.toUTCString)){if(typeof c.expires=="number"){d=new Date;d.setTime(d.getTime()+c.expires*24*60*60*1E3)}else d=c.expires;d="; expires="+d.toUTCString()}var e=c.path?"; path="+c.path:"",g=c.domain?"; domain="+c.domain:"";c=c.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(b),d,e,g,c].join("")}else{b=null;if(document.cookie&&document.cookie!=
""){c=document.cookie.split(";");for(d=0;d<c.length;d++){e=$j.trim(c[d]);if(e.substring(0,a.length+1)==a+"="){b=decodeURIComponent(e.substring(a.length+1));break}}}return b}};
(function(a){var b={put:function(f,i){(i||window).location.hash=f},get:function(f){f=(f||window).location.hash.replace(/^#/,"");return a.browser.fx?f:decodeURIComponent(f)}},c={id:"__jQuery_history",init:function(){var f='<iframe id="'+this.id+'" style="display:none" src="javascript:false;" />';a("body").prepend(f);return this},_document:function(){return a("#"+this.id)[0].contentWindow.document},put:function(f){var i=this._document();i.open();i.close();b.put(f,i)},get:function(){return b.get(this._document())}},
d={appState:undefined,callback:undefined,init:function(){},check:function(){},load:function(){}};a.history=d;var e={init:function(f){d.callback=f;f=b.get();(d.appState=f)&&d.callback(f);setInterval(d.check,100)},check:function(){var f=b.get();if(f!=d.appState){d.appState=f;d.callback(f)}},load:function(f){if(f!=d.appState){b.put(f);d.appState=f;d.callback(f)}}},g={init:function(f){d.callback=f;f=b.get();d.appState=f;c.init().put(f);f&&d.callback(f);setInterval(d.check,100)},check:function(){var f=
c.get();if(f!=d.appState){b.put(f);d.appState=f;d.callback(f)}},load:function(f){if(f!=d.appState){b.put(f);c.put(f);d.appState=f;d.callback(f)}}};a.browser.msie&&(a.browser.version<8||document.documentMode<8)?a.extend(d,g):a.extend(d,e)})(jQuery);
(function(a){a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.8.2",plugin:{add:function(b,c,d){b=a.ui[b].prototype;for(var e in d){b.plugins[e]=b.plugins[e]||[];b.plugins[e].push([c,d[e]])}},call:function(b,c,d){if((c=b.plugins[c])&&b.element[0].parentNode)for(var e=0;e<c.length;e++)b.options[c[e][0]]&&c[e][1].apply(b.element,d)}},contains:function(b,c){return document.compareDocumentPosition?b.compareDocumentPosition(c)&16:b!==c&&b.contains(c)},hasScroll:function(b,c){if(a(b).css("overflow")==
"hidden")return false;c=c&&c=="left"?"scrollLeft":"scrollTop";var d=false;if(b[c]>0)return true;b[c]=1;d=b[c]>0;b[c]=0;return d},isOverAxis:function(b,c,d){return b>c&&b<c+d},isOver:function(b,c,d,e,g,f){return a.ui.isOverAxis(b,d,g)&&a.ui.isOverAxis(c,e,f)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,
NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b==="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();c&&c.call(d)},b)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect",
"none")},scrollParent:function(){var b;b=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",
1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(b){if(b!==undefined)return this.css("zIndex",b);if(this.length){b=a(this[0]);for(var c;b.length&&b[0]!==document;){c=b.css("position");if(c=="absolute"||c=="relative"||c=="fixed"){c=parseInt(b.css("zIndex"));if(!isNaN(c)&&c!=0)return c}b=b.parent()}}return 0}});a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){var c=b.nodeName.toLowerCase(),d=a.attr(b,"tabindex");return(/input|select|textarea|button|object/.test(c)?
!b.disabled:"a"==c||"area"==c?b.href||!isNaN(d):!isNaN(d))&&!a(b)["area"==c?"parents":"closest"](":hidden").length},tabbable:function(b){var c=a.attr(b,"tabindex");return(isNaN(c)||c>=0)&&a(b).is(":focusable")}})}})(jQuery);
(function(a){var b=a.fn.remove;a.fn.remove=function(c,d){return this.each(function(){if(!d)if(!c||a.filter(c,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")});return b.call(a(this),c,d)})};a.widget=function(c,d,e){var g=c.split(".")[0],f;c=c.split(".")[1];f=g+"-"+c;if(!e){e=d;d=a.Widget}a.expr[":"][f]=function(i){return!!a.data(i,c)};a[g]=a[g]||{};a[g][c]=function(i,k){arguments.length&&this._createWidget(i,k)};d=new d;d.options=a.extend({},d.options);a[g][c].prototype=
a.extend(true,d,{namespace:g,widgetName:c,widgetEventPrefix:a[g][c].prototype.widgetEventPrefix||c,widgetBaseClass:f},e);a.widget.bridge(c,a[g][c])};a.widget.bridge=function(c,d){a.fn[c]=function(e){var g=typeof e==="string",f=Array.prototype.slice.call(arguments,1),i=this;e=!g&&f.length?a.extend.apply(null,[true,e].concat(f)):e;if(g&&e.substring(0,1)==="_")return i;g?this.each(function(){var k=a.data(this,c),m=k&&a.isFunction(k[e])?k[e].apply(k,f):k;if(m!==k&&m!==undefined){i=m;return false}}):this.each(function(){var k=
a.data(this,c);if(k){e&&k.option(e);k._init()}else a.data(this,c,new d(e,this))});return i}};a.Widget=function(c,d){arguments.length&&this._createWidget(c,d)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(c,d){this.element=a(d).data(this.widgetName,this);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(d)[this.widgetName],c);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();
this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c,g=this;if(arguments.length===0)return a.extend({},g.options);if(typeof c==="string"){if(d===undefined)return this.options[c];e={};e[c]=d}a.each(e,function(f,
i){g._setOption(f,i)});return g},_setOption:function(c,d){this.options[c]=d;if(c==="disabled")this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",d);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(c,d,e){var g=this.options[c];d=a.Event(d);d.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();e=e||{};if(d.originalEvent){c=
a.event.props.length;for(var f;c;){f=a.event.props[--c];d[f]=d.originalEvent[f]}}this.element.trigger(d,e);return!(a.isFunction(g)&&g.call(this.element[0],d,e)===false||d.isDefaultPrevented())}}})(jQuery);
(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(b){b.originalEvent=b.originalEvent||{};if(!b.originalEvent.mouseHandled){this._mouseStarted&&
this._mouseUp(b);this._mouseDownEvent=b;var c=this,d=b.which==1,e=typeof this.options.cancel=="string"?a(b.target).parents().add(b.target).filter(this.options.cancel).length:false;if(!d||e||!this._mouseCapture(b))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();
return true}}this._mouseMoveDelegate=function(g){return c._mouseMove(g)};this._mouseUpDelegate=function(g){return c._mouseUp(g)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||b.preventDefault();return b.originalEvent.mouseHandled=true}},_mouseMove:function(b){if(a.browser.msie&&!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&
this._mouseDelayMet(b))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false)?this._mouseDrag(b):this._mouseUp(b);return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=b.target==this._mouseDownEvent.target;this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-
b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(a){a.widget("ui.draggable",a.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(b){var c=
this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(b);if(!this.handle)return false;return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager)a.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};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();if(this._trigger("start",b)===false){this._clear();return false}this._cacheHelperProportions();
a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,c){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();if(this._trigger("drag",b,c)===false){this._mouseUp({});return false}this.position=c.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";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return false},_mouseStop:function(b){var c=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)c=a.ui.ddmanager.drop(this,b);if(this.dropped){c=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,
c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",b)!==false&&d._clear()})}else this._trigger("stop",b)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
b.target)c=true});return c},_createHelper:function(b){var c=this.options;b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone():this.element;b.parents("body").length||b.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);b[0]!=this.element[0]&&!/(fixed|absolute)/.test(b.css("position"))&&b.css("position","absolute");return b},_adjustOffsetFromHelper:function(b){if(typeof b=="string")b=b.split(" ");if(a.isArray(b))b={left:+b[0],top:+b[1]||
0};if("left"in b)this.offset.click.left=b.left+this.margins.left;if("right"in b)this.offset.click.left=this.helperProportions.width-b.right+this.margins.left;if("top"in b)this.offset.click.top=b.top+this.margins.top;if("bottom"in b)this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],
this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if(b.containment==
"parent")b.containment=this.helper[0].parentNode;if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&
b.containment.constructor!=Array){var c=a(b.containment)[0];if(c){b=a(b.containment).offset();var d=a(c).css("overflow")!="hidden";this.containment=[b.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,b.left+(d?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),
10)||0)-this.helperProportions.width-this.margins.left,b.top+(d?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(b.containment.constructor==Array)this.containment=b.containment},_convertPositionTo:function(b,c){if(!c)c=this.position;b=b=="absolute"?1:-1;var d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);return{top:c.top+this.offset.relative.top*b+this.offset.parent.top*b-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop())*b),left:c.left+this.offset.relative.left*b+this.offset.parent.left*b-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
e?0:d.scrollLeft())*b)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),g=b.pageX,f=b.pageY;if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0])g=this.containment[0]+this.offset.click.left;if(b.pageY-this.offset.click.top<this.containment[1])f=this.containment[1]+
this.offset.click.top;if(b.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(b.pageY-this.offset.click.top>this.containment[3])f=this.containment[3]+this.offset.click.top}if(c.grid){f=this.originalPageY+Math.round((f-this.originalPageY)/c.grid[1])*c.grid[1];f=this.containment?!(f-this.offset.click.top<this.containment[1]||f-this.offset.click.top>this.containment[3])?f:!(f-this.offset.click.top<this.containment[1])?f-c.grid[1]:f+c.grid[1]:f;g=this.originalPageX+
Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:!(g-this.offset.click.left<this.containment[0])?g-c.grid[0]:g+c.grid[0]:g}}return{top:f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:g-this.offset.click.left-
this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag")this.positionAbs=
this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.2"});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,g=a.extend({},c,{item:d.element});d.sortables=[];a(e.connectToSortable).each(function(){var f=a.data(this,"sortable");
if(f&&!f.options.disabled){d.sortables.push({instance:f,shouldRevert:f.options.revert});f._refreshItems();f._trigger("activate",b,g)}})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(b);this.instance.options.helper=this.instance.options._helper;
d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",b,e)}})},drag:function(b,c){var d=a(this).data("draggable"),e=this;a.each(d.sortables,function(){this.instance.positionAbs=d.positionAbs;this.instance.helperProportions=d.helperProportions;this.instance.offset.click=d.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
1;this.instance.currentItem=a(e).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};b.target=this.instance.currentItem[0];this.instance._mouseCapture(b,true);this.instance._mouseStart(b,true,true);this.instance.offset.click.top=d.offset.click.top;this.instance.offset.click.left=d.offset.click.left;this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top;d._trigger("toSortable",b);d.dropped=this.instance.element;d.currentItem=d.element;this.instance.fromOutside=d}this.instance.currentItem&&this.instance._mouseDrag(b)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",b,this.instance._uiHash(this.instance));this.instance._mouseStop(b,true);this.instance.options.helper=
this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();d._trigger("fromSortable",b);d.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("draggable").options;if(b.css("cursor"))c._cursor=b.css("cursor");b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=
a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(b,c){b=a(c.helper);c=a(this).data("draggable").options;
if(b.css("opacity"))c._opacity=b.css("opacity");b.css("opacity",c.opacity)},stop:function(b,c){b=a(this).data("draggable").options;b._opacity&&a(c.helper).css("opacity",b._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML")b.overflowOffset=b.scrollParent.offset()},drag:function(b){var c=a(this).data("draggable"),d=c.options,e=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!=
"HTML"){if(!d.axis||d.axis!="x")if(c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<d.scrollSensitivity)c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+d.scrollSpeed;else if(b.pageY-c.overflowOffset.top<d.scrollSensitivity)c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-d.scrollSpeed;if(!d.axis||d.axis!="y")if(c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity)c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+d.scrollSpeed;else if(b.pageX-
c.overflowOffset.left<d.scrollSensitivity)c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-d.scrollSpeed}else{if(!d.axis||d.axis!="x")if(b.pageY-a(document).scrollTop()<d.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed);else if(a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed);if(!d.axis||d.axis!="y")if(b.pageX-a(document).scrollLeft()<d.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()-
d.scrollSpeed);else if(a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}e!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}});a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("draggable"),c=b.options;b.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var d=a(this),e=d.offset();this!=b.element[0]&&b.snapElements.push({item:this,
width:d.outerWidth(),height:d.outerHeight(),top:e.top,left:e.left})})},drag:function(b,c){for(var d=a(this).data("draggable"),e=d.options,g=e.snapTolerance,f=c.offset.left,i=f+d.helperProportions.width,k=c.offset.top,m=k+d.helperProportions.height,p=d.snapElements.length-1;p>=0;p--){var r=d.snapElements[p].left,E=r+d.snapElements[p].width,z=d.snapElements[p].top,B=z+d.snapElements[p].height;if(r-g<f&&f<E+g&&z-g<k&&k<B+g||r-g<f&&f<E+g&&z-g<m&&m<B+g||r-g<i&&i<E+g&&z-g<k&&k<B+g||r-g<i&&i<E+g&&z-g<m&&
m<B+g){if(e.snapMode!="inner"){var t=Math.abs(z-m)<=g,C=Math.abs(B-k)<=g,v=Math.abs(r-i)<=g,F=Math.abs(E-f)<=g;if(t)c.position.top=d._convertPositionTo("relative",{top:z-d.helperProportions.height,left:0}).top-d.margins.top;if(C)c.position.top=d._convertPositionTo("relative",{top:B,left:0}).top-d.margins.top;if(v)c.position.left=d._convertPositionTo("relative",{top:0,left:r-d.helperProportions.width}).left-d.margins.left;if(F)c.position.left=d._convertPositionTo("relative",{top:0,left:E}).left-d.margins.left}var Q=
t||C||v||F;if(e.snapMode!="outer"){t=Math.abs(z-k)<=g;C=Math.abs(B-m)<=g;v=Math.abs(r-f)<=g;F=Math.abs(E-i)<=g;if(t)c.position.top=d._convertPositionTo("relative",{top:z,left:0}).top-d.margins.top;if(C)c.position.top=d._convertPositionTo("relative",{top:B-d.helperProportions.height,left:0}).top-d.margins.top;if(v)c.position.left=d._convertPositionTo("relative",{top:0,left:r}).left-d.margins.left;if(F)c.position.left=d._convertPositionTo("relative",{top:0,left:E-d.helperProportions.width}).left-d.margins.left}if(!d.snapElements[p].snapping&&
(t||C||v||F||Q))d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[p].item}));d.snapElements[p].snapping=t||C||v||F||Q}else{d.snapElements[p].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[p].item}));d.snapElements[p].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var b=a(this).data("draggable").options;b=a.makeArray(a(b.stack)).sort(function(d,e){return(parseInt(a(d).css("zIndex"),
10)||0)-(parseInt(a(e).css("zIndex"),10)||0)});if(b.length){var c=parseInt(b[0].style.zIndex)||0;a(b).each(function(d){this.style.zIndex=c+d});this[0].style.zIndex=c+b.length}}});a.ui.plugin.add("draggable","zIndex",{start:function(b,c){b=a(c.helper);c=a(this).data("draggable").options;if(b.css("zIndex"))c._zIndex=b.css("zIndex");b.css("zIndex",c.zIndex)},stop:function(b,c){b=a(this).data("draggable").options;b._zIndex&&a(c.helper).css("zIndex",b._zIndex)}})})(jQuery);
(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):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 b=this.items.length-1;b>=0;b--)this.items[b].item.removeData("sortable-item");return this},_setOption:function(b,c){if(b==="disabled"){this.options[b]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else a.Widget.prototype._setOption.apply(this,
arguments)},_mouseCapture:function(b,c){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(b);var d=null,e=this;a(b.target).parents().each(function(){if(a.data(this,"sortable-item")==e){d=a(this);return false}});if(a.data(b.target,"sortable-item")==e)d=a(b.target);if(!d)return false;if(this.options.handle&&!c){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==b.target)g=true});if(!g)return false}this.currentItem=
d;this._removeCurrentsFromItems();return true},_mouseStart:function(b,c,d){c=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(b);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");a.extend(this.offset,
{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();c.containment&&this._setContainment();
if(c.cursor){if(a("body").css("cursor"))this._storedCursor=a("body").css("cursor");a("body").css("cursor",c.cursor)}if(c.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",c.opacity)}if(c.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",c.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
b,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(d=this.containers.length-1;d>=0;d--)this.containers[d]._trigger("activate",b,this._uiHash(this));if(a.ui.ddmanager)a.ui.ddmanager.current=this;a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(b);return true},_mouseDrag:function(b){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");
if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var c=this.options,d=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity)this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed;else if(b.pageY-this.overflowOffset.top<c.scrollSensitivity)this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed;if(this.overflowOffset.left+
this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity)this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed;else if(b.pageX-this.overflowOffset.left<c.scrollSensitivity)this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(b.pageY-a(document).scrollTop()<c.scrollSensitivity)d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed);else if(a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity)d=a(document).scrollTop(a(document).scrollTop()+
c.scrollSpeed);if(b.pageX-a(document).scrollLeft()<c.scrollSensitivity)d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed);else if(a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity)d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}d!==false&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");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";for(c=this.items.length-1;c>=0;c--){d=this.items[c];var e=d.item[0],g=this._intersectsWithPointer(d);if(g)if(e!=this.currentItem[0]&&this.placeholder[g==1?"next":"prev"]()[0]!=e&&!a.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],e):true)){this.direction=g==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(d))this._rearrange(b,
d);else break;this._trigger("change",b,this._uiHash());break}}this._contactContainers(b);a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);this._trigger("sort",b,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(b,c){if(b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this;c=d.placeholder.offset();d.reverting=true;a(this.helper).animate({left:c.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==
document.body?0:this.offsetParent[0].scrollLeft),top:c.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return false}},cancel:function(){if(this.dragging){this._mouseUp();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,this._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,this._uiHash(this));this.containers[b].containerCache.over=0}}}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();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):
a(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{};a(c).each(function(){var e=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);if(e)d.push((b.key||e[1]+"[]")+"="+(b.key&&b.expression?e[1]:e[2]))});!d.length&&b.key&&d.push(b.key+"=");return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{};c.each(function(){d.push(a(b.item||this).attr(b.attribute||
"id")||"")});return d},_intersectsWith:function(b){var c=this.positionAbs.left,d=c+this.helperProportions.width,e=this.positionAbs.top,g=e+this.helperProportions.height,f=b.left,i=f+b.width,k=b.top,m=k+b.height,p=this.offset.click.top,r=this.offset.click.left;p=e+p>k&&e+p<m&&c+r>f&&c+r<i;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>b[this.floating?"width":"height"]?p:f<c+
this.helperProportions.width/2&&d-this.helperProportions.width/2<i&&k<e+this.helperProportions.height/2&&g-this.helperProportions.height/2<m},_intersectsWithPointer:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height);b=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width);c=c&&b;b=this._getDragVerticalDirection();var d=this._getDragHorizontalDirection();if(!c)return false;return this.floating?d&&d=="right"||b=="down"?2:1:b&&(b=="down"?
2:1)},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height);b=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width);var d=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&b||e=="left"&&!b:d&&(d=="down"&&c||d=="up"&&!c)},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},
_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var c=[],d=[],e=this._connectWith();if(e&&b)for(b=e.length-1;b>=0;b--)for(var g=a(e[b]),f=g.length-1;f>=0;f--){var i=a.data(g[f],"sortable");if(i&&i!=
this&&!i.options.disabled)d.push([a.isFunction(i.options.items)?i.options.items.call(i.element):a(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i])}d.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(b=d.length-1;b>=0;b--)d[b][0].each(function(){c.push(this)});return a(c)},_removeCurrentsFromItems:function(){for(var b=
this.currentItem.find(":data(sortable-item)"),c=0;c<this.items.length;c++)for(var d=0;d<b.length;d++)b[d]==this.items[c].item[0]&&this.items.splice(c,1)},_refreshItems:function(b){this.items=[];this.containers=[this];var c=this.items,d=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var g=e.length-1;g>=0;g--)for(var f=a(e[g]),i=f.length-1;i>=0;i--){var k=a.data(f[i],"sortable");
if(k&&k!=this&&!k.options.disabled){d.push([a.isFunction(k.options.items)?k.options.items.call(k.element[0],b,{item:this.currentItem}):a(k.options.items,k.element),k]);this.containers.push(k)}}for(g=d.length-1;g>=0;g--){b=d[g][1];e=d[g][0];i=0;for(f=e.length;i<f;i++){k=a(e[i]);k.data("sortable-item",b);c.push({item:k,instance:b,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var c=this.items.length-1;c>=
0;c--){var d=this.items[c],e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;if(!b){d.width=e.outerWidth();d.height=e.outerHeight()}e=e.offset();d.left=e.left;d.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--){e=this.containers[c].element.offset();this.containers[c].containerCache.left=e.left;this.containers[c].containerCache.top=e.top;this.containers[c].containerCache.width=
this.containers[c].element.outerWidth();this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var g=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)g.style.visibility="hidden";return g},
update:function(g,f){if(!(e&&!d.forcePlaceholderSize)){f.height()||f.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10));f.width()||f.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){for(var c=
null,d=null,e=this.containers.length-1;e>=0;e--)if(!a.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))){c=this.containers[e];d=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",b,this._uiHash(this));this.containers[e].containerCache.over=0}if(c)if(this.containers.length===1){this.containers[d]._trigger("over",b,this._uiHash(this));
this.containers[d].containerCache.over=1}else if(this.currentContainer!=this.containers[d]){c=1E4;e=null;for(var g=this.positionAbs[this.containers[d].floating?"left":"top"],f=this.items.length-1;f>=0;f--)if(a.ui.contains(this.containers[d].element[0],this.items[f].item[0])){var i=this.items[f][this.containers[d].floating?"left":"top"];if(Math.abs(i-g)<c){c=Math.abs(i-g);e=this.items[f]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[d];e?this._rearrange(b,e,null,true):this._rearrange(b,
null,this.containers[d].element,true);this._trigger("change",b,this._uiHash());this.containers[d]._trigger("change",b,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[d]._trigger("over",b,this._uiHash(this));this.containers[d].containerCache.over=1}}},_createHelper:function(b){var c=this.options;b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;b.parents("body").length||
a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0]);if(b[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(b[0].style.width==""||c.forceHelperSize)b.width(this.currentItem.width());if(b[0].style.height==""||c.forceHelperSize)b.height(this.currentItem.height());return b},_adjustOffsetFromHelper:function(b){if(typeof b==
"string")b=b.split(" ");if(a.isArray(b))b={left:+b[0],top:+b[1]||0};if("left"in b)this.offset.click.left=b.left+this.margins.left;if("right"in b)this.offset.click.left=this.helperProportions.width-b.right+this.margins.left;if("top"in b)this.offset.click.top=b.top+this.margins.top;if("bottom"in b)this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition==
"absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
"relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},
_setContainment:function(){var b=this.options;if(b.containment=="parent")b.containment=this.helper[0].parentNode;if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0];b=a(b.containment).offset();var d=a(c).css("overflow")!="hidden";this.containment=[b.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,b.left+(d?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),
10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(d?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){if(!c)c=this.position;b=b=="absolute"?1:-1;var d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?
this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);return{top:c.top+this.offset.relative.top*b+this.offset.parent.top*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop())*b),left:c.left+this.offset.relative.left*b+this.offset.parent.left*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())*b)}},_generatePosition:function(b){var c=
this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var g=b.pageX,f=b.pageY;if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0])g=this.containment[0]+
this.offset.click.left;if(b.pageY-this.offset.click.top<this.containment[1])f=this.containment[1]+this.offset.click.top;if(b.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(b.pageY-this.offset.click.top>this.containment[3])f=this.containment[3]+this.offset.click.top}if(c.grid){f=this.originalPageY+Math.round((f-this.originalPageY)/c.grid[1])*c.grid[1];f=this.containment?!(f-this.offset.click.top<this.containment[1]||f-this.offset.click.top>this.containment[3])?
f:!(f-this.offset.click.top<this.containment[1])?f-c.grid[1]:f+c.grid[1]:f;g=this.originalPageX+Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:!(g-this.offset.click.left<this.containment[0])?g-c.grid[0]:g+c.grid[0]:g}}return{top:f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
e?0:d.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(b,c,d,e){d?d[0].appendChild(this.placeholder[0]):c.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?c.item[0]:c.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var g=this,f=this.counter;window.setTimeout(function(){f==
g.counter&&g.refreshPositions(!e)},0)},_clear:function(b,c){this.reverting=false;var d=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(g){this._trigger("receive",
g,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c)d.push(function(g){this._trigger("update",g,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(g){this._trigger("remove",g,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(a.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!c){d.push(function(g){return function(f){g._trigger("receive",
f,this._uiHash(this))}}.call(this,this.containers[e]));d.push(function(g){return function(f){g._trigger("update",f,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){c||d.push(function(g){return function(f){g._trigger("deactivate",f,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){d.push(function(g){return function(f){g._trigger("out",f,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=
0}}this._storedCursor&&a("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(!c){this._trigger("beforeStop",b,this._uiHash());for(e=0;e<d.length;e++)d[e].call(this,b);this._trigger("stop",b,this._uiHash())}return false}c||this._trigger("beforeStop",b,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!c){for(e=0;e<d.length;e++)d[e].call(this,b);this._trigger("stop",b,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}});
a.extend(a.ui.sortable,{version:"1.8.5"})})(jQuery);
(function(a){function b(d){var e=d||window.event,g=[].slice.call(arguments,1),f=0,i=0,k=0;d=a.event.fix(e);d.type="mousewheel";if(d.wheelDelta)f=d.wheelDelta/120;if(d.detail)f=-d.detail/3;k=f;if(e.axis!==undefined&&e.axis===e.HORIZONTAL_AXIS){k=0;i=-1*f}if(e.wheelDeltaY!==undefined)k=e.wheelDeltaY/120;if(e.wheelDeltaX!==undefined)i=-1*e.wheelDeltaX/120;g.unshift(d,f,i,k);return a.event.handle.apply(this,g)}var c=["DOMMouseScroll","mousewheel"];a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var d=
c.length;d;)this.addEventListener(c[--d],b,false);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var d=c.length;d;)this.removeEventListener(c[--d],b,false);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}})})(jQuery);
(function(a){function b(){if(this===c.elem){c.pos=[-260,-260];c.elem=false;d=3}}var c={pos:[-260,-260]},d=3,e=document,g=e.documentElement,f=e.body,i,k;a.event.special.mwheelIntent={setup:function(){var m=a(this).bind("mousewheel",a.event.special.mwheelIntent.handler);this!==e&&this!==g&&this!==f&&m.bind("mouseleave",b);return true},teardown:function(){a(this).unbind("mousewheel",a.event.special.mwheelIntent.handler).unbind("mouseleave",b);return true},handler:function(m){var p=[m.clientX,m.clientY];
if(this===c.elem||Math.abs(c.pos[0]-p[0])>d||Math.abs(c.pos[1]-p[1])>d){c.elem=this;c.pos=p;d=250;clearTimeout(k);k=setTimeout(function(){d=10},200);clearTimeout(i);i=setTimeout(function(){d=3},1500);m=a.extend({},m,{type:"mwheelIntent"});return a.event.handle.apply(this,arguments)}}};a.fn.extend({mwheelIntent:function(m){return m?this.bind("mwheelIntent",m):this.trigger("mwheelIntent")},unmwheelIntent:function(m){return this.unbind("mwheelIntent",m)}});a(function(){f=e.body;a(e).bind("mwheelIntent.mwheelIntentDefault",
a.noop)})})(jQuery);
(function(a,b,c){a.fn.jScrollPane=function(d){function e(f,i){function k(h){var j,l,o;n=h;if(q==c){f.css({overflow:"hidden",padding:0});A=f.innerWidth()+R;w=f.innerHeight();f.width(A);q=n.hideScrollbar?a('<div class="jspPane" />').wrap(a('<div class="jspContainer" />').css({width:A+"px",height:w+"px"}).mouseover(function(){a(".jspVerticalBar").show()}).mouseout(function(){a(".jspVerticalBar").hide()})):a('<div class="jspPane" />').wrap(a('<div class="jspContainer" />').css({width:A+"px",height:w+
"px"}));f.wrapInner(q.parent());u=f.find(">.jspContainer");q=u.find(">.jspPane");q.css("padding",va)}else{f.css("width","");if(h=f.outerWidth()+R!=A||f.outerHeight()!=w){A=f.innerWidth()+R;w=f.innerHeight();u.css({width:A+"px",height:w+"px"})}na=q.innerWidth();if(!h&&q.outerWidth()==S&&q.outerHeight()==M){if(J||K){q.css("width",na+"px");f.css("width",na+R+"px")}return}q.css("width","");f.css("width",A+"px");u.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}h=q.clone().css("position","absolute");
j=a('<div style="width:1px; position: relative;" />').append(h);a("body").append(j);S=Math.max(q.outerWidth(),h.outerWidth());j.remove();M=q.outerHeight();oa=S/A;ga=M/w;K=ga>1;if((J=oa>1)||K){f.addClass("jspScrollable");if(h=n.maintainPosition&&(x||y)){l=-q.position().left;o=Y()}m();r();z();if(h){I(l/(S-A)*N,void 0);T(o)}ya();za();n.enableKeyboardNavigation&&Aa();n.clickOnTrack&&v();Ba();n.hijackInternalLinks&&wa()}else{f.removeClass("jspScrollable");q.css({top:0,width:u.width()-R});u.unbind(pa);
q.unbind("focusin.jsp");f.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp");F();xa()}if(n.autoReinitialise&&!ha)ha=setInterval(function(){k(n)},n.autoReinitialiseDelay);else!n.autoReinitialise&&ha&&clearInterval(ha);f.trigger("jsp-initialised",[J||K])}function m(){if(K){u.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),
a('<div class="jspCap jspCapBottom" />')));n.hideScrollbar&&a(".jspVerticalBar").hide();qa=u.find(">.jspVerticalBar");O=qa.find(">.jspTrack");G=O.find(">.jspDrag");if(n.showArrows){aa=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",t(0,-1)).bind("click.jsp",ia);ba=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",t(0,1)).bind("click.jsp",ia);if(n.arrowScrollOnHover){aa.bind("mouseover.jsp",t(0,-1,aa));ba.bind("mouseover.jsp",t(0,1,ba))}B(O,n.verticalArrowPositions,aa,ba)}Z=
w;u.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){Z-=a(this).outerHeight()});G.hover(function(){G.addClass("jspHover")},function(){G.removeClass("jspHover")}).bind("mousedown.jsp",function(h){a("html").bind("dragstart.jsp selectstart.jsp",function(){return false});G.addClass("jspActive");var j=h.pageY-G.position().top;a("html").bind("mousemove.jsp",function(l){L(l.pageY-j,false)}).bind("mouseup.jsp mouseleave.jsp",Q);return false});p()}}function p(){O.height(Z+
"px");x=0;ra=n.verticalGutter+O.outerWidth();q.width(A-ra-R);qa.position().left==0&&q.css("margin-left",ra+"px")}function r(){if(J){u.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),a('<div class="jspCap jspCapRight" />')));sa=u.find(">.jspHorizontalBar");P=sa.find(">.jspTrack");H=P.find(">.jspDrag");if(n.showArrows){ca=
a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",t(-1,0)).bind("click.jsp",ia);da=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",t(1,0)).bind("click.jsp",ia);if(n.arrowScrollOnHover){ca.bind("mouseover.jsp",t(-1,0,ca));da.bind("mouseover.jsp",t(1,0,da))}B(P,n.horizontalArrowPositions,ca,da)}H.hover(function(){H.addClass("jspHover")},function(){H.removeClass("jspHover")}).bind("mousedown.jsp",function(h){a("html").bind("dragstart.jsp selectstart.jsp",function(){return false});
H.addClass("jspActive");var j=h.pageX-H.position().left;a("html").bind("mousemove.jsp",function(l){I(l.pageX-j,false)}).bind("mouseup.jsp mouseleave.jsp",Q);return false});X=u.innerWidth();E()}}function E(){u.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){X-=a(this).outerWidth()});P.width(X+"px");y=0}function z(){if(J&&K){var h=P.outerHeight(),j=O.outerWidth();Z-=h;a(sa).find(">.jspCap:visible,>.jspArrow").each(function(){X+=a(this).outerWidth()});X-=j;w-=
j;A-=h;P.parent().append(a('<div class="jspCorner" />').css("width",h+"px"));p();E()}J&&q.width(u.outerWidth()-R+"px");M=q.outerHeight();ga=M/w;if(J){U=1/oa*X;if(U>n.horizontalDragMaxWidth)U=n.horizontalDragMaxWidth;else if(U<n.horizontalDragMinWidth)U=n.horizontalDragMinWidth;H.width(U+"px");N=X-U;ta(y)}if(K){V=1/ga*Z;if(V>n.verticalDragMaxHeight)V=n.verticalDragMaxHeight;else if(V<n.verticalDragMinHeight)V=n.verticalDragMinHeight;G.height(V+"px");W=Z-V;ua(x)}}function B(h,j,l,o){var s="before",
D="after";if(j=="os")j=/Mac/.test(navigator.platform)?"after":"split";if(j==s)D=j;else if(j==D){s=j;j=l;l=o;o=j}h[s](l)[D](o)}function t(h,j,l){return function(){C(h,j,this,l);this.blur();return false}}function C(h,j,l,o){l=a(l).addClass("jspActive");var s,D=function(){h!=0&&I(y+h*n.arrowButtonSpeed,false);j!=0&&L(x+j*n.arrowButtonSpeed,false)},$=setInterval(D,n.arrowRepeatFreq);D();s=o==c?"mouseup.jsp":"mouseout.jsp";o=o||a("html");o.bind(s,function(){l.removeClass("jspActive");clearInterval($);
o.unbind(s)})}function v(){F();K&&O.bind("mousedown.jsp",function(h){if(h.originalTarget==c||h.originalTarget==h.currentTarget){var j=a(this),l=setInterval(function(){var s=j.offset();s=h.pageY-s.top;if(x+V<s)L(x+n.trackClickSpeed);else s<x?L(x-n.trackClickSpeed):o()},n.trackClickRepeatFreq),o=function(){l&&clearInterval(l);l=null;a(document).unbind("mouseup.jsp",o)};a(document).bind("mouseup.jsp",o);return false}});J&&P.bind("mousedown.jsp",function(h){if(h.originalTarget==c||h.originalTarget==h.currentTarget){var j=
a(this),l=setInterval(function(){var s=j.offset();s=h.pageX-s.left;if(y+U<s)I(y+n.trackClickSpeed);else s<y?I(y-n.trackClickSpeed):o()},n.trackClickRepeatFreq),o=function(){l&&clearInterval(l);l=null;a(document).unbind("mouseup.jsp",o)};a(document).bind("mouseup.jsp",o);return false}})}function F(){P&&P.unbind("mousedown.jsp");O&&O.unbind("mousedown.jsp")}function Q(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");G&&G.removeClass("jspActive");H&&H.removeClass("jspActive")}
function L(h,j){if(K){if(h<0)h=0;else if(h>W)h=W;if(j==c)j=n.animateScroll;if(j)ea.animate(G,"top",h,ua);else{G.css("top",h);ua(h)}}}function ua(h){if(h==c)h=G.position().top;u.scrollTop(0);x=h;var j=x==0,l=x==W;h=-(h/W)*(M-w);if(ja!=j||ka!=l){ja=j;ka=l;f.trigger("jsp-arrow-change",[ja,ka,la,ma])}if(n.showArrows){aa[j?"addClass":"removeClass"]("jspDisabled");ba[l?"addClass":"removeClass"]("jspDisabled")}q.css("top",h);f.trigger("jsp-scroll-y",[-h,j,l])}function I(h,j){if(J){if(h<0)h=0;else if(h>N)h=
N;if(j==c)j=n.animateScroll;if(j)ea.animate(H,"left",h,ta);else{H.css("left",h);ta(h)}}}function ta(h){if(h==c)h=H.position().left;u.scrollTop(0);y=h;var j=y==0,l=y==N;h=-(h/N)*(S-A);if(la!=j||ma!=l){la=j;ma=l;f.trigger("jsp-arrow-change",[ja,ka,la,ma])}if(n.showArrows){ca[j?"addClass":"removeClass"]("jspDisabled");da[l?"addClass":"removeClass"]("jspDisabled")}q.css("left",h);f.trigger("jsp-scroll-x",[-h,j,l])}function T(h,j){L(h/(M-w)*W,j)}function fa(h,j,l){var o,s=0,D,$;try{o=a(h)}catch(Ca){return}h=
o.outerHeight();for(u.scrollTop(0);!o.is(".jspPane");){s+=o.position().top;o=o.offsetParent();if(/^body|html$/i.test(o[0].nodeName))return}o=Y();D=o+w;if(s<o||j)$=s-n.verticalGutter;else if(s+h>D)$=s-w+h+n.verticalGutter;$&&T($,l)}function Y(){return-q.position().top}function za(){u.unbind(pa).bind(pa,function(h,j,l,o){h=y;j=x;I(y+l*n.mouseWheelSpeed,false);L(x-o*n.mouseWheelSpeed,false);return h==y&&j==x})}function ia(){return false}function ya(){q.unbind("focusin.jsp").bind("focusin.jsp",function(h){h.target!==
q[0]&&fa(h.target,false)})}function Aa(){var h,j;f.attr("tabindex",0).unbind("keydown.jsp").bind("keydown.jsp",function(l){if(l.target===f[0]){var o=y,s=x,D=h?2:16;switch(l.keyCode){case 40:L(x+D,false);break;case 38:L(x-D,false);break;case 34:case 32:T(Y()+Math.max(32,w)-16);break;case 33:T(Y()-w+16);break;case 35:T(M-w);break;case 36:T(0);break;case 39:I(y+D,false);break;case 37:I(y-D,false)}if(!(o==y&&s==x)){h=true;clearTimeout(j);j=setTimeout(function(){h=false},260);return false}}});if(n.hideFocus){f.css("outline",
"none");"hideFocus"in u[0]&&f.attr("hideFocus",true)}else{f.css("outline","");"hideFocus"in u[0]&&f.attr("hideFocus",false)}}function Ba(){if(location.hash&&location.hash.length>1){var h,j;try{h=a(location.hash)}catch(l){return}if(h.length&&q.find(h))if(u.scrollTop()==0)j=setInterval(function(){if(u.scrollTop()>0){fa(location.hash,true);a(document).scrollTop(u.position().top);clearInterval(j)}},50);else{fa(location.hash,true);a(document).scrollTop(u.position().top)}}}function xa(){a("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}
function wa(){xa();a("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var h=this.href.split("#");if(h.length>1){h=h[1];if(h.length>0&&q.find("#"+h).length>0){fa("#"+h,true);return false}}})}var n,ea=this,q,A,w,u,S,M,oa,ga,K,J,G,W,x,H,N,y,qa,O,ra,Z,V,aa,ba,sa,P,X,U,ca,da,ha,va,R,na,ja=true,la=true,ka=false,ma=false,pa=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";va=f.css("paddingTop")+" "+f.css("paddingRight")+" "+f.css("paddingBottom")+" "+f.css("paddingLeft");R=(parseInt(f.css("paddingLeft"))||
0)+(parseInt(f.css("paddingRight"))||0);k(i);a.extend(ea,{reinitialise:function(h){mpfix=h.maintainPosition;h=a.extend({},h,n);h.maintainPosition=mpfix;k(h)},scrollToElement:function(h,j,l){fa(h,j,l)},scrollTo:function(h,j,l){I(h/(S-A)*N,l);T(j,l)},scrollToX:function(h,j){I(h/(S-A)*N,j)},scrollToY:function(h,j){T(h,j)},scrollBy:function(h,j,l){ea.scrollByX(h,l);ea.scrollByY(j,l)},scrollByX:function(h,j){var l=(-q.position().left+h)/(S-A);I(l*N,j)},scrollByY:function(h,j){var l=(Y()+h)/(M-w);L(l*W,
j)},animate:function(h,j,l,o){var s={};s[j]=l;h.animate(s,{duration:n.animateDuration,ease:n.animateEase,queue:false,step:o})},getContentPositionX:function(){return-q.position().left},getContentPositionY:function(){return Y()},getIsScrollableH:function(){return J},getIsScrollableV:function(){return K},getContentPane:function(){return q},scrollToBottom:function(h){L(W,h)},hijackInternalLinks:function(){wa()}})}d=a.extend({},a.fn.jScrollPane.defaults,d);var g;this.each(function(){var f=a(this),i=f.data("jsp");
if(i)i.reinitialise(d);else{i=new e(f,d);f.data("jsp",i)}g=g?g.add(f):f});return g};a.fn.jScrollPane.defaults={hideScrollbar:false,showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:10,arrowButtonSpeed:10,
arrowRepeatFreq:100,arrowScrollOnHover:false,trackClickSpeed:30,trackClickRepeatFreq:100,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false}})(jQuery,this);
(function(a){function b(d){return typeof d=="object"?d:{top:d,left:d}}var c=a.scrollTo=function(d,e,g){a(window).scrollTo(d,e,g)};c.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1};c.window=function(){return a(window)._scrollable()};a.fn._scrollable=function(){return this.map(function(){if(!(!this.nodeName||a.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1))return this;var d=(this.contentWindow||this).document||this.ownerDocument||this;return a.browser.safari||
d.compatMode=="BackCompat"?d.body:d.documentElement})};a.fn.scrollTo=function(d,e,g){if(typeof e=="object"){g=e;e=0}if(typeof g=="function")g={onAfter:g};if(d=="max")d=9E9;g=a.extend({},c.defaults,g);e=e||g.speed||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)e/=2;g.offset=b(g.offset);g.over=b(g.over);return this._scrollable().each(function(){function f(z){k.animate(r,e,g.easing,z&&function(){z.call(this,d,g)})}var i=this,k=a(i),m=d,p,r={},E=k.is("html,body");switch(typeof m){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=
b(m);break}m=a(m,this);case "object":if(m.is||m.style)p=(m=a(m)).offset()}a.each(g.axis.split(""),function(z,B){var t=B=="x"?"Left":"Top",C=t.toLowerCase(),v="scroll"+t,F=i[v],Q=c.max(i,B);if(p){r[v]=p[C]+(E?0:F-k.offset()[C]);if(g.margin){r[v]-=parseInt(m.css("margin"+t))||0;r[v]-=parseInt(m.css("border"+t+"Width"))||0}r[v]+=g.offset[C]||0;if(g.over[C])r[v]+=m[B=="x"?"width":"height"]()*g.over[C]}else{t=m[C];r[v]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*Q:t}if(/^\d+$/.test(r[v]))r[v]=r[v]<=0?
0:Math.min(r[v],Q);if(!z&&g.queue){F!=r[v]&&f(g.onAfterFirst);delete r[v]}});f(g.onAfter)}).end()};c.max=function(d,e){var g=e=="x"?"Width":"Height",f="scroll"+g;if(!a(d).is("html,body"))return d[f]-a(d)[g.toLowerCase()]();g="client"+g;var i=d.ownerDocument.documentElement,k=d.ownerDocument.body;return Math.max(i[f],k[f])-Math.min(i[g],k[g])}})(jQuery);var spamSpanMainClass="spamspan",spamSpanUserClass="u",spamSpanDomainClass="d",spamSpanAnchorTextClass="t",spamSpanParams=["subject","body"];
function spamSpan(){for(var a=getElementsByClass(spamSpanMainClass,document,"span"),b=0;b<a.length;b++){for(var c=getSpanValue(spamSpanUserClass,a[b]),d=getSpanValue(spamSpanDomainClass,a[b]),e=getSpanValue(spamSpanAnchorTextClass,a[b]),g=[],f=0;f<spamSpanParams.length;f++){var i=getSpanValue(spamSpanParams[f],a[b]);i&&g.push(spamSpanParams[f]+"="+encodeURIComponent(i))}f=String.fromCharCode(64);c=cleanSpan(c)+f+cleanSpan(d);e=document.createTextNode(e?e:c);c=String.fromCharCode(109,97,105,108,116,
111,58)+c;c+=g.length?"?"+g.join("&"):"";g=document.createElement("a");g.className=spamSpanMainClass;g.setAttribute("href",c);g.appendChild(e);a[b].parentNode.replaceChild(g,a[b])}}function getElementsByClass(a,b,c){var d=[];if(b==null)node=document;if(c==null)c="*";b=b.getElementsByTagName(c);c=b.length;a=RegExp("(^|s)"+a+"(s|$)");for(var e=0,g=0;e<c;e++)if(a.test(b[e].className)){d[g]=b[e];g++}return d}
function getSpanValue(a,b){var c=getElementsByClass(a,b,"span");return c[0]?c[0].firstChild.nodeValue:false}function cleanSpan(a){a=a.replace(/[\[\(\{]?[dD][oO0][tT][\}\)\]]?/g,".");return a=a.replace(/\s+/g,"")}function addEvent(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else if(a.attachEvent){a["e"+b+c]=c;a[b+c]=function(){a["e"+b+c](window.event)};a.attachEvent("on"+b,a[b+c])}}
(function(){var a=false,b=/xyz/.test(function(){})?/\b_super\b/:/.*/;this.JRClass=function(){};JRClass.extend=function(c){function d(){!a&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;a=true;var g=new this;a=false;for(var f in c)g[f]=typeof c[f]=="function"&&typeof e[f]=="function"&&b.test(c[f])?function(i,k){return function(){var m=this._super;this._super=e[i];var p=k.apply(this,arguments);this._super=m;return p}}(f,c[f]):c[f];d.prototype=g;d.constructor=d;d.extend=arguments.callee;
return d}})();
var VideoJS=JRClass.extend({init:function(a,b){this.video=typeof a=="string"?document.getElementById(a):a;this.video.player=this;this.options={closeFullscreenOnEnd:true,controlsBelow:false,showControlsAtStart:true,controlsHiding:false,defaultVolume:0.85,flashVersion:9,linksHiding:true,flashIsDominant:false,useBrowserControls:false,players:["html5","flashObject","links"]};typeof VideoJS.options=="object"&&_V_.merge(this.options,VideoJS.options);typeof b=="object"&&_V_.merge(this.options,b);this.box=
this.video.parentNode;this.flashObject=this.getFlashObject();this.linksFallback=this.getLinksFallback();this.hideLinksFallback();for(var c=0,d=this.options.players,e=d.length;c<e;c++)if(VideoJS.players[d[c]].init.context(this)())break},html5Init:function(){this.fixPreloading();if(VideoJS.isIOS()){this.options.useBrowserControls=true;VideoJS.iOSVersion()<4&&this.forceTheSource()}if(VideoJS.isAndroid()){this.options.useBrowserControls=true;this.forceTheSource();this.video.addEventListener("click",function(){this.play()},
false)}if(!this.options.useBrowserControls){this.video.controls=false;this.options.controlsBelow&&_V_.addClass(this.box,"vjs-controls-below");this.percentLoaded=0;this.buildStylesCheckDiv();this.buildPoster();this.buildBigPlayButton();this.buildSpinner();this.buildControlBar();this.loadInterface();this.getSubtitles();this.onEscKey=this.onEscKey.context(this);this.onWindowResize=this.onWindowResize.context(this);this.onProgressMouseMove=this.onProgressMouseMove.context(this);this.onProgressMouseUp=
this.onProgressMouseUp.context(this);this.onVolumeMouseMove=this.onVolumeMouseMove.context(this);this.onVolumeMouseUp=this.onVolumeMouseUp.context(this)}},canPlaySource:function(){if(this.canPlaySourceResult)return this.canPlaySourceResult;for(var a=this.video.children,b=0,c=a.length;b<c;b++)if(a[b].tagName.toUpperCase()=="SOURCE"){var d=this.video.canPlayType(a[b].type);if(d=="probably"||d=="maybe"||VideoJS.isAndroid()&&a[b].src.match(/\.(mp4|m4v)$/i)){this.firstPlayableSource=a[b];return this.canPlaySourceResult=
true}}return this.canPlaySourceResult=false},forceTheSource:function(){this.video.src=this.firstPlayableSource.src;this.video.load()},loadInterface:function(){if(!this.stylesHaveLoaded()){if(!this.positionRetries)this.positionRetries=1;if(this.positionRetries++<100){setTimeout(this.loadInterface.context(this),0);return}}this.hideStylesCheckDiv();this.showPoster();this.video.paused!==false&&this.showBigPlayButton();this.options.showControlsAtStart&&this.showControlBar();this.positionBox()},positionBox:function(){if(this.videoIsFullScreen){this.box.style.width=
"";if(this.options.controlsBelow){this.box.style.height="";this.video.style.height=this.box.offsetHeight-this.controls.offsetHeight+"px"}}else{this.box.style.width=this.video.offsetWidth+"px";if(this.options.controlsBelow){this.video.style.height="";this.box.style.height=this.video.offsetHeight+this.controls.offsetHeight+"px"}}this.positionControlBar();this.positionPoster()},buildControlBar:function(){if(PSYOP_GLOBALS.video_loaded==0){this.controls=_V_.createElement("ul",{className:"vjs-controls"});
this.video.parentNode.appendChild(this.controls);this.playControl=_V_.createElement("li",{className:"vjs-play-control vjs-play",innerHTML:"<span></span>"});this.controls.appendChild(this.playControl);this.progressControl=_V_.createElement("li",{className:"vjs-progress-control"});this.controls.appendChild(this.progressControl);this.progressHolder=_V_.createElement("ul",{className:"vjs-progress-holder"});this.progressControl.appendChild(this.progressHolder);this.loadProgress=_V_.createElement("li",
{className:"vjs-load-progress"});this.progressHolder.appendChild(this.loadProgress);this.playProgress=_V_.createElement("li",{className:"vjs-play-progress"});this.progressHolder.appendChild(this.playProgress);this.psyopControl=_V_.createElement("li",{className:"vjs-psyop-control",innerHTML:'<span class="vjs-psyop-about"><a href="javascript:void(0)" id="vjs-psyop-about-link"><span>ABOUT</span></a></span>&nbsp;<span class="vjs-psyop-share"><a href="javascript:void(0)" id="vjs-psyop-share-link"><span>SHARE</span></a></span>&nbsp;<span class="vjs-psyop-playlist"><a href="javascript:void(0)" id="vjs-psyop-playlist-link"><span>+PLAYLIST</span></a></span><span class="vjs-psyop-rplaylist"><a href="javascript:void(0)" id="vjs-psyop-rplaylist-link"><span>-PLAYLIST</span></a></span><div class="btns_playlist_clicked_html5" id="id_btns_playlist_clicked_html5" style="display:none"><span>added to playlist</span></div><div class="btns_playlist_clicked_html5" id="id_btns_playlist_remove_clicked_html5" style="display:none"><span>removed from playlist</span></div>'});
this.controls.appendChild(this.psyopControl);this.timeControl=_V_.createElement("li",{className:"vjs-time-control"});this.controls.appendChild(this.timeControl);this.currentTimeDisplay=_V_.createElement("span",{className:"vjs-current-time-display",innerHTML:"00:00"});this.timeControl.appendChild(this.currentTimeDisplay);this.timeSeparator=_V_.createElement("span",{innerHTML:" / "});this.timeControl.appendChild(this.timeSeparator);this.durationDisplay=_V_.createElement("span",{className:"vjs-duration-display",
innerHTML:"00:00"});this.timeControl.appendChild(this.durationDisplay);this.volumeControl=_V_.createElement("li",{className:"vjs-volume-control",innerHTML:"<ul><li></li><li></li><li></li><li></li><li></li><li></li></ul>"});this.controls.appendChild(this.volumeControl);this.volumeDisplay=this.volumeControl.children[0];this.fullscreenControl=_V_.createElement("li",{className:"vjs-fullscreen-control",innerHTML:"<ul><li></li><li></li><li></li><li></li></ul>"});this.controls.appendChild(this.fullscreenControl);
this.initializeControls()}},initializeControls:function(){this.video.addEventListener("error",this.onError.context(this),false);this.video.addEventListener("play",this.onPlay.context(this),false);this.video.addEventListener("pause",this.onPause.context(this),false);this.video.addEventListener("ended",this.onEnded.context(this),false);this.playControl.addEventListener("click",this.onPlayControlClick.context(this),false);this.video.addEventListener("click",this.onPlayControlClick.context(this),false);
this.progressHolder.addEventListener("mousedown",this.onProgressHolderMouseDown.context(this),false);this.progressHolder.addEventListener("mouseup",this.onProgressHolderMouseUp.context(this),false);this.video.addEventListener("progress",this.onProgress.context(this),false);this.watchBuffer=setInterval(this.updateBufferedTotal.context(this),33);this.setVolume(localStorage.volume||this.options.defaultVolume);this.updateVolumeDisplay();this.video.addEventListener("volumechange",this.onVolumeChange.context(this),
false);this.volumeControl.addEventListener("mousedown",this.onVolumeControlMouseDown.context(this),false);this.volumeControl.addEventListener("mouseup",this.onVolumeControlMouseUp.context(this),false);this.fullscreenControl.addEventListener("click",this.onFullscreenControlClick.context(this),false);this.controls.addEventListener("mousemove",this.onControlsMouseMove.context(this),false);this.controls.addEventListener("mouseout",this.onControlsMouseOut.context(this),false);this.box.addEventListener("mousemove",
this.onVideoMouseMove.context(this),false);this.box.addEventListener("mouseout",this.onVideoMouseOut.context(this),false)},showControlBar:function(){if(this.options.showControlsAtStart||this.hasPlayed){this.controls.style.display="block";this.positionControlBar()}},positionControlBar:function(){if(typeof this.controls!="undefined")if(this.controls.style.display!="none"){this.controls.style.top=this.options.controlsBelow?this.video.offsetHeight+"px":this.video.offsetHeight-this.controls.offsetHeight+
"px";this.updatePlayProgress();this.updateLoadProgress()}},hideControlBar:function(){if(this.options.controlsHiding&&!this.mouseIsOverControls)this.controls.style.display="none"},onControlsMouseMove:function(){this.mouseIsOverControls=true},onControlsMouseOut:function(a){this.mouseIsOverControls=false;this.onVideoMouseOut(a)},onVideoMouseMove:function(){this.showControlBar();clearInterval(this.mouseMoveTimeout);this.mouseMoveTimeout=setTimeout(function(){this.hideControlBar()}.context(this),4E3)},
onVideoMouseOut:function(a){for(a=a.relatedTarget;a&&a!==this.video&&a!==this.controls;)a=a.parentNode;a!==this.video&&a!==this.controls&&this.hideControlBar()},errors:[],onError:function(){this.log(this.video.error)},onPlayControlClick:function(){if(this.video.paused)this.video.play();else!this.hasPlayed&&VideoJS.isAndroid?this.video.play():this.video.pause()},onPlay:function(){this.hasPlayed=true;this.playControl.className="vjs-play-control vjs-pause";this.trackPlayProgress()},onPause:function(){this.playControl.className=
"vjs-play-control vjs-play";this.stopTrackingPlayProgress()},onEnded:function(){this.options.closeFullscreenOnEnd&&this.videoIsFullScreen&&this.fullscreenOff();this.video.currentTime=0;this.video.pause()},trackPlayProgress:function(){this.playProgressInterval&&clearInterval(this.playProgressInterval);this.playProgressInterval=setInterval(function(){this.updatePlayProgress()}.context(this),33)},stopTrackingPlayProgress:function(){clearInterval(this.playProgressInterval)},updatePlayProgress:function(){if(this.controls.style.display!=
"none"){this.playProgress.style.width=this.video.currentTime/this.video.duration*_V_.getComputedStyleValue(this.progressHolder,"width").replace("px","")+"px";this.updateTimeDisplay()}},setPlayProgress:function(a){try{this.video.currentTime=a*this.video.duration}catch(b){b.code==11&&this.errors.push(VideoJS.errorCodes.videoNotReady)}this.playProgress.style.width=a*_V_.getComputedStyleValue(this.progressHolder,"width").replace("px","")+"px";this.updateTimeDisplay();if(!this.subtitles)this.currentSubtitlePosition=
0},setPlayProgressWithEvent:function(a){this.setPlayProgress(_V_.getRelativePosition(a.pageX,this.progressHolder))},onProgressHolderMouseDown:function(a){this.stopTrackingPlayProgress();if(this.video.paused)this.videoWasPlaying=false;else{this.videoWasPlaying=true;this.video.pause()}_V_.blockTextSelection();this.setPlayProgressWithEvent(a);document.addEventListener("mousemove",this.onProgressMouseMove,false);document.addEventListener("mouseup",this.onProgressMouseUp,false)},onProgressMouseMove:function(a){this.setPlayProgressWithEvent(a)},
onProgressMouseUp:function(){_V_.unblockTextSelection();document.removeEventListener("mousemove",this.onProgressMouseMove,false);document.removeEventListener("mouseup",this.onProgressMouseUp,false);if(this.videoWasPlaying){this.video.play();this.trackPlayProgress()}},onProgressHolderMouseUp:function(){this.video.paused?this.onPause():this.onPlay()},updateTimeDisplay:function(){this.currentTimeDisplay.innerHTML=_V_.formatTime(this.video.currentTime);if(this.video.duration)this.durationDisplay.innerHTML=
_V_.formatTime(this.video.duration)},onProgress:function(a){a.total>0&&this.setLoadProgress(a.loaded/a.total)},updateBufferedTotal:function(){if(this.video.buffered){if(this.video.buffered.length>=1){this.setLoadProgress(this.video.buffered.end(0)/this.video.duration);this.video.buffered.end(0)==this.video.duration&&clearInterval(this.watchBuffer)}}else clearInterval(this.watchBuffer)},setLoadProgress:function(a){if(a>this.percentLoaded){this.percentLoaded=a;this.updateLoadProgress()}},updateLoadProgress:function(){if(this.controls.style.display!=
"none")this.loadProgress.style.width=this.percentLoaded*_V_.getComputedStyleValue(this.progressHolder,"width").replace("px","")+"px"},onVolumeChange:function(){this.updateVolumeDisplay()},onVolumeControlMouseDown:function(a){_V_.blockTextSelection();this.setVolumeWithEvent(a);document.addEventListener("mousemove",this.onVolumeMouseMove,false);document.addEventListener("mouseup",this.onVolumeMouseUp,false)},onVolumeMouseMove:function(a){this.setVolumeWithEvent(a)},onVolumeMouseUp:function(){_V_.unblockTextSelection();
document.removeEventListener("mousemove",this.onVolumeMouseMove,false);document.removeEventListener("mouseup",this.onVolumeMouseUp,false)},onVolumeControlMouseUp:function(a){this.setVolumeWithEvent(a)},setVolume:function(a){this.video.volume=parseFloat(a);localStorage.volume=this.video.volume},setVolumeWithEvent:function(a){this.setVolume(_V_.getRelativePosition(a.pageX,this.volumeControl.children[0]))},updateVolumeDisplay:function(){for(var a=Math.ceil(this.video.volume*6),b=0;b<6;b++)b<a?_V_.addClass(this.volumeDisplay.children[b],
"vjs-volume-level-on"):_V_.removeClass(this.volumeDisplay.children[b],"vjs-volume-level-on")},onFullscreenControlClick:function(){this.videoIsFullScreen?this.fullscreenOff():this.fullscreenOn()},fullscreenOn:function(){if(!this.nativeFullscreenOn()){this.videoIsFullScreen=true;this.docOrigOverflow=document.documentElement.style.overflow;document.addEventListener("keydown",this.onEscKey,false);window.addEventListener("resize",this.onWindowResize,false);document.documentElement.style.overflow="hidden";
_V_.addClass(this.box,"vjs-fullscreen");this.positionBox()}},nativeFullscreenOn:function(){if(typeof this.video.webkitEnterFullScreen=="function")if(!navigator.userAgent.match("Chrome")){try{this.video.webkitEnterFullScreen()}catch(a){a.code==11&&this.errors.push(VideoJS.errorCodes.videoNotReady)}return true}},fullscreenOff:function(){this.videoIsFullScreen=false;document.removeEventListener("keydown",this.onEscKey,false);window.removeEventListener("resize",this.onWindowResize,false);document.documentElement.style.overflow=
this.docOrigOverflow;_V_.removeClass(this.box,"vjs-fullscreen");this.positionBox()},onWindowResize:function(){this.positionControlBar()},onEscKey:function(a){a.keyCode==27&&this.fullscreenOff()},buildBigPlayButton:function(){this.bigPlayButton=_V_.createElement("div",{className:"vjs-big-play-button",innerHTML:"<span></span>"});this.video.parentNode.appendChild(this.bigPlayButton);this.initializeBigPlayButton()},initializeBigPlayButton:function(){this.bigPlayButton.addEventListener("click",this.onPlayControlClick.context(this),
false);this.video.addEventListener("play",this.bigPlayButtonOnPlay.context(this),false);this.video.addEventListener("ended",this.bigPlayButtonOnEnded.context(this),false)},showBigPlayButton:function(){this.bigPlayButton.style.display="block"},hideBigPlayButton:function(){this.bigPlayButton.style.display="none"},bigPlayButtonOnPlay:function(){this.hideBigPlayButton()},bigPlayButtonOnEnded:function(){this.showBigPlayButton()},buildSpinner:function(){this.spinner=_V_.createElement("div",{className:"vjs-spinner",
innerHTML:"<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>"});this.video.parentNode.appendChild(this.spinner);this.initializeSpinner()},initializeSpinner:function(){this.video.addEventListener("loadeddata",this.spinnerOnLoadedData.context(this),false);this.video.addEventListener("loadstart",this.spinnerOnLoadStart.context(this),false);this.video.addEventListener("seeking",this.spinnerOnSeeking.context(this),false);this.video.addEventListener("seeked",this.spinnerOnSeeked.context(this),
false);this.video.addEventListener("canplay",this.spinnerOnCanPlay.context(this),false);this.video.addEventListener("canplaythrough",this.spinnerOnCanPlayThrough.context(this),false);this.video.addEventListener("waiting",this.spinnerOnWaiting.context(this),false);this.video.addEventListener("stalled",this.spinnerOnStalled.context(this),false);this.video.addEventListener("suspend",this.spinnerOnSuspend.context(this),false);this.video.addEventListener("playing",this.spinnerOnPlaying.context(this),false);
this.video.addEventListener("timeupdate",this.spinnerOnTimeUpdate.context(this),false)},showSpinner:function(){this.spinner.style.display="block";clearInterval(this.spinnerInterval);this.spinnerInterval=setInterval(function(){this.rotateSpinner()}.context(this),100)},hideSpinner:function(){this.spinner.style.display="none";clearInterval(this.spinnerInterval)},spinnerRotated:0,rotateSpinner:function(){this.spinner.style.WebkitTransform="scale(0.5) rotate("+this.spinnerRotated+"deg)";this.spinner.style.MozTransform=
"scale(0.5) rotate("+this.spinnerRotated+"deg)";if(this.spinnerRotated==360)this.spinnerRotated=0;this.spinnerRotated+=45},spinnerOnLoadedData:function(){this.hideSpinner()},spinnerOnLoadStart:function(){this.showSpinner()},spinnerOnSeeking:function(){},spinnerOnSeeked:function(){},spinnerOnCanPlay:function(){},spinnerOnCanPlayThrough:function(){this.hideSpinner()},spinnerOnWaiting:function(){this.showSpinner()},spinnerOnStalled:function(){},spinnerOnSuspend:function(){},spinnerOnPlaying:function(){this.hideSpinner()},
spinnerOnTimeUpdate:function(){this.spinner.style.display=="block"&&this.hideSpinner()},buildStylesCheckDiv:function(){this.stylesCheckDiv=_V_.createElement("div",{className:"vjs-styles-check"});this.stylesCheckDiv.style.position="absolute";this.box.appendChild(this.stylesCheckDiv)},hideStylesCheckDiv:function(){this.stylesCheckDiv.style.display="none"},stylesHaveLoaded:function(){return this.stylesCheckDiv.offsetHeight!=5?false:true},buildPoster:function(){this.updatePosterSource();if(this.video.poster){this.poster=
document.createElement("img");this.video.parentNode.appendChild(this.poster);this.poster.src=this.video.poster;this.poster.className="vjs-poster";this.initializePoster()}else this.poster=false},initializePoster:function(){if(this.poster){this.poster.addEventListener("mousemove",this.onVideoMouseMove.context(this),false);this.poster.addEventListener("mouseout",this.onVideoMouseOut.context(this),false);this.poster.addEventListener("click",this.onPlayControlClick.context(this),false);this.video.addEventListener("play",
this.posterOnPlay.context(this),false);this.video.addEventListener("ended",this.posterOnEnded.context(this),false)}},showPoster:function(){if(this.poster){this.poster.style.display="block";this.positionPoster()}},positionPoster:function(){if(!(!this.poster||this.poster.style.display=="none")){this.poster.style.height=this.video.offsetHeight+"px";this.poster.style.width=this.video.offsetWidth+"px"}},hidePoster:function(){if(this.poster)this.poster.style.display="none"},updatePosterSource:function(){if(!this.video.poster){var a=
this.video.getElementsByTagName("img");if(a.length>0)this.video.poster=a[0].src}},posterOnEnded:function(){this.showPoster()},posterOnPlay:function(){this.hidePoster()},getSubtitles:function(){for(var a=this.video.getElementsByTagName("TRACK"),b=0,c=a.length;b<c;b++)if(a[b].getAttribute("kind")=="subtitles")this.subtitlesSource=a[b].getAttribute("src");if(this.subtitlesSource!==undefined){this.loadSubtitles();this.buildSubtitles()}},loadSubtitles:function(){_V_.get(this.subtitlesSource,this.parseSubtitles.context(this))},
parseSubtitles:function(a){a=a.replace("\r","").split("\n");this.subtitles=[];for(var b=this.currentSubtitlePosition=0;b<a.length;){var c={};c.id=a[b++];if(!c.id)break;var d=a[b++].split(" --\> ");c.startTime=this.parseSubtitleTime(d[0]);c.endTime=this.parseSubtitleTime(d[1]);for(d=[];a[b].length>0&&a[b]!="\r";)d.push(a[b++]);c.text=d.join("<br/>");this.subtitles.push(c);b++}},parseSubtitleTime:function(a){var b=a.split(":");a=0;a+=parseFloat(b[0])*60*60;a+=parseFloat(b[1])*60;b=b[2].split(",");a+=
parseFloat(b[0]);a+=parseFloat(b[1])/1E3;return a},buildSubtitles:function(){this.subtitlesDiv=_V_.createElement("div",{className:"vjs-subtitles"});this.box.appendChild(this.subtitlesDiv);this.initializeSubtitles()},initializeSubtitles:function(){this.video.addEventListener("timeupdate",this.subtitlesOnTimeUpdate.context(this),false)},subtitlesOnTimeUpdate:function(){if(this.subtitles){for(var a=this.currentSubtitlePosition;a<this.subtitles.length&&this.video.currentTime>this.subtitles[a].endTime;){if(this.subtitles[a].showing){this.subtitles[a].showing=
false;this.subtitlesDiv.innerHTML=""}this.currentSubtitlePosition++;a=this.currentSubtitlePosition}if(!(this.currentSubtitlePosition>=this.subtitles.length))if(this.video.currentTime>=this.subtitles[a].startTime&&this.video.currentTime<=this.subtitles[a].endTime){this.subtitlesDiv.innerHTML=this.subtitles[a].text;this.subtitles[a].showing=true}}},fixPreloading:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")&&this.video.preload!="none")this.video.autobuffer=
true;else{this.video.autobuffer=false;this.video.preload="none"}},history:[],log:function(a){if(a){if(typeof a=="string")a={type:a};a.type&&this.history.push(a.type);this.history.length>=50&&this.history.shift();this.options.debug===true&&console.log(a.type)}},getFlashObject:function(){for(var a=this.video.getElementsByTagName("OBJECT"),b=0,c=a.length;b<c;b++)if(a[b].className=="vjs-flash-fallback")return a[b]},replaceWithFlash:function(){if(this.flashObject){this.box.insertBefore(this.flashObject,
this.video);this.video.style.display="none"}},flashVersionSupported:function(){return VideoJS.getFlashVersion()>=this.options.flashVersion},getLinksFallback:function(){return this.box.getElementsByTagName("P")[0]},hideLinksFallback:function(){if(this.options.linksHiding&&this.linksFallback)this.linksFallback.style.display="none"},showLinksFallback:function(){if(this.linksFallback)this.linksFallback.style.display="block"},play:function(){this.video.play()},pause:function(){this.video.pause()},width:function(a){this.video.width=
a;this.box.width=a;this.poster.style.width=a+"px";this.positionControlBar();return this},height:function(a){this.video.height=a;this.box.height=a;this.poster.style.height=a+"px";this.positionControlBar();return this},volume:function(a){a!==undefined&&this.setVolume(a);return this.video.volume}}),_V_={addClass:function(a,b){if(a.className.split(/\s+/).lastIndexOf(b)==-1)a.className=a.className===""?b:a.className+" "+b},removeClass:function(a,b){if(a.className.indexOf(b)!=-1){var c=a.className.split(/\s+/);
c.splice(c.lastIndexOf(b),1);a.className=c.join(" ")}},merge:function(a,b){for(var c in b)if(b.hasOwnProperty(c))a[c]=b[c];return a},createElement:function(a,b){return _V_.merge(document.createElement(a),b)},blockTextSelection:function(){document.body.focus();document.onselectstart=function(){return false}},unblockTextSelection:function(){document.onselectstart=function(){return true}},formatTime:function(a){a=Math.round(a);var b=Math.floor(a/60);b=b>=10?b:"0"+b;a=Math.floor(a%60);a=a>=10?a:"0"+a;
return b+":"+a},getRelativePosition:function(a,b){return Math.max(0,Math.min(1,(a-_V_.findPosX(b))/b.offsetWidth))},findPosX:function(a){for(var b=a.offsetLeft;a=a.offsetParent;)b+=a.offsetLeft;return b},getComputedStyleValue:function(a,b){return window.getComputedStyle(a,null).getPropertyValue(b)},get:function(a,b){if(typeof XMLHttpRequest=="undefined")XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(g){}throw Error("This browser does not support XMLHttpRequest.");
};var c=new XMLHttpRequest;c.open("GET",a);c.onreadystatechange=function(){c.readyState==4&&c.status==200&&b(c.responseText)}.context(this);c.send()},bindDOMReady:function(){if(document.readyState==="complete")return _V_.DOMReady();if(document.addEventListener){document.addEventListener("DOMContentLoaded",_V_.DOMContentLoaded,false);window.addEventListener("load",_V_.DOMReady,false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",_V_.DOMContentLoaded);window.attachEvent("onload",
_V_.DOMReady)}},DOMContentLoaded:function(){if(document.addEventListener){document.removeEventListener("DOMContentLoaded",_V_.DOMContentLoaded,false);_V_.DOMReady()}else if(document.attachEvent)if(document.readyState==="complete"){document.detachEvent("onreadystatechange",_V_.DOMContentLoaded);_V_.DOMReady()}},DOMReadyList:[],addToDOMReady:function(a){_V_.DOMIsReady?a.call(document):_V_.DOMReadyList.push(a)},DOMIsReady:false,DOMReady:function(){if(!_V_.DOMIsReady){if(!document.body)return setTimeout(_V_.DOMReady,
13);_V_.DOMIsReady=true;if(_V_.DOMReadyList){for(var a=0;a<_V_.DOMReadyList.length;a++)_V_.DOMReadyList[a].call(document);_V_.DOMReadyList=null}}}};_V_.bindDOMReady();VideoJS.players={html5:{init:function(){if(VideoJS.browserSupportsVideo()&&this.canPlaySource()){this.html5Init();return true}else return false}},flashObject:{init:function(){if(this.flashObject&&this.flashVersionSupported()){this.replaceWithFlash();return true}else return false}},links:{init:function(){this.showLinksFallback();return true}}};
VideoJS.setupAllWhenReady=function(a){VideoJS.options=a;VideoJS.DOMReady(VideoJS.setup)};VideoJS.DOMReady=function(a){_V_.addToDOMReady(a)};VideoJS.setup=function(a,b){var c=false,d=[],e;if(!a||a=="All")a=VideoJS.getVideoJSTags();else if(typeof a!="object"||a.nodeType==1){a=[a];c=true}for(var g=0;g<a.length;g++){e=typeof a[g]=="string"?document.getElementById(a[g]):a[g];d.push(new VideoJS(e,b))}return c?d[0]:d};
VideoJS.getVideoJSTags=function(){for(var a=document.getElementsByTagName("video"),b=[],c,d=0,e=a.length;d<e;d++){c=a[d];c.className.indexOf("video-js")!=-1&&b.push(c)}return b};VideoJS.browserSupportsVideo=function(){if(typeof VideoJS.videoSupport!="undefined")return VideoJS.videoSupport;VideoJS.videoSupport=!!document.createElement("video").canPlayType;return VideoJS.videoSupport};
VideoJS.getFlashVersion=function(){if(typeof VideoJS.flashVersion!="undefined")return VideoJS.flashVersion;var a=0,b;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){if((b=navigator.plugins["Shockwave Flash"].description)&&!(typeof navigator.mimeTypes!="undefined"&&navigator.mimeTypes["application/x-shockwave-flash"]&&!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin))a=parseInt(b.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1],10)}else if(typeof window.ActiveXObject!=
"undefined")try{if(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))a=parseInt(b.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1],10)}catch(c){}VideoJS.flashVersion=a;return VideoJS.flashVersion};VideoJS.isIE=function(){return!+"\u000b1"};VideoJS.isIPad=function(){return navigator.userAgent.match(/iPad/i)!==null};VideoJS.isIPhone=function(){return navigator.userAgent.match(/iPhone/i)!==null};VideoJS.isIOS=function(){return VideoJS.isIPhone()||VideoJS.isIPad()};
VideoJS.iOSVersion=function(){var a=navigator.userAgent.match(/OS (\d+)_/i);if(a&&a[1])return a[1]};VideoJS.isAndroid=function(){return navigator.userAgent.match(/Android/i)!==null};VideoJS.androidVersion=function(){var a=navigator.userAgent.match(/Android (\d+)\./i);if(a&&a[1])return a[1]};VideoJS.errorCodes={videoNotReady:"Video is not ready yet (try playing the video first)."};Function.prototype.context=function(a){var b=this;return function(){return b.apply(a,arguments)}};VideoJS.isIE()&&document.createElement("video");
window.jQuery&&function(a){a.fn.VideoJS=function(b){this.each(function(){VideoJS.setup(this,b)});return this};a.fn.player=function(){return this[0].player}}(jQuery);if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};
deconcept.SWFObject=function(a,b,c,d,e,g,f,i,k,m,p){if(document.getElementById){this.DETECT_KEY=p?p:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];a&&this.setAttribute("swf",a);b&&this.setAttribute("id",b);c&&this.setAttribute("width",c);d&&this.setAttribute("height",d);e&&this.setAttribute("version",new deconcept.PlayerVersion(e.toString().split(".")));this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
g&&this.addParam("bgcolor",g);this.addParam("quality",i?i:"high");this.setAttribute("useExpressInstall",f);this.setAttribute("doExpressInstall",false);this.setAttribute("xiRedirectUrl",k?k:window.location);this.setAttribute("redirectUrl","");m&&this.setAttribute("redirectUrl",m)}};
deconcept.SWFObject.prototype={setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var a=[],b,c=this.getVariables();for(b in c)a.push(b+"="+c[b]);return a},getSWFHTML:function(){var a="";if(navigator.plugins&&
navigator.mimeTypes&&navigator.mimeTypes.length){this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","PlugIn");a='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';a+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var b=this.getParams(),c;for(c in b)a+=[c]+'="'+b[c]+'" ';c=this.getVariablePairs().join("&");if(c.length>0)a+='flashvars="'+c+'"';a+=
"/>"}else{this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","ActiveX");a='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';a+='<param name="movie" value="'+this.getAttribute("swf")+'" />';b=this.getParams();for(c in b)a+='<param name="'+c+'" value="'+b[c]+'" />';c=this.getVariablePairs().join("&");if(c.length>0)a+='<param name="flashvars" value="'+c+'" />';
a+="</object>"}return a},write:function(a){if(this.getAttribute("useExpressInstall"))if(this.installedVer.versionIsValid(new deconcept.PlayerVersion([6,0,65]))&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}if(this.skipDetect||this.getAttribute("doExpressInstall")||
this.installedVer.versionIsValid(this.getAttribute("version"))){(typeof a=="string"?document.getElementById(a):a).innerHTML=this.getSWFHTML();return true}else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl"));return false}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){var a=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];if(b&&b.description)a=new deconcept.PlayerVersion(b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}else{try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(c){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=new deconcept.PlayerVersion([6,0,21]);b.AllowScriptAccess=
"always"}catch(d){if(a.major==6)return a}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(b!=null)a=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","))}return a};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};
deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major)return false;if(this.major>a.major)return true;if(this.minor<a.minor)return false;if(this.minor>a.minor)return true;if(this.rev<a.rev)return false;return true};deconcept.util={getRequestParameter:function(a){var b=document.location.search||document.location.hash;if(b){b=b.substring(1).split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return b[c].substring(b[c].indexOf("=")+1)}return""}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(!(window.opera||!document.all))for(var a=document.getElementsByTagName("OBJECT"),b=0;b<a.length;b++){a[b].style.display="none";for(var c in a[b])if(typeof a[b][c]=="function")a[b][c]=function(){}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var a=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();a()}}else window.onunload=deconcept.SWFObjectUtil.cleanupSWFs};
if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload()}}else window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;if(Array.prototype.push==null)Array.prototype.push=function(a){this[this.length]=a;return this.length};var getQueryParamValue=deconcept.util.getRequestParameter,FlashObject=deconcept.SWFObject,SWFObject=deconcept.SWFObject;
