" )=0A=
.css({=0A=
position: "absolute",=0A=
width: iframe.outerWidth(),=0A=
height: iframe.outerHeight()=0A=
})=0A=
.appendTo( iframe.parent() )=0A=
.offset( iframe.offset() )[0];=0A=
});=0A=
},=0A=
=0A=
_unblockFrames: function() {=0A=
if ( this.iframeBlocks ) {=0A=
this.iframeBlocks.remove();=0A=
delete this.iframeBlocks;=0A=
}=0A=
},=0A=
=0A=
_allowInteraction: function( event ) {=0A=
if ( $( event.target ).closest(".ui-dialog").length ) {=0A=
return true;=0A=
}=0A=
=0A=
// TODO: Remove hack when datepicker implements=0A=
// the .ui-front logic (#8989)=0A=
return !!$( event.target ).closest(".ui-datepicker").length;=0A=
},=0A=
=0A=
_createOverlay: function() {=0A=
if ( !this.options.modal ) {=0A=
return;=0A=
}=0A=
=0A=
var that =3D this,=0A=
widgetFullName =3D this.widgetFullName;=0A=
if ( !$.ui.dialog.overlayInstances ) {=0A=
// Prevent use of anchors and inputs.=0A=
// We use a delay in case the overlay is created from an=0A=
// event that we're going to be cancelling. (#2804)=0A=
this._delay(function() {=0A=
// Handle .dialog().dialog("close") (#4065)=0A=
if ( $.ui.dialog.overlayInstances ) {=0A=
this.document.bind( "focusin.dialog", function( event ) {=0A=
if ( !that._allowInteraction( event ) ) {=0A=
event.preventDefault();=0A=
$(".ui-dialog:visible:last .ui-dialog-content")=0A=
.data( widgetFullName )._focusTabbable();=0A=
}=0A=
});=0A=
}=0A=
});=0A=
}=0A=
=0A=
this.overlay =3D $("
")=0A=
.addClass("ui-widget-overlay ui-front")=0A=
.appendTo( this._appendTo() );=0A=
this._on( this.overlay, {=0A=
mousedown: "_keepFocus"=0A=
});=0A=
$.ui.dialog.overlayInstances++;=0A=
},=0A=
=0A=
_destroyOverlay: function() {=0A=
if ( !this.options.modal ) {=0A=
return;=0A=
}=0A=
=0A=
if ( this.overlay ) {=0A=
$.ui.dialog.overlayInstances--;=0A=
=0A=
if ( !$.ui.dialog.overlayInstances ) {=0A=
this.document.unbind( "focusin.dialog" );=0A=
}=0A=
this.overlay.remove();=0A=
this.overlay =3D null;=0A=
}=0A=
}=0A=
});=0A=
=0A=
$.ui.dialog.overlayInstances =3D 0;=0A=
=0A=
// DEPRECATED=0A=
if ( $.uiBackCompat !=3D=3D false ) {=0A=
// position option with array notation=0A=
// just override with old implementation=0A=
$.widget( "ui.dialog", $.ui.dialog, {=0A=
_position: function() {=0A=
var position =3D this.options.position,=0A=
myAt =3D [],=0A=
offset =3D [ 0, 0 ],=0A=
isVisible;=0A=
=0A=
if ( position ) {=0A=
if ( typeof position =3D=3D=3D "string" || (typeof position =
=3D=3D=3D "object" && "0" in position ) ) {=0A=
myAt =3D position.split ? position.split(" ") : [ position[0], =
position[1] ];=0A=
if ( myAt.length =3D=3D=3D 1 ) {=0A=
myAt[1] =3D myAt[0];=0A=
}=0A=
=0A=
$.each( [ "left", "top" ], function( i, offsetPosition ) {=0A=
if ( +myAt[ i ] =3D=3D=3D myAt[ i ] ) {=0A=
offset[ i ] =3D myAt[ i ];=0A=
myAt[ i ] =3D offsetPosition;=0A=
}=0A=
});=0A=
=0A=
position =3D {=0A=
my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +=0A=
myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),=0A=
at: myAt.join(" ")=0A=
};=0A=
}=0A=
=0A=
position =3D $.extend( {}, $.ui.dialog.prototype.options.position, =
position );=0A=
} else {=0A=
position =3D $.ui.dialog.prototype.options.position;=0A=
}=0A=
=0A=
// need to show the dialog to get the actual offset in the position =
plugin=0A=
isVisible =3D this.uiDialog.is(":visible");=0A=
if ( !isVisible ) {=0A=
this.uiDialog.show();=0A=
}=0A=
this.uiDialog.position( position );=0A=
if ( !isVisible ) {=0A=
this.uiDialog.hide();=0A=
}=0A=
}=0A=
});=0A=
}=0A=
=0A=
}( jQuery ) );=0A=
(function( $, undefined ) {=0A=
=0A=
$.widget("ui.draggable", $.ui.mouse, {=0A=
version: "1.10.4",=0A=
widgetEventPrefix: "drag",=0A=
options: {=0A=
addClasses: true,=0A=
appendTo: "parent",=0A=
axis: false,=0A=
connectToSortable: false,=0A=
containment: false,=0A=
cursor: "auto",=0A=
cursorAt: false,=0A=
grid: false,=0A=
handle: false,=0A=
helper: "original",=0A=
iframeFix: false,=0A=
opacity: false,=0A=
refreshPositions: false,=0A=
revert: false,=0A=
revertDuration: 500,=0A=
scope: "default",=0A=
scroll: true,=0A=
scrollSensitivity: 20,=0A=
scrollSpeed: 20,=0A=
snap: false,=0A=
snapMode: "both",=0A=
snapTolerance: 20,=0A=
stack: false,=0A=
zIndex: false,=0A=
=0A=
// callbacks=0A=
drag: null,=0A=
start: null,=0A=
stop: null=0A=
},=0A=
_create: function() {=0A=
=0A=
if (this.options.helper =3D=3D=3D "original" && =
!(/^(?:r|a|f)/).test(this.element.css("position"))) {=0A=
this.element[0].style.position =3D "relative";=0A=
}=0A=
if (this.options.addClasses){=0A=
this.element.addClass("ui-draggable");=0A=
}=0A=
if (this.options.disabled){=0A=
this.element.addClass("ui-draggable-disabled");=0A=
}=0A=
=0A=
this._mouseInit();=0A=
=0A=
},=0A=
=0A=
_destroy: function() {=0A=
this.element.removeClass( "ui-draggable ui-draggable-dragging =
ui-draggable-disabled" );=0A=
this._mouseDestroy();=0A=
},=0A=
=0A=
_mouseCapture: function(event) {=0A=
=0A=
var o =3D this.options;=0A=
=0A=
// among others, prevent a drag on a resizable-handle=0A=
if (this.helper || o.disabled || =
$(event.target).closest(".ui-resizable-handle").length > 0) {=0A=
return false;=0A=
}=0A=
=0A=
//Quit if we're not on a valid handle=0A=
this.handle =3D this._getHandle(event);=0A=
if (!this.handle) {=0A=
return false;=0A=
}=0A=
=0A=
$(o.iframeFix =3D=3D=3D true ? "iframe" : o.iframeFix).each(function() =
{=0A=
$("
")=0A=
.css({=0A=
width: this.offsetWidth+"px", height: this.offsetHeight+"px",=0A=
position: "absolute", opacity: "0.001", zIndex: 1000=0A=
})=0A=
.css($(this).offset())=0A=
.appendTo("body");=0A=
});=0A=
=0A=
return true;=0A=
=0A=
},=0A=
=0A=
_mouseStart: function(event) {=0A=
=0A=
var o =3D this.options;=0A=
=0A=
//Create and append the visible helper=0A=
this.helper =3D this._createHelper(event);=0A=
=0A=
this.helper.addClass("ui-draggable-dragging");=0A=
=0A=
//Cache the helper size=0A=
this._cacheHelperProportions();=0A=
=0A=
//If ddmanager is used for droppables, set the global draggable=0A=
if($.ui.ddmanager) {=0A=
$.ui.ddmanager.current =3D this;=0A=
}=0A=
=0A=
/*=0A=
* - Position generation -=0A=
* This block generates everything position related - it's the core of =
draggables.=0A=
*/=0A=
=0A=
//Cache the margins of the original element=0A=
this._cacheMargins();=0A=
=0A=
//Store the helper's css position=0A=
this.cssPosition =3D this.helper.css( "position" );=0A=
this.scrollParent =3D this.helper.scrollParent();=0A=
this.offsetParent =3D this.helper.offsetParent();=0A=
this.offsetParentCssPosition =3D this.offsetParent.css( "position" );=0A=
=0A=
//The element's absolute position on the page minus margins=0A=
this.offset =3D this.positionAbs =3D this.element.offset();=0A=
this.offset =3D {=0A=
top: this.offset.top - this.margins.top,=0A=
left: this.offset.left - this.margins.left=0A=
};=0A=
=0A=
//Reset scroll cache=0A=
this.offset.scroll =3D false;=0A=
=0A=
$.extend(this.offset, {=0A=
click: { //Where the click happened, relative to the element=0A=
left: event.pageX - this.offset.left,=0A=
top: event.pageY - this.offset.top=0A=
},=0A=
parent: this._getParentOffset(),=0A=
relative: this._getRelativeOffset() //This is a relative to absolute =
position minus the actual position calculation - only used for relative =
positioned helper=0A=
});=0A=
=0A=
//Generate the original position=0A=
this.originalPosition =3D this.position =3D =
this._generatePosition(event);=0A=
this.originalPageX =3D event.pageX;=0A=
this.originalPageY =3D event.pageY;=0A=
=0A=
//Adjust the mouse offset relative to the helper if "cursorAt" is =
supplied=0A=
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));=0A=
=0A=
//Set a containment if given in the options=0A=
this._setContainment();=0A=
=0A=
//Trigger event + callbacks=0A=
if(this._trigger("start", event) =3D=3D=3D false) {=0A=
this._clear();=0A=
return false;=0A=
}=0A=
=0A=
//Recache the helper size=0A=
this._cacheHelperProportions();=0A=
=0A=
//Prepare the droppable offsets=0A=
if ($.ui.ddmanager && !o.dropBehaviour) {=0A=
$.ui.ddmanager.prepareOffsets(this, event);=0A=
}=0A=
=0A=
=0A=
this._mouseDrag(event, true); //Execute the drag once - this causes =
the helper not to be visible before getting its correct position=0A=
=0A=
//If the ddmanager is used for droppables, inform the manager that =
dragging has started (see #5003)=0A=
if ( $.ui.ddmanager ) {=0A=
$.ui.ddmanager.dragStart(this, event);=0A=
}=0A=
=0A=
return true;=0A=
},=0A=
=0A=
_mouseDrag: function(event, noPropagation) {=0A=
// reset any necessary cached properties (see #5009)=0A=
if ( this.offsetParentCssPosition =3D=3D=3D "fixed" ) {=0A=
this.offset.parent =3D this._getParentOffset();=0A=
}=0A=
=0A=
//Compute the helpers position=0A=
this.position =3D this._generatePosition(event);=0A=
this.positionAbs =3D this._convertPositionTo("absolute");=0A=
=0A=
//Call plugins and callbacks and use the resulting position if =
something is returned=0A=
if (!noPropagation) {=0A=
var ui =3D this._uiHash();=0A=
if(this._trigger("drag", event, ui) =3D=3D=3D false) {=0A=
this._mouseUp({});=0A=
return false;=0A=
}=0A=
this.position =3D ui.position;=0A=
}=0A=
=0A=
if(!this.options.axis || this.options.axis !=3D=3D "y") {=0A=
this.helper[0].style.left =3D this.position.left+"px";=0A=
}=0A=
if(!this.options.axis || this.options.axis !=3D=3D "x") {=0A=
this.helper[0].style.top =3D this.position.top+"px";=0A=
}=0A=
if($.ui.ddmanager) {=0A=
$.ui.ddmanager.drag(this, event);=0A=
}=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_mouseStop: function(event) {=0A=
=0A=
//If we are using droppables, inform the manager about the drop=0A=
var that =3D this,=0A=
dropped =3D false;=0A=
if ($.ui.ddmanager && !this.options.dropBehaviour) {=0A=
dropped =3D $.ui.ddmanager.drop(this, event);=0A=
}=0A=
=0A=
//if a drop comes from outside (a sortable)=0A=
if(this.dropped) {=0A=
dropped =3D this.dropped;=0A=
this.dropped =3D false;=0A=
}=0A=
=0A=
//if the original element is no longer in the DOM don't bother to =
continue (see #8269)=0A=
if ( this.options.helper =3D=3D=3D "original" && !$.contains( =
this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {=0A=
return false;=0A=
}=0A=
=0A=
if((this.options.revert =3D=3D=3D "invalid" && !dropped) || =
(this.options.revert =3D=3D=3D "valid" && dropped) || =
this.options.revert =3D=3D=3D true || ($.isFunction(this.options.revert) =
&& this.options.revert.call(this.element, dropped))) {=0A=
$(this.helper).animate(this.originalPosition, =
parseInt(this.options.revertDuration, 10), function() {=0A=
if(that._trigger("stop", event) !=3D=3D false) {=0A=
that._clear();=0A=
}=0A=
});=0A=
} else {=0A=
if(this._trigger("stop", event) !=3D=3D false) {=0A=
this._clear();=0A=
}=0A=
}=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_mouseUp: function(event) {=0A=
//Remove frame helpers=0A=
$("div.ui-draggable-iframeFix").each(function() {=0A=
this.parentNode.removeChild(this);=0A=
});=0A=
=0A=
//If the ddmanager is used for droppables, inform the manager that =
dragging has stopped (see #5003)=0A=
if( $.ui.ddmanager ) {=0A=
$.ui.ddmanager.dragStop(this, event);=0A=
}=0A=
=0A=
return $.ui.mouse.prototype._mouseUp.call(this, event);=0A=
},=0A=
=0A=
cancel: function() {=0A=
=0A=
if(this.helper.is(".ui-draggable-dragging")) {=0A=
this._mouseUp({});=0A=
} else {=0A=
this._clear();=0A=
}=0A=
=0A=
return this;=0A=
=0A=
},=0A=
=0A=
_getHandle: function(event) {=0A=
return this.options.handle ?=0A=
!!$( event.target ).closest( this.element.find( this.options.handle ) =
).length :=0A=
true;=0A=
},=0A=
=0A=
_createHelper: function(event) {=0A=
=0A=
var o =3D this.options,=0A=
helper =3D $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], =
[event])) : (o.helper =3D=3D=3D "clone" ? =
this.element.clone().removeAttr("id") : this.element);=0A=
=0A=
if(!helper.parents("body").length) {=0A=
helper.appendTo((o.appendTo =3D=3D=3D "parent" ? =
this.element[0].parentNode : o.appendTo));=0A=
}=0A=
=0A=
if(helper[0] !=3D=3D this.element[0] && =
!(/(fixed|absolute)/).test(helper.css("position"))) {=0A=
helper.css("position", "absolute");=0A=
}=0A=
=0A=
return helper;=0A=
=0A=
},=0A=
=0A=
_adjustOffsetFromHelper: function(obj) {=0A=
if (typeof obj =3D=3D=3D "string") {=0A=
obj =3D obj.split(" ");=0A=
}=0A=
if ($.isArray(obj)) {=0A=
obj =3D {left: +obj[0], top: +obj[1] || 0};=0A=
}=0A=
if ("left" in obj) {=0A=
this.offset.click.left =3D obj.left + this.margins.left;=0A=
}=0A=
if ("right" in obj) {=0A=
this.offset.click.left =3D this.helperProportions.width - obj.right + =
this.margins.left;=0A=
}=0A=
if ("top" in obj) {=0A=
this.offset.click.top =3D obj.top + this.margins.top;=0A=
}=0A=
if ("bottom" in obj) {=0A=
this.offset.click.top =3D this.helperProportions.height - obj.bottom =
+ this.margins.top;=0A=
}=0A=
},=0A=
=0A=
_getParentOffset: function() {=0A=
=0A=
//Get the offsetParent and cache its position=0A=
var po =3D this.offsetParent.offset();=0A=
=0A=
// This is a special case where we need to modify a offset calculated =
on start, since the following happened:=0A=
// 1. The position of the helper is absolute, so it's position is =
calculated based on the next positioned parent=0A=
// 2. The actual offset parent is a child of the scroll parent, and =
the scroll parent isn't the document, which means that=0A=
// the scroll is included in the initial calculation of the offset =
of the parent, and never recalculated upon drag=0A=
if(this.cssPosition =3D=3D=3D "absolute" && this.scrollParent[0] =
!=3D=3D document && $.contains(this.scrollParent[0], =
this.offsetParent[0])) {=0A=
po.left +=3D this.scrollParent.scrollLeft();=0A=
po.top +=3D this.scrollParent.scrollTop();=0A=
}=0A=
=0A=
//This needs to be actually done for all browsers, since pageX/pageY =
includes this information=0A=
//Ugly IE fix=0A=
if((this.offsetParent[0] =3D=3D=3D document.body) ||=0A=
(this.offsetParent[0].tagName && =
this.offsetParent[0].tagName.toLowerCase() =3D=3D=3D "html" && $.ui.ie)) =
{=0A=
po =3D { top: 0, left: 0 };=0A=
}=0A=
=0A=
return {=0A=
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) =
|| 0),=0A=
left: po.left + =
(parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)=0A=
};=0A=
=0A=
},=0A=
=0A=
_getRelativeOffset: function() {=0A=
=0A=
if(this.cssPosition =3D=3D=3D "relative") {=0A=
var p =3D this.element.position();=0A=
return {=0A=
top: p.top - (parseInt(this.helper.css("top"),10) || 0) + =
this.scrollParent.scrollTop(),=0A=
left: p.left - (parseInt(this.helper.css("left"),10) || 0) + =
this.scrollParent.scrollLeft()=0A=
};=0A=
} else {=0A=
return { top: 0, left: 0 };=0A=
}=0A=
=0A=
},=0A=
=0A=
_cacheMargins: function() {=0A=
this.margins =3D {=0A=
left: (parseInt(this.element.css("marginLeft"),10) || 0),=0A=
top: (parseInt(this.element.css("marginTop"),10) || 0),=0A=
right: (parseInt(this.element.css("marginRight"),10) || 0),=0A=
bottom: (parseInt(this.element.css("marginBottom"),10) || 0)=0A=
};=0A=
},=0A=
=0A=
_cacheHelperProportions: function() {=0A=
this.helperProportions =3D {=0A=
width: this.helper.outerWidth(),=0A=
height: this.helper.outerHeight()=0A=
};=0A=
},=0A=
=0A=
_setContainment: function() {=0A=
=0A=
var over, c, ce,=0A=
o =3D this.options;=0A=
=0A=
if ( !o.containment ) {=0A=
this.containment =3D null;=0A=
return;=0A=
}=0A=
=0A=
if ( o.containment =3D=3D=3D "window" ) {=0A=
this.containment =3D [=0A=
$( window ).scrollLeft() - this.offset.relative.left - =
this.offset.parent.left,=0A=
$( window ).scrollTop() - this.offset.relative.top - =
this.offset.parent.top,=0A=
$( window ).scrollLeft() + $( window ).width() - =
this.helperProportions.width - this.margins.left,=0A=
$( window ).scrollTop() + ( $( window ).height() || =
document.body.parentNode.scrollHeight ) - this.helperProportions.height =
- this.margins.top=0A=
];=0A=
return;=0A=
}=0A=
=0A=
if ( o.containment =3D=3D=3D "document") {=0A=
this.containment =3D [=0A=
0,=0A=
0,=0A=
$( document ).width() - this.helperProportions.width - =
this.margins.left,=0A=
( $( document ).height() || document.body.parentNode.scrollHeight ) =
- this.helperProportions.height - this.margins.top=0A=
];=0A=
return;=0A=
}=0A=
=0A=
if ( o.containment.constructor =3D=3D=3D Array ) {=0A=
this.containment =3D o.containment;=0A=
return;=0A=
}=0A=
=0A=
if ( o.containment =3D=3D=3D "parent" ) {=0A=
o.containment =3D this.helper[ 0 ].parentNode;=0A=
}=0A=
=0A=
c =3D $( o.containment );=0A=
ce =3D c[ 0 ];=0A=
=0A=
if( !ce ) {=0A=
return;=0A=
}=0A=
=0A=
over =3D c.css( "overflow" ) !=3D=3D "hidden";=0A=
=0A=
this.containment =3D [=0A=
( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( =
c.css( "paddingLeft" ), 10 ) || 0 ),=0A=
( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( =
c.css( "paddingTop" ), 10 ) || 0 ) ,=0A=
( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth =
) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( =
c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - =
this.margins.left - this.margins.right,=0A=
( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : =
ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 =
) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - =
this.helperProportions.height - this.margins.top - this.margins.bottom=0A=
];=0A=
this.relative_container =3D c;=0A=
},=0A=
=0A=
_convertPositionTo: function(d, pos) {=0A=
=0A=
if(!pos) {=0A=
pos =3D this.position;=0A=
}=0A=
=0A=
var mod =3D d =3D=3D=3D "absolute" ? 1 : -1,=0A=
scroll =3D this.cssPosition =3D=3D=3D "absolute" && !( =
this.scrollParent[ 0 ] !=3D=3D document && $.contains( =
this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : =
this.scrollParent;=0A=
=0A=
//Cache the scroll=0A=
if (!this.offset.scroll) {=0A=
this.offset.scroll =3D {top : scroll.scrollTop(), left : =
scroll.scrollLeft()};=0A=
}=0A=
=0A=
return {=0A=
top: (=0A=
pos.top + // The absolute mouse position=0A=
this.offset.relative.top * mod + // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.top * mod - // The offsetParent's offset =
without borders (offset + border)=0A=
( ( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )=0A=
),=0A=
left: (=0A=
pos.left + // The absolute mouse position=0A=
this.offset.relative.left * mod + // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.left * mod - // The offsetParent's =
offset without borders (offset + border)=0A=
( ( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )=0A=
)=0A=
};=0A=
=0A=
},=0A=
=0A=
_generatePosition: function(event) {=0A=
=0A=
var containment, co, top, left,=0A=
o =3D this.options,=0A=
scroll =3D this.cssPosition =3D=3D=3D "absolute" && !( =
this.scrollParent[ 0 ] !=3D=3D document && $.contains( =
this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : =
this.scrollParent,=0A=
pageX =3D event.pageX,=0A=
pageY =3D event.pageY;=0A=
=0A=
//Cache the scroll=0A=
if (!this.offset.scroll) {=0A=
this.offset.scroll =3D {top : scroll.scrollTop(), left : =
scroll.scrollLeft()};=0A=
}=0A=
=0A=
/*=0A=
* - Position constraining -=0A=
* Constrain the position to a mix of grid, containment.=0A=
*/=0A=
=0A=
// If we are not dragging yet, we won't check for options=0A=
if ( this.originalPosition ) {=0A=
if ( this.containment ) {=0A=
if ( this.relative_container ){=0A=
co =3D this.relative_container.offset();=0A=
containment =3D [=0A=
this.containment[ 0 ] + co.left,=0A=
this.containment[ 1 ] + co.top,=0A=
this.containment[ 2 ] + co.left,=0A=
this.containment[ 3 ] + co.top=0A=
];=0A=
}=0A=
else {=0A=
containment =3D this.containment;=0A=
}=0A=
=0A=
if(event.pageX - this.offset.click.left < containment[0]) {=0A=
pageX =3D containment[0] + this.offset.click.left;=0A=
}=0A=
if(event.pageY - this.offset.click.top < containment[1]) {=0A=
pageY =3D containment[1] + this.offset.click.top;=0A=
}=0A=
if(event.pageX - this.offset.click.left > containment[2]) {=0A=
pageX =3D containment[2] + this.offset.click.left;=0A=
}=0A=
if(event.pageY - this.offset.click.top > containment[3]) {=0A=
pageY =3D containment[3] + this.offset.click.top;=0A=
}=0A=
}=0A=
=0A=
if(o.grid) {=0A=
//Check for grid elements set to 0 to prevent divide by 0 error =
causing invalid argument errors in IE (see ticket #6950)=0A=
top =3D o.grid[1] ? this.originalPageY + Math.round((pageY - =
this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;=0A=
pageY =3D containment ? ((top - this.offset.click.top >=3D =
containment[1] || top - this.offset.click.top > containment[3]) ? top : =
((top - this.offset.click.top >=3D containment[1]) ? top - o.grid[1] : =
top + o.grid[1])) : top;=0A=
=0A=
left =3D o.grid[0] ? this.originalPageX + Math.round((pageX - =
this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;=0A=
pageX =3D containment ? ((left - this.offset.click.left >=3D =
containment[0] || left - this.offset.click.left > containment[2]) ? left =
: ((left - this.offset.click.left >=3D containment[0]) ? left - =
o.grid[0] : left + o.grid[0])) : left;=0A=
}=0A=
=0A=
}=0A=
=0A=
return {=0A=
top: (=0A=
pageY - // The absolute mouse position=0A=
this.offset.click.top - // Click offset (relative to the =
element)=0A=
this.offset.relative.top - // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.top + // The offsetParent's offset =
without borders (offset + border)=0A=
( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollTop() : this.offset.scroll.top )=0A=
),=0A=
left: (=0A=
pageX - // The absolute mouse position=0A=
this.offset.click.left - // Click offset (relative to the =
element)=0A=
this.offset.relative.left - // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.left + // The offsetParent's offset =
without borders (offset + border)=0A=
( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollLeft() : this.offset.scroll.left )=0A=
)=0A=
};=0A=
=0A=
},=0A=
=0A=
_clear: function() {=0A=
this.helper.removeClass("ui-draggable-dragging");=0A=
if(this.helper[0] !=3D=3D this.element[0] && =
!this.cancelHelperRemoval) {=0A=
this.helper.remove();=0A=
}=0A=
this.helper =3D null;=0A=
this.cancelHelperRemoval =3D false;=0A=
},=0A=
=0A=
// From now on bulk stuff - mainly helpers=0A=
=0A=
_trigger: function(type, event, ui) {=0A=
ui =3D ui || this._uiHash();=0A=
$.ui.plugin.call(this, type, [event, ui]);=0A=
//The absolute position has to be recalculated after plugins=0A=
if(type =3D=3D=3D "drag") {=0A=
this.positionAbs =3D this._convertPositionTo("absolute");=0A=
}=0A=
return $.Widget.prototype._trigger.call(this, type, event, ui);=0A=
},=0A=
=0A=
plugins: {},=0A=
=0A=
_uiHash: function() {=0A=
return {=0A=
helper: this.helper,=0A=
position: this.position,=0A=
originalPosition: this.originalPosition,=0A=
offset: this.positionAbs=0A=
};=0A=
}=0A=
=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "connectToSortable", {=0A=
start: function(event, ui) {=0A=
=0A=
var inst =3D $(this).data("ui-draggable"), o =3D inst.options,=0A=
uiSortable =3D $.extend({}, ui, { item: inst.element });=0A=
inst.sortables =3D [];=0A=
$(o.connectToSortable).each(function() {=0A=
var sortable =3D $.data(this, "ui-sortable");=0A=
if (sortable && !sortable.options.disabled) {=0A=
inst.sortables.push({=0A=
instance: sortable,=0A=
shouldRevert: sortable.options.revert=0A=
});=0A=
sortable.refreshPositions(); // Call the sortable's refreshPositions =
at drag start to refresh the containerCache since the sortable container =
cache is used in drag and needs to be up to date (this will ensure it's =
initialised as well as being kept in step with any changes that might =
have happened on the page).=0A=
sortable._trigger("activate", event, uiSortable);=0A=
}=0A=
});=0A=
=0A=
},=0A=
stop: function(event, ui) {=0A=
=0A=
//If we are still over the sortable, we fake the stop event of the =
sortable, but also remove helper=0A=
var inst =3D $(this).data("ui-draggable"),=0A=
uiSortable =3D $.extend({}, ui, { item: inst.element });=0A=
=0A=
$.each(inst.sortables, function() {=0A=
if(this.instance.isOver) {=0A=
=0A=
this.instance.isOver =3D 0;=0A=
=0A=
inst.cancelHelperRemoval =3D true; //Don't remove the helper in the =
draggable instance=0A=
this.instance.cancelHelperRemoval =3D false; //Remove it in the =
sortable instance (so sortable plugins like revert still work)=0A=
=0A=
//The sortable revert is supported, and we have to set a temporary =
dropped variable on the draggable to support revert: "valid/invalid"=0A=
if(this.shouldRevert) {=0A=
this.instance.options.revert =3D this.shouldRevert;=0A=
}=0A=
=0A=
//Trigger the stop of the sortable=0A=
this.instance._mouseStop(event);=0A=
=0A=
this.instance.options.helper =3D this.instance.options._helper;=0A=
=0A=
//If the helper has been the original item, restore properties in =
the sortable=0A=
if(inst.options.helper =3D=3D=3D "original") {=0A=
this.instance.currentItem.css({ top: "auto", left: "auto" });=0A=
}=0A=
=0A=
} else {=0A=
this.instance.cancelHelperRemoval =3D false; //Remove the helper in =
the sortable instance=0A=
this.instance._trigger("deactivate", event, uiSortable);=0A=
}=0A=
=0A=
});=0A=
=0A=
},=0A=
drag: function(event, ui) {=0A=
=0A=
var inst =3D $(this).data("ui-draggable"), that =3D this;=0A=
=0A=
$.each(inst.sortables, function() {=0A=
=0A=
var innermostIntersecting =3D false,=0A=
thisSortable =3D this;=0A=
=0A=
//Copy over some variables to allow calling the sortable's native =
_intersectsWith=0A=
this.instance.positionAbs =3D inst.positionAbs;=0A=
this.instance.helperProportions =3D inst.helperProportions;=0A=
this.instance.offset.click =3D inst.offset.click;=0A=
=0A=
if(this.instance._intersectsWith(this.instance.containerCache)) {=0A=
innermostIntersecting =3D true;=0A=
$.each(inst.sortables, function () {=0A=
this.instance.positionAbs =3D inst.positionAbs;=0A=
this.instance.helperProportions =3D inst.helperProportions;=0A=
this.instance.offset.click =3D inst.offset.click;=0A=
if (this !=3D=3D thisSortable &&=0A=
this.instance._intersectsWith(this.instance.containerCache) &&=0A=
$.contains(thisSortable.instance.element[0], =
this.instance.element[0])=0A=
) {=0A=
innermostIntersecting =3D false;=0A=
}=0A=
return innermostIntersecting;=0A=
});=0A=
}=0A=
=0A=
=0A=
if(innermostIntersecting) {=0A=
//If it intersects, we use a little isOver variable and set it once, =
so our move-in stuff gets fired only once=0A=
if(!this.instance.isOver) {=0A=
=0A=
this.instance.isOver =3D 1;=0A=
//Now we fake the start of dragging for the sortable instance,=0A=
//by cloning the list group item, appending it to the sortable and =
using it as inst.currentItem=0A=
//We can then fire the start event of the sortable with our passed =
browser event, and our own helper (so it doesn't create a new one)=0A=
this.instance.currentItem =3D =
$(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui=
-sortable-item", true);=0A=
this.instance.options._helper =3D this.instance.options.helper; =
//Store helper option to later restore it=0A=
this.instance.options.helper =3D function() { return ui.helper[0]; =
};=0A=
=0A=
event.target =3D this.instance.currentItem[0];=0A=
this.instance._mouseCapture(event, true);=0A=
this.instance._mouseStart(event, true, true);=0A=
=0A=
//Because the browser event is way off the new appended portlet, we =
modify a couple of variables to reflect the changes=0A=
this.instance.offset.click.top =3D inst.offset.click.top;=0A=
this.instance.offset.click.left =3D inst.offset.click.left;=0A=
this.instance.offset.parent.left -=3D inst.offset.parent.left - =
this.instance.offset.parent.left;=0A=
this.instance.offset.parent.top -=3D inst.offset.parent.top - =
this.instance.offset.parent.top;=0A=
=0A=
inst._trigger("toSortable", event);=0A=
inst.dropped =3D this.instance.element; //draggable revert needs =
that=0A=
//hack so receive/update callbacks work (mostly)=0A=
inst.currentItem =3D inst.element;=0A=
this.instance.fromOutside =3D inst;=0A=
=0A=
}=0A=
=0A=
//Provided we did all the previous steps, we can fire the drag event =
of the sortable on every draggable drag, when it intersects with the =
sortable=0A=
if(this.instance.currentItem) {=0A=
this.instance._mouseDrag(event);=0A=
}=0A=
=0A=
} else {=0A=
=0A=
//If it doesn't intersect with the sortable, and it intersected =
before,=0A=
//we fake the drag stop of the sortable, but make sure it doesn't =
remove the helper by using cancelHelperRemoval=0A=
if(this.instance.isOver) {=0A=
=0A=
this.instance.isOver =3D 0;=0A=
this.instance.cancelHelperRemoval =3D true;=0A=
=0A=
//Prevent reverting on this forced stop=0A=
this.instance.options.revert =3D false;=0A=
=0A=
// The out event needs to be triggered independently=0A=
this.instance._trigger("out", event, =
this.instance._uiHash(this.instance));=0A=
=0A=
this.instance._mouseStop(event, true);=0A=
this.instance.options.helper =3D this.instance.options._helper;=0A=
=0A=
//Now we remove our currentItem, the list group clone again, and =
the placeholder, and animate the helper back to it's original size=0A=
this.instance.currentItem.remove();=0A=
if(this.instance.placeholder) {=0A=
this.instance.placeholder.remove();=0A=
}=0A=
=0A=
inst._trigger("fromSortable", event);=0A=
inst.dropped =3D false; //draggable revert needs that=0A=
}=0A=
=0A=
}=0A=
=0A=
});=0A=
=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "cursor", {=0A=
start: function() {=0A=
var t =3D $("body"), o =3D $(this).data("ui-draggable").options;=0A=
if (t.css("cursor")) {=0A=
o._cursor =3D t.css("cursor");=0A=
}=0A=
t.css("cursor", o.cursor);=0A=
},=0A=
stop: function() {=0A=
var o =3D $(this).data("ui-draggable").options;=0A=
if (o._cursor) {=0A=
$("body").css("cursor", o._cursor);=0A=
}=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "opacity", {=0A=
start: function(event, ui) {=0A=
var t =3D $(ui.helper), o =3D $(this).data("ui-draggable").options;=0A=
if(t.css("opacity")) {=0A=
o._opacity =3D t.css("opacity");=0A=
}=0A=
t.css("opacity", o.opacity);=0A=
},=0A=
stop: function(event, ui) {=0A=
var o =3D $(this).data("ui-draggable").options;=0A=
if(o._opacity) {=0A=
$(ui.helper).css("opacity", o._opacity);=0A=
}=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "scroll", {=0A=
start: function() {=0A=
var i =3D $(this).data("ui-draggable");=0A=
if(i.scrollParent[0] !=3D=3D document && i.scrollParent[0].tagName =
!=3D=3D "HTML") {=0A=
i.overflowOffset =3D i.scrollParent.offset();=0A=
}=0A=
},=0A=
drag: function( event ) {=0A=
=0A=
var i =3D $(this).data("ui-draggable"), o =3D i.options, scrolled =3D =
false;=0A=
=0A=
if(i.scrollParent[0] !=3D=3D document && i.scrollParent[0].tagName =
!=3D=3D "HTML") {=0A=
=0A=
if(!o.axis || o.axis !=3D=3D "x") {=0A=
if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - =
event.pageY < o.scrollSensitivity) {=0A=
i.scrollParent[0].scrollTop =3D scrolled =3D =
i.scrollParent[0].scrollTop + o.scrollSpeed;=0A=
} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {=0A=
i.scrollParent[0].scrollTop =3D scrolled =3D =
i.scrollParent[0].scrollTop - o.scrollSpeed;=0A=
}=0A=
}=0A=
=0A=
if(!o.axis || o.axis !=3D=3D "y") {=0A=
if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - =
event.pageX < o.scrollSensitivity) {=0A=
i.scrollParent[0].scrollLeft =3D scrolled =3D =
i.scrollParent[0].scrollLeft + o.scrollSpeed;=0A=
} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) =
{=0A=
i.scrollParent[0].scrollLeft =3D scrolled =3D =
i.scrollParent[0].scrollLeft - o.scrollSpeed;=0A=
}=0A=
}=0A=
=0A=
} else {=0A=
=0A=
if(!o.axis || o.axis !=3D=3D "x") {=0A=
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollTop($(document).scrollTop() - =
o.scrollSpeed);=0A=
} else if($(window).height() - (event.pageY - =
$(document).scrollTop()) < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollTop($(document).scrollTop() + =
o.scrollSpeed);=0A=
}=0A=
}=0A=
=0A=
if(!o.axis || o.axis !=3D=3D "y") {=0A=
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollLeft($(document).scrollLeft() - =
o.scrollSpeed);=0A=
} else if($(window).width() - (event.pageX - =
$(document).scrollLeft()) < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollLeft($(document).scrollLeft() + =
o.scrollSpeed);=0A=
}=0A=
}=0A=
=0A=
}=0A=
=0A=
if(scrolled !=3D=3D false && $.ui.ddmanager && !o.dropBehaviour) {=0A=
$.ui.ddmanager.prepareOffsets(i, event);=0A=
}=0A=
=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "snap", {=0A=
start: function() {=0A=
=0A=
var i =3D $(this).data("ui-draggable"),=0A=
o =3D i.options;=0A=
=0A=
i.snapElements =3D [];=0A=
=0A=
$(o.snap.constructor !=3D=3D String ? ( o.snap.items || =
":data(ui-draggable)" ) : o.snap).each(function() {=0A=
var $t =3D $(this),=0A=
$o =3D $t.offset();=0A=
if(this !=3D=3D i.element[0]) {=0A=
i.snapElements.push({=0A=
item: this,=0A=
width: $t.outerWidth(), height: $t.outerHeight(),=0A=
top: $o.top, left: $o.left=0A=
});=0A=
}=0A=
});=0A=
=0A=
},=0A=
drag: function(event, ui) {=0A=
=0A=
var ts, bs, ls, rs, l, r, t, b, i, first,=0A=
inst =3D $(this).data("ui-draggable"),=0A=
o =3D inst.options,=0A=
d =3D o.snapTolerance,=0A=
x1 =3D ui.offset.left, x2 =3D x1 + inst.helperProportions.width,=0A=
y1 =3D ui.offset.top, y2 =3D y1 + inst.helperProportions.height;=0A=
=0A=
for (i =3D inst.snapElements.length - 1; i >=3D 0; i--){=0A=
=0A=
l =3D inst.snapElements[i].left;=0A=
r =3D l + inst.snapElements[i].width;=0A=
t =3D inst.snapElements[i].top;=0A=
b =3D t + inst.snapElements[i].height;=0A=
=0A=
if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || =
!$.contains( inst.snapElements[ i ].item.ownerDocument, =
inst.snapElements[ i ].item ) ) {=0A=
if(inst.snapElements[i].snapping) {=0A=
(inst.options.snap.release && =
inst.options.snap.release.call(inst.element, event, =
$.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));=0A=
}=0A=
inst.snapElements[i].snapping =3D false;=0A=
continue;=0A=
}=0A=
=0A=
if(o.snapMode !=3D=3D "inner") {=0A=
ts =3D Math.abs(t - y2) <=3D d;=0A=
bs =3D Math.abs(b - y1) <=3D d;=0A=
ls =3D Math.abs(l - x2) <=3D d;=0A=
rs =3D Math.abs(r - x1) <=3D d;=0A=
if(ts) {=0A=
ui.position.top =3D inst._convertPositionTo("relative", { top: t - =
inst.helperProportions.height, left: 0 }).top - inst.margins.top;=0A=
}=0A=
if(bs) {=0A=
ui.position.top =3D inst._convertPositionTo("relative", { top: b, =
left: 0 }).top - inst.margins.top;=0A=
}=0A=
if(ls) {=0A=
ui.position.left =3D inst._convertPositionTo("relative", { top: 0, =
left: l - inst.helperProportions.width }).left - inst.margins.left;=0A=
}=0A=
if(rs) {=0A=
ui.position.left =3D inst._convertPositionTo("relative", { top: 0, =
left: r }).left - inst.margins.left;=0A=
}=0A=
}=0A=
=0A=
first =3D (ts || bs || ls || rs);=0A=
=0A=
if(o.snapMode !=3D=3D "outer") {=0A=
ts =3D Math.abs(t - y1) <=3D d;=0A=
bs =3D Math.abs(b - y2) <=3D d;=0A=
ls =3D Math.abs(l - x1) <=3D d;=0A=
rs =3D Math.abs(r - x2) <=3D d;=0A=
if(ts) {=0A=
ui.position.top =3D inst._convertPositionTo("relative", { top: t, =
left: 0 }).top - inst.margins.top;=0A=
}=0A=
if(bs) {=0A=
ui.position.top =3D inst._convertPositionTo("relative", { top: b - =
inst.helperProportions.height, left: 0 }).top - inst.margins.top;=0A=
}=0A=
if(ls) {=0A=
ui.position.left =3D inst._convertPositionTo("relative", { top: 0, =
left: l }).left - inst.margins.left;=0A=
}=0A=
if(rs) {=0A=
ui.position.left =3D inst._convertPositionTo("relative", { top: 0, =
left: r - inst.helperProportions.width }).left - inst.margins.left;=0A=
}=0A=
}=0A=
=0A=
if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) =
{=0A=
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, =
event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item =
})));=0A=
}=0A=
inst.snapElements[i].snapping =3D (ts || bs || ls || rs || first);=0A=
=0A=
}=0A=
=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "stack", {=0A=
start: function() {=0A=
var min,=0A=
o =3D this.data("ui-draggable").options,=0A=
group =3D $.makeArray($(o.stack)).sort(function(a,b) {=0A=
return (parseInt($(a).css("zIndex"),10) || 0) - =
(parseInt($(b).css("zIndex"),10) || 0);=0A=
});=0A=
=0A=
if (!group.length) { return; }=0A=
=0A=
min =3D parseInt($(group[0]).css("zIndex"), 10) || 0;=0A=
$(group).each(function(i) {=0A=
$(this).css("zIndex", min + i);=0A=
});=0A=
this.css("zIndex", (min + group.length));=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("draggable", "zIndex", {=0A=
start: function(event, ui) {=0A=
var t =3D $(ui.helper), o =3D $(this).data("ui-draggable").options;=0A=
if(t.css("zIndex")) {=0A=
o._zIndex =3D t.css("zIndex");=0A=
}=0A=
t.css("zIndex", o.zIndex);=0A=
},=0A=
stop: function(event, ui) {=0A=
var o =3D $(this).data("ui-draggable").options;=0A=
if(o._zIndex) {=0A=
$(ui.helper).css("zIndex", o._zIndex);=0A=
}=0A=
}=0A=
});=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
function isOverAxis( x, reference, size ) {=0A=
return ( x > reference ) && ( x < ( reference + size ) );=0A=
}=0A=
=0A=
$.widget("ui.droppable", {=0A=
version: "1.10.4",=0A=
widgetEventPrefix: "drop",=0A=
options: {=0A=
accept: "*",=0A=
activeClass: false,=0A=
addClasses: true,=0A=
greedy: false,=0A=
hoverClass: false,=0A=
scope: "default",=0A=
tolerance: "intersect",=0A=
=0A=
// callbacks=0A=
activate: null,=0A=
deactivate: null,=0A=
drop: null,=0A=
out: null,=0A=
over: null=0A=
},=0A=
_create: function() {=0A=
=0A=
var proportions,=0A=
o =3D this.options,=0A=
accept =3D o.accept;=0A=
=0A=
this.isover =3D false;=0A=
this.isout =3D true;=0A=
=0A=
this.accept =3D $.isFunction(accept) ? accept : function(d) {=0A=
return d.is(accept);=0A=
};=0A=
=0A=
this.proportions =3D function( /* valueToWrite */ ) {=0A=
if ( arguments.length ) {=0A=
// Store the droppable's proportions=0A=
proportions =3D arguments[ 0 ];=0A=
} else {=0A=
// Retrieve or derive the droppable's proportions=0A=
return proportions ?=0A=
proportions :=0A=
proportions =3D {=0A=
width: this.element[ 0 ].offsetWidth,=0A=
height: this.element[ 0 ].offsetHeight=0A=
};=0A=
}=0A=
};=0A=
=0A=
// Add the reference and positions to the manager=0A=
$.ui.ddmanager.droppables[o.scope] =3D =
$.ui.ddmanager.droppables[o.scope] || [];=0A=
$.ui.ddmanager.droppables[o.scope].push(this);=0A=
=0A=
(o.addClasses && this.element.addClass("ui-droppable"));=0A=
=0A=
},=0A=
=0A=
_destroy: function() {=0A=
var i =3D 0,=0A=
drop =3D $.ui.ddmanager.droppables[this.options.scope];=0A=
=0A=
for ( ; i < drop.length; i++ ) {=0A=
if ( drop[i] =3D=3D=3D this ) {=0A=
drop.splice(i, 1);=0A=
}=0A=
}=0A=
=0A=
this.element.removeClass("ui-droppable ui-droppable-disabled");=0A=
},=0A=
=0A=
_setOption: function(key, value) {=0A=
=0A=
if(key =3D=3D=3D "accept") {=0A=
this.accept =3D $.isFunction(value) ? value : function(d) {=0A=
return d.is(value);=0A=
};=0A=
}=0A=
$.Widget.prototype._setOption.apply(this, arguments);=0A=
},=0A=
=0A=
_activate: function(event) {=0A=
var draggable =3D $.ui.ddmanager.current;=0A=
if(this.options.activeClass) {=0A=
this.element.addClass(this.options.activeClass);=0A=
}=0A=
if(draggable){=0A=
this._trigger("activate", event, this.ui(draggable));=0A=
}=0A=
},=0A=
=0A=
_deactivate: function(event) {=0A=
var draggable =3D $.ui.ddmanager.current;=0A=
if(this.options.activeClass) {=0A=
this.element.removeClass(this.options.activeClass);=0A=
}=0A=
if(draggable){=0A=
this._trigger("deactivate", event, this.ui(draggable));=0A=
}=0A=
},=0A=
=0A=
_over: function(event) {=0A=
=0A=
var draggable =3D $.ui.ddmanager.current;=0A=
=0A=
// Bail if draggable and droppable are same element=0A=
if (!draggable || (draggable.currentItem || draggable.element)[0] =
=3D=3D=3D this.element[0]) {=0A=
return;=0A=
}=0A=
=0A=
if (this.accept.call(this.element[0],(draggable.currentItem || =
draggable.element))) {=0A=
if(this.options.hoverClass) {=0A=
this.element.addClass(this.options.hoverClass);=0A=
}=0A=
this._trigger("over", event, this.ui(draggable));=0A=
}=0A=
=0A=
},=0A=
=0A=
_out: function(event) {=0A=
=0A=
var draggable =3D $.ui.ddmanager.current;=0A=
=0A=
// Bail if draggable and droppable are same element=0A=
if (!draggable || (draggable.currentItem || draggable.element)[0] =
=3D=3D=3D this.element[0]) {=0A=
return;=0A=
}=0A=
=0A=
if (this.accept.call(this.element[0],(draggable.currentItem || =
draggable.element))) {=0A=
if(this.options.hoverClass) {=0A=
this.element.removeClass(this.options.hoverClass);=0A=
}=0A=
this._trigger("out", event, this.ui(draggable));=0A=
}=0A=
=0A=
},=0A=
=0A=
_drop: function(event,custom) {=0A=
=0A=
var draggable =3D custom || $.ui.ddmanager.current,=0A=
childrenIntersection =3D false;=0A=
=0A=
// Bail if draggable and droppable are same element=0A=
if (!draggable || (draggable.currentItem || draggable.element)[0] =
=3D=3D=3D this.element[0]) {=0A=
return false;=0A=
}=0A=
=0A=
=
this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").ea=
ch(function() {=0A=
var inst =3D $.data(this, "ui-droppable");=0A=
if(=0A=
inst.options.greedy &&=0A=
!inst.options.disabled &&=0A=
inst.options.scope =3D=3D=3D draggable.options.scope &&=0A=
inst.accept.call(inst.element[0], (draggable.currentItem || =
draggable.element)) &&=0A=
$.ui.intersect(draggable, $.extend(inst, { offset: =
inst.element.offset() }), inst.options.tolerance)=0A=
) { childrenIntersection =3D true; return false; }=0A=
});=0A=
if(childrenIntersection) {=0A=
return false;=0A=
}=0A=
=0A=
if(this.accept.call(this.element[0],(draggable.currentItem || =
draggable.element))) {=0A=
if(this.options.activeClass) {=0A=
this.element.removeClass(this.options.activeClass);=0A=
}=0A=
if(this.options.hoverClass) {=0A=
this.element.removeClass(this.options.hoverClass);=0A=
}=0A=
this._trigger("drop", event, this.ui(draggable));=0A=
return this.element;=0A=
}=0A=
=0A=
return false;=0A=
=0A=
},=0A=
=0A=
ui: function(c) {=0A=
return {=0A=
draggable: (c.currentItem || c.element),=0A=
helper: c.helper,=0A=
position: c.position,=0A=
offset: c.positionAbs=0A=
};=0A=
}=0A=
=0A=
});=0A=
=0A=
$.ui.intersect =3D function(draggable, droppable, toleranceMode) {=0A=
=0A=
if (!droppable.offset) {=0A=
return false;=0A=
}=0A=
=0A=
var draggableLeft, draggableTop,=0A=
x1 =3D (draggable.positionAbs || draggable.position.absolute).left,=0A=
y1 =3D (draggable.positionAbs || draggable.position.absolute).top,=0A=
x2 =3D x1 + draggable.helperProportions.width,=0A=
y2 =3D y1 + draggable.helperProportions.height,=0A=
l =3D droppable.offset.left,=0A=
t =3D droppable.offset.top,=0A=
r =3D l + droppable.proportions().width,=0A=
b =3D t + droppable.proportions().height;=0A=
=0A=
switch (toleranceMode) {=0A=
case "fit":=0A=
return (l <=3D x1 && x2 <=3D r && t <=3D y1 && y2 <=3D b);=0A=
case "intersect":=0A=
return (l < x1 + (draggable.helperProportions.width / 2) && // Right =
Half=0A=
x2 - (draggable.helperProportions.width / 2) < r && // Left Half=0A=
t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half=0A=
y2 - (draggable.helperProportions.height / 2) < b ); // Top Half=0A=
case "pointer":=0A=
draggableLeft =3D ((draggable.positionAbs || =
draggable.position.absolute).left + (draggable.clickOffset || =
draggable.offset.click).left);=0A=
draggableTop =3D ((draggable.positionAbs || =
draggable.position.absolute).top + (draggable.clickOffset || =
draggable.offset.click).top);=0A=
return isOverAxis( draggableTop, t, droppable.proportions().height ) =
&& isOverAxis( draggableLeft, l, droppable.proportions().width );=0A=
case "touch":=0A=
return (=0A=
(y1 >=3D t && y1 <=3D b) || // Top edge touching=0A=
(y2 >=3D t && y2 <=3D b) || // Bottom edge touching=0A=
(y1 < t && y2 > b) // Surrounded vertically=0A=
) && (=0A=
(x1 >=3D l && x1 <=3D r) || // Left edge touching=0A=
(x2 >=3D l && x2 <=3D r) || // Right edge touching=0A=
(x1 < l && x2 > r) // Surrounded horizontally=0A=
);=0A=
default:=0A=
return false;=0A=
}=0A=
=0A=
};=0A=
=0A=
/*=0A=
This manager tracks offsets of draggables and droppables=0A=
*/=0A=
$.ui.ddmanager =3D {=0A=
current: null,=0A=
droppables: { "default": [] },=0A=
prepareOffsets: function(t, event) {=0A=
=0A=
var i, j,=0A=
m =3D $.ui.ddmanager.droppables[t.options.scope] || [],=0A=
type =3D event ? event.type : null, // workaround for #2317=0A=
list =3D (t.currentItem || =
t.element).find(":data(ui-droppable)").addBack();=0A=
=0A=
droppablesLoop: for (i =3D 0; i < m.length; i++) {=0A=
=0A=
//No disabled and non-accepted=0A=
if(m[i].options.disabled || (t && =
!m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {=0A=
continue;=0A=
}=0A=
=0A=
// Filter out elements in the current dragged item=0A=
for (j=3D0; j < list.length; j++) {=0A=
if(list[j] =3D=3D=3D m[i].element[0]) {=0A=
m[i].proportions().height =3D 0;=0A=
continue droppablesLoop;=0A=
}=0A=
}=0A=
=0A=
m[i].visible =3D m[i].element.css("display") !=3D=3D "none";=0A=
if(!m[i].visible) {=0A=
continue;=0A=
}=0A=
=0A=
//Activate the droppable if used directly from draggables=0A=
if(type =3D=3D=3D "mousedown") {=0A=
m[i]._activate.call(m[i], event);=0A=
}=0A=
=0A=
m[ i ].offset =3D m[ i ].element.offset();=0A=
m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: =
m[ i ].element[ 0 ].offsetHeight });=0A=
=0A=
}=0A=
=0A=
},=0A=
drop: function(draggable, event) {=0A=
=0A=
var dropped =3D false;=0A=
// Create a copy of the droppables in case the list changes during the =
drop (#9116)=0A=
$.each(($.ui.ddmanager.droppables[draggable.options.scope] || =
[]).slice(), function() {=0A=
=0A=
if(!this.options) {=0A=
return;=0A=
}=0A=
if (!this.options.disabled && this.visible && =
$.ui.intersect(draggable, this, this.options.tolerance)) {=0A=
dropped =3D this._drop.call(this, event) || dropped;=0A=
}=0A=
=0A=
if (!this.options.disabled && this.visible && =
this.accept.call(this.element[0],(draggable.currentItem || =
draggable.element))) {=0A=
this.isout =3D true;=0A=
this.isover =3D false;=0A=
this._deactivate.call(this, event);=0A=
}=0A=
=0A=
});=0A=
return dropped;=0A=
=0A=
},=0A=
dragStart: function( draggable, event ) {=0A=
//Listen for scrolling so that if the dragging causes scrolling the =
position of the droppables can be recalculated (see #5003)=0A=
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", =
function() {=0A=
if( !draggable.options.refreshPositions ) {=0A=
$.ui.ddmanager.prepareOffsets( draggable, event );=0A=
}=0A=
});=0A=
},=0A=
drag: function(draggable, event) {=0A=
=0A=
//If you have a highly dynamic page, you might try this option. It =
renders positions every time you move the mouse.=0A=
if(draggable.options.refreshPositions) {=0A=
$.ui.ddmanager.prepareOffsets(draggable, event);=0A=
}=0A=
=0A=
//Run through all droppables and check their positions based on =
specific tolerance options=0A=
$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], =
function() {=0A=
=0A=
if(this.options.disabled || this.greedyChild || !this.visible) {=0A=
return;=0A=
}=0A=
=0A=
var parentInstance, scope, parent,=0A=
intersects =3D $.ui.intersect(draggable, this, =
this.options.tolerance),=0A=
c =3D !intersects && this.isover ? "isout" : (intersects && =
!this.isover ? "isover" : null);=0A=
if(!c) {=0A=
return;=0A=
}=0A=
=0A=
if (this.options.greedy) {=0A=
// find droppable parents with same scope=0A=
scope =3D this.options.scope;=0A=
parent =3D =
this.element.parents(":data(ui-droppable)").filter(function () {=0A=
return $.data(this, "ui-droppable").options.scope =3D=3D=3D scope;=0A=
});=0A=
=0A=
if (parent.length) {=0A=
parentInstance =3D $.data(parent[0], "ui-droppable");=0A=
parentInstance.greedyChild =3D (c =3D=3D=3D "isover");=0A=
}=0A=
}=0A=
=0A=
// we just moved into a greedy child=0A=
if (parentInstance && c =3D=3D=3D "isover") {=0A=
parentInstance.isover =3D false;=0A=
parentInstance.isout =3D true;=0A=
parentInstance._out.call(parentInstance, event);=0A=
}=0A=
=0A=
this[c] =3D true;=0A=
this[c =3D=3D=3D "isout" ? "isover" : "isout"] =3D false;=0A=
this[c =3D=3D=3D "isover" ? "_over" : "_out"].call(this, event);=0A=
=0A=
// we just moved out of a greedy child=0A=
if (parentInstance && c =3D=3D=3D "isout") {=0A=
parentInstance.isout =3D false;=0A=
parentInstance.isover =3D true;=0A=
parentInstance._over.call(parentInstance, event);=0A=
}=0A=
});=0A=
=0A=
},=0A=
dragStop: function( draggable, event ) {=0A=
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );=0A=
//Call prepareOffsets one final time since IE does not fire return =
scroll events when overflow was caused by drag (see #5003)=0A=
if( !draggable.options.refreshPositions ) {=0A=
$.ui.ddmanager.prepareOffsets( draggable, event );=0A=
}=0A=
}=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function($, undefined) {=0A=
=0A=
var dataSpace =3D "ui-effects-";=0A=
=0A=
$.effects =3D {=0A=
effect: {}=0A=
};=0A=
=0A=
/*!=0A=
* jQuery Color Animations v2.1.2=0A=
* https://github.com/jquery/jquery-color=0A=
*=0A=
* Copyright 2013 jQuery Foundation and other contributors=0A=
* Released under the MIT license.=0A=
* http://jquery.org/license=0A=
*=0A=
* Date: Wed Jan 16 08:47:09 2013 -0600=0A=
*/=0A=
(function( jQuery, undefined ) {=0A=
=0A=
var stepHooks =3D "backgroundColor borderBottomColor borderLeftColor =
borderRightColor borderTopColor color columnRuleColor outlineColor =
textDecorationColor textEmphasisColor",=0A=
=0A=
// plusequals test for +=3D 100 -=3D 100=0A=
rplusequals =3D /^([\-+])=3D\s*(\d+\.?\d*)/,=0A=
// a set of RE's that can match strings and generate color tuples.=0A=
stringParsers =3D [{=0A=
re: =
/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d=
+)?)\s*)?\)/,=0A=
parse: function( execResult ) {=0A=
return [=0A=
execResult[ 1 ],=0A=
execResult[ 2 ],=0A=
execResult[ 3 ],=0A=
execResult[ 4 ]=0A=
];=0A=
}=0A=
}, {=0A=
re: =
/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?=
)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,=0A=
parse: function( execResult ) {=0A=
return [=0A=
execResult[ 1 ] * 2.55,=0A=
execResult[ 2 ] * 2.55,=0A=
execResult[ 3 ] * 2.55,=0A=
execResult[ 4 ]=0A=
];=0A=
}=0A=
}, {=0A=
// this regex ignores A-F because it's compared against an already =
lowercased string=0A=
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,=0A=
parse: function( execResult ) {=0A=
return [=0A=
parseInt( execResult[ 1 ], 16 ),=0A=
parseInt( execResult[ 2 ], 16 ),=0A=
parseInt( execResult[ 3 ], 16 )=0A=
];=0A=
}=0A=
}, {=0A=
// this regex ignores A-F because it's compared against an already =
lowercased string=0A=
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,=0A=
parse: function( execResult ) {=0A=
return [=0A=
parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),=0A=
parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),=0A=
parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )=0A=
];=0A=
}=0A=
}, {=0A=
re: =
/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\=
%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,=0A=
space: "hsla",=0A=
parse: function( execResult ) {=0A=
return [=0A=
execResult[ 1 ],=0A=
execResult[ 2 ] / 100,=0A=
execResult[ 3 ] / 100,=0A=
execResult[ 4 ]=0A=
];=0A=
}=0A=
}],=0A=
=0A=
// jQuery.Color( )=0A=
color =3D jQuery.Color =3D function( color, green, blue, alpha ) {=0A=
return new jQuery.Color.fn.parse( color, green, blue, alpha );=0A=
},=0A=
spaces =3D {=0A=
rgba: {=0A=
props: {=0A=
red: {=0A=
idx: 0,=0A=
type: "byte"=0A=
},=0A=
green: {=0A=
idx: 1,=0A=
type: "byte"=0A=
},=0A=
blue: {=0A=
idx: 2,=0A=
type: "byte"=0A=
}=0A=
}=0A=
},=0A=
=0A=
hsla: {=0A=
props: {=0A=
hue: {=0A=
idx: 0,=0A=
type: "degrees"=0A=
},=0A=
saturation: {=0A=
idx: 1,=0A=
type: "percent"=0A=
},=0A=
lightness: {=0A=
idx: 2,=0A=
type: "percent"=0A=
}=0A=
}=0A=
}=0A=
},=0A=
propTypes =3D {=0A=
"byte": {=0A=
floor: true,=0A=
max: 255=0A=
},=0A=
"percent": {=0A=
max: 1=0A=
},=0A=
"degrees": {=0A=
mod: 360,=0A=
floor: true=0A=
}=0A=
},=0A=
support =3D color.support =3D {},=0A=
=0A=
// element for support tests=0A=
supportElem =3D jQuery( "
" )[ 0 ],=0A=
=0A=
// colors =3D jQuery.Color.names=0A=
colors,=0A=
=0A=
// local aliases of functions called often=0A=
each =3D jQuery.each;=0A=
=0A=
// determine rgba support immediately=0A=
supportElem.style.cssText =3D "background-color:rgba(1,1,1,.5)";=0A=
support.rgba =3D supportElem.style.backgroundColor.indexOf( "rgba" ) > =
-1;=0A=
=0A=
// define cache name and alpha properties=0A=
// for rgba and hsla spaces=0A=
each( spaces, function( spaceName, space ) {=0A=
space.cache =3D "_" + spaceName;=0A=
space.props.alpha =3D {=0A=
idx: 3,=0A=
type: "percent",=0A=
def: 1=0A=
};=0A=
});=0A=
=0A=
function clamp( value, prop, allowEmpty ) {=0A=
var type =3D propTypes[ prop.type ] || {};=0A=
=0A=
if ( value =3D=3D null ) {=0A=
return (allowEmpty || !prop.def) ? null : prop.def;=0A=
}=0A=
=0A=
// ~~ is an short way of doing floor for positive numbers=0A=
value =3D type.floor ? ~~value : parseFloat( value );=0A=
=0A=
// IE will pass in empty strings as value for alpha,=0A=
// which will hit this case=0A=
if ( isNaN( value ) ) {=0A=
return prop.def;=0A=
}=0A=
=0A=
if ( type.mod ) {=0A=
// we add mod before modding to make sure that negatives values=0A=
// get converted properly: -10 -> 350=0A=
return (value + type.mod) % type.mod;=0A=
}=0A=
=0A=
// for now all property types without mod have min and max=0A=
return 0 > value ? 0 : type.max < value ? type.max : value;=0A=
}=0A=
=0A=
function stringParse( string ) {=0A=
var inst =3D color(),=0A=
rgba =3D inst._rgba =3D [];=0A=
=0A=
string =3D string.toLowerCase();=0A=
=0A=
each( stringParsers, function( i, parser ) {=0A=
var parsed,=0A=
match =3D parser.re.exec( string ),=0A=
values =3D match && parser.parse( match ),=0A=
spaceName =3D parser.space || "rgba";=0A=
=0A=
if ( values ) {=0A=
parsed =3D inst[ spaceName ]( values );=0A=
=0A=
// if this was an rgba parse the assignment might happen twice=0A=
// oh well....=0A=
inst[ spaces[ spaceName ].cache ] =3D parsed[ spaces[ spaceName =
].cache ];=0A=
rgba =3D inst._rgba =3D parsed._rgba;=0A=
=0A=
// exit each( stringParsers ) here because we matched=0A=
return false;=0A=
}=0A=
});=0A=
=0A=
// Found a stringParser that handled it=0A=
if ( rgba.length ) {=0A=
=0A=
// if this came from a parsed string, force "transparent" when alpha =
is 0=0A=
// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)=0A=
if ( rgba.join() =3D=3D=3D "0,0,0,0" ) {=0A=
jQuery.extend( rgba, colors.transparent );=0A=
}=0A=
return inst;=0A=
}=0A=
=0A=
// named colors=0A=
return colors[ string ];=0A=
}=0A=
=0A=
color.fn =3D jQuery.extend( color.prototype, {=0A=
parse: function( red, green, blue, alpha ) {=0A=
if ( red =3D=3D=3D undefined ) {=0A=
this._rgba =3D [ null, null, null, null ];=0A=
return this;=0A=
}=0A=
if ( red.jquery || red.nodeType ) {=0A=
red =3D jQuery( red ).css( green );=0A=
green =3D undefined;=0A=
}=0A=
=0A=
var inst =3D this,=0A=
type =3D jQuery.type( red ),=0A=
rgba =3D this._rgba =3D [];=0A=
=0A=
// more than 1 argument specified - assume ( red, green, blue, alpha )=0A=
if ( green !=3D=3D undefined ) {=0A=
red =3D [ red, green, blue, alpha ];=0A=
type =3D "array";=0A=
}=0A=
=0A=
if ( type =3D=3D=3D "string" ) {=0A=
return this.parse( stringParse( red ) || colors._default );=0A=
}=0A=
=0A=
if ( type =3D=3D=3D "array" ) {=0A=
each( spaces.rgba.props, function( key, prop ) {=0A=
rgba[ prop.idx ] =3D clamp( red[ prop.idx ], prop );=0A=
});=0A=
return this;=0A=
}=0A=
=0A=
if ( type =3D=3D=3D "object" ) {=0A=
if ( red instanceof color ) {=0A=
each( spaces, function( spaceName, space ) {=0A=
if ( red[ space.cache ] ) {=0A=
inst[ space.cache ] =3D red[ space.cache ].slice();=0A=
}=0A=
});=0A=
} else {=0A=
each( spaces, function( spaceName, space ) {=0A=
var cache =3D space.cache;=0A=
each( space.props, function( key, prop ) {=0A=
=0A=
// if the cache doesn't exist, and we know how to convert=0A=
if ( !inst[ cache ] && space.to ) {=0A=
=0A=
// if the value was null, we don't need to copy it=0A=
// if the key was alpha, we don't need to copy it either=0A=
if ( key =3D=3D=3D "alpha" || red[ key ] =3D=3D null ) {=0A=
return;=0A=
}=0A=
inst[ cache ] =3D space.to( inst._rgba );=0A=
}=0A=
=0A=
// this is the only case where we allow nulls for ALL properties.=0A=
// call clamp with alwaysAllowEmpty=0A=
inst[ cache ][ prop.idx ] =3D clamp( red[ key ], prop, true );=0A=
});=0A=
=0A=
// everything defined but alpha?=0A=
if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, =
3 ) ) < 0 ) {=0A=
// use the default of 1=0A=
inst[ cache ][ 3 ] =3D 1;=0A=
if ( space.from ) {=0A=
inst._rgba =3D space.from( inst[ cache ] );=0A=
}=0A=
}=0A=
});=0A=
}=0A=
return this;=0A=
}=0A=
},=0A=
is: function( compare ) {=0A=
var is =3D color( compare ),=0A=
same =3D true,=0A=
inst =3D this;=0A=
=0A=
each( spaces, function( _, space ) {=0A=
var localCache,=0A=
isCache =3D is[ space.cache ];=0A=
if (isCache) {=0A=
localCache =3D inst[ space.cache ] || space.to && space.to( =
inst._rgba ) || [];=0A=
each( space.props, function( _, prop ) {=0A=
if ( isCache[ prop.idx ] !=3D null ) {=0A=
same =3D ( isCache[ prop.idx ] =3D=3D=3D localCache[ prop.idx ] );=0A=
return same;=0A=
}=0A=
});=0A=
}=0A=
return same;=0A=
});=0A=
return same;=0A=
},=0A=
_space: function() {=0A=
var used =3D [],=0A=
inst =3D this;=0A=
each( spaces, function( spaceName, space ) {=0A=
if ( inst[ space.cache ] ) {=0A=
used.push( spaceName );=0A=
}=0A=
});=0A=
return used.pop();=0A=
},=0A=
transition: function( other, distance ) {=0A=
var end =3D color( other ),=0A=
spaceName =3D end._space(),=0A=
space =3D spaces[ spaceName ],=0A=
startColor =3D this.alpha() =3D=3D=3D 0 ? color( "transparent" ) : =
this,=0A=
start =3D startColor[ space.cache ] || space.to( startColor._rgba ),=0A=
result =3D start.slice();=0A=
=0A=
end =3D end[ space.cache ];=0A=
each( space.props, function( key, prop ) {=0A=
var index =3D prop.idx,=0A=
startValue =3D start[ index ],=0A=
endValue =3D end[ index ],=0A=
type =3D propTypes[ prop.type ] || {};=0A=
=0A=
// if null, don't override start value=0A=
if ( endValue =3D=3D=3D null ) {=0A=
return;=0A=
}=0A=
// if null - use end=0A=
if ( startValue =3D=3D=3D null ) {=0A=
result[ index ] =3D endValue;=0A=
} else {=0A=
if ( type.mod ) {=0A=
if ( endValue - startValue > type.mod / 2 ) {=0A=
startValue +=3D type.mod;=0A=
} else if ( startValue - endValue > type.mod / 2 ) {=0A=
startValue -=3D type.mod;=0A=
}=0A=
}=0A=
result[ index ] =3D clamp( ( endValue - startValue ) * distance + =
startValue, prop );=0A=
}=0A=
});=0A=
return this[ spaceName ]( result );=0A=
},=0A=
blend: function( opaque ) {=0A=
// if we are already opaque - return ourself=0A=
if ( this._rgba[ 3 ] =3D=3D=3D 1 ) {=0A=
return this;=0A=
}=0A=
=0A=
var rgb =3D this._rgba.slice(),=0A=
a =3D rgb.pop(),=0A=
blend =3D color( opaque )._rgba;=0A=
=0A=
return color( jQuery.map( rgb, function( v, i ) {=0A=
return ( 1 - a ) * blend[ i ] + a * v;=0A=
}));=0A=
},=0A=
toRgbaString: function() {=0A=
var prefix =3D "rgba(",=0A=
rgba =3D jQuery.map( this._rgba, function( v, i ) {=0A=
return v =3D=3D null ? ( i > 2 ? 1 : 0 ) : v;=0A=
});=0A=
=0A=
if ( rgba[ 3 ] =3D=3D=3D 1 ) {=0A=
rgba.pop();=0A=
prefix =3D "rgb(";=0A=
}=0A=
=0A=
return prefix + rgba.join() + ")";=0A=
},=0A=
toHslaString: function() {=0A=
var prefix =3D "hsla(",=0A=
hsla =3D jQuery.map( this.hsla(), function( v, i ) {=0A=
if ( v =3D=3D null ) {=0A=
v =3D i > 2 ? 1 : 0;=0A=
}=0A=
=0A=
// catch 1 and 2=0A=
if ( i && i < 3 ) {=0A=
v =3D Math.round( v * 100 ) + "%";=0A=
}=0A=
return v;=0A=
});=0A=
=0A=
if ( hsla[ 3 ] =3D=3D=3D 1 ) {=0A=
hsla.pop();=0A=
prefix =3D "hsl(";=0A=
}=0A=
return prefix + hsla.join() + ")";=0A=
},=0A=
toHexString: function( includeAlpha ) {=0A=
var rgba =3D this._rgba.slice(),=0A=
alpha =3D rgba.pop();=0A=
=0A=
if ( includeAlpha ) {=0A=
rgba.push( ~~( alpha * 255 ) );=0A=
}=0A=
=0A=
return "#" + jQuery.map( rgba, function( v ) {=0A=
=0A=
// default to 0 when nulls exist=0A=
v =3D ( v || 0 ).toString( 16 );=0A=
return v.length =3D=3D=3D 1 ? "0" + v : v;=0A=
}).join("");=0A=
},=0A=
toString: function() {=0A=
return this._rgba[ 3 ] =3D=3D=3D 0 ? "transparent" : =
this.toRgbaString();=0A=
}=0A=
});=0A=
color.fn.parse.prototype =3D color.fn;=0A=
=0A=
// hsla conversions adapted from:=0A=
// =
https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk=
/src/graphics/colors/HUE2RGB.as?r=3D5021=0A=
=0A=
function hue2rgb( p, q, h ) {=0A=
h =3D ( h + 1 ) % 1;=0A=
if ( h * 6 < 1 ) {=0A=
return p + (q - p) * h * 6;=0A=
}=0A=
if ( h * 2 < 1) {=0A=
return q;=0A=
}=0A=
if ( h * 3 < 2 ) {=0A=
return p + (q - p) * ((2/3) - h) * 6;=0A=
}=0A=
return p;=0A=
}=0A=
=0A=
spaces.hsla.to =3D function ( rgba ) {=0A=
if ( rgba[ 0 ] =3D=3D null || rgba[ 1 ] =3D=3D null || rgba[ 2 ] =3D=3D =
null ) {=0A=
return [ null, null, null, rgba[ 3 ] ];=0A=
}=0A=
var r =3D rgba[ 0 ] / 255,=0A=
g =3D rgba[ 1 ] / 255,=0A=
b =3D rgba[ 2 ] / 255,=0A=
a =3D rgba[ 3 ],=0A=
max =3D Math.max( r, g, b ),=0A=
min =3D Math.min( r, g, b ),=0A=
diff =3D max - min,=0A=
add =3D max + min,=0A=
l =3D add * 0.5,=0A=
h, s;=0A=
=0A=
if ( min =3D=3D=3D max ) {=0A=
h =3D 0;=0A=
} else if ( r =3D=3D=3D max ) {=0A=
h =3D ( 60 * ( g - b ) / diff ) + 360;=0A=
} else if ( g =3D=3D=3D max ) {=0A=
h =3D ( 60 * ( b - r ) / diff ) + 120;=0A=
} else {=0A=
h =3D ( 60 * ( r - g ) / diff ) + 240;=0A=
}=0A=
=0A=
// chroma (diff) =3D=3D 0 means greyscale which, by definition, =
saturation =3D 0%=0A=
// otherwise, saturation is based on the ratio of chroma (diff) to =
lightness (add)=0A=
if ( diff =3D=3D=3D 0 ) {=0A=
s =3D 0;=0A=
} else if ( l <=3D 0.5 ) {=0A=
s =3D diff / add;=0A=
} else {=0A=
s =3D diff / ( 2 - add );=0A=
}=0A=
return [ Math.round(h) % 360, s, l, a =3D=3D null ? 1 : a ];=0A=
};=0A=
=0A=
spaces.hsla.from =3D function ( hsla ) {=0A=
if ( hsla[ 0 ] =3D=3D null || hsla[ 1 ] =3D=3D null || hsla[ 2 ] =3D=3D =
null ) {=0A=
return [ null, null, null, hsla[ 3 ] ];=0A=
}=0A=
var h =3D hsla[ 0 ] / 360,=0A=
s =3D hsla[ 1 ],=0A=
l =3D hsla[ 2 ],=0A=
a =3D hsla[ 3 ],=0A=
q =3D l <=3D 0.5 ? l * ( 1 + s ) : l + s - l * s,=0A=
p =3D 2 * l - q;=0A=
=0A=
return [=0A=
Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),=0A=
Math.round( hue2rgb( p, q, h ) * 255 ),=0A=
Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),=0A=
a=0A=
];=0A=
};=0A=
=0A=
=0A=
each( spaces, function( spaceName, space ) {=0A=
var props =3D space.props,=0A=
cache =3D space.cache,=0A=
to =3D space.to,=0A=
from =3D space.from;=0A=
=0A=
// makes rgba() and hsla()=0A=
color.fn[ spaceName ] =3D function( value ) {=0A=
=0A=
// generate a cache for this space if it doesn't exist=0A=
if ( to && !this[ cache ] ) {=0A=
this[ cache ] =3D to( this._rgba );=0A=
}=0A=
if ( value =3D=3D=3D undefined ) {=0A=
return this[ cache ].slice();=0A=
}=0A=
=0A=
var ret,=0A=
type =3D jQuery.type( value ),=0A=
arr =3D ( type =3D=3D=3D "array" || type =3D=3D=3D "object" ) ? value =
: arguments,=0A=
local =3D this[ cache ].slice();=0A=
=0A=
each( props, function( key, prop ) {=0A=
var val =3D arr[ type =3D=3D=3D "object" ? key : prop.idx ];=0A=
if ( val =3D=3D null ) {=0A=
val =3D local[ prop.idx ];=0A=
}=0A=
local[ prop.idx ] =3D clamp( val, prop );=0A=
});=0A=
=0A=
if ( from ) {=0A=
ret =3D color( from( local ) );=0A=
ret[ cache ] =3D local;=0A=
return ret;=0A=
} else {=0A=
return color( local );=0A=
}=0A=
};=0A=
=0A=
// makes red() green() blue() alpha() hue() saturation() lightness()=0A=
each( props, function( key, prop ) {=0A=
// alpha is included in more than one space=0A=
if ( color.fn[ key ] ) {=0A=
return;=0A=
}=0A=
color.fn[ key ] =3D function( value ) {=0A=
var vtype =3D jQuery.type( value ),=0A=
fn =3D ( key =3D=3D=3D "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : =
spaceName ),=0A=
local =3D this[ fn ](),=0A=
cur =3D local[ prop.idx ],=0A=
match;=0A=
=0A=
if ( vtype =3D=3D=3D "undefined" ) {=0A=
return cur;=0A=
}=0A=
=0A=
if ( vtype =3D=3D=3D "function" ) {=0A=
value =3D value.call( this, cur );=0A=
vtype =3D jQuery.type( value );=0A=
}=0A=
if ( value =3D=3D null && prop.empty ) {=0A=
return this;=0A=
}=0A=
if ( vtype =3D=3D=3D "string" ) {=0A=
match =3D rplusequals.exec( value );=0A=
if ( match ) {=0A=
value =3D cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] =3D=3D=3D =
"+" ? 1 : -1 );=0A=
}=0A=
}=0A=
local[ prop.idx ] =3D value;=0A=
return this[ fn ]( local );=0A=
};=0A=
});=0A=
});=0A=
=0A=
// add cssHook and .fx.step function for each named hook.=0A=
// accept a space separated string of properties=0A=
color.hook =3D function( hook ) {=0A=
var hooks =3D hook.split( " " );=0A=
each( hooks, function( i, hook ) {=0A=
jQuery.cssHooks[ hook ] =3D {=0A=
set: function( elem, value ) {=0A=
var parsed, curElem,=0A=
backgroundColor =3D "";=0A=
=0A=
if ( value !=3D=3D "transparent" && ( jQuery.type( value ) !=3D=3D =
"string" || ( parsed =3D stringParse( value ) ) ) ) {=0A=
value =3D color( parsed || value );=0A=
if ( !support.rgba && value._rgba[ 3 ] !=3D=3D 1 ) {=0A=
curElem =3D hook =3D=3D=3D "backgroundColor" ? elem.parentNode : =
elem;=0A=
while (=0A=
(backgroundColor =3D=3D=3D "" || backgroundColor =3D=3D=3D =
"transparent") &&=0A=
curElem && curElem.style=0A=
) {=0A=
try {=0A=
backgroundColor =3D jQuery.css( curElem, "backgroundColor" );=0A=
curElem =3D curElem.parentNode;=0A=
} catch ( e ) {=0A=
}=0A=
}=0A=
=0A=
value =3D value.blend( backgroundColor && backgroundColor !=3D=3D =
"transparent" ?=0A=
backgroundColor :=0A=
"_default" );=0A=
}=0A=
=0A=
value =3D value.toRgbaString();=0A=
}=0A=
try {=0A=
elem.style[ hook ] =3D value;=0A=
} catch( e ) {=0A=
// wrapped to prevent IE from throwing errors on "invalid" values =
like 'auto' or 'inherit'=0A=
}=0A=
}=0A=
};=0A=
jQuery.fx.step[ hook ] =3D function( fx ) {=0A=
if ( !fx.colorInit ) {=0A=
fx.start =3D color( fx.elem, hook );=0A=
fx.end =3D color( fx.end );=0A=
fx.colorInit =3D true;=0A=
}=0A=
jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, =
fx.pos ) );=0A=
};=0A=
});=0A=
=0A=
};=0A=
=0A=
color.hook( stepHooks );=0A=
=0A=
jQuery.cssHooks.borderColor =3D {=0A=
expand: function( value ) {=0A=
var expanded =3D {};=0A=
=0A=
each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {=0A=
expanded[ "border" + part + "Color" ] =3D value;=0A=
});=0A=
return expanded;=0A=
}=0A=
};=0A=
=0A=
// Basic color names only.=0A=
// Usage of any of the other color names requires adding yourself or =
including=0A=
// jquery.color.svg-names.js.=0A=
colors =3D jQuery.Color.names =3D {=0A=
// 4.1. Basic color keywords=0A=
aqua: "#00ffff",=0A=
black: "#000000",=0A=
blue: "#0000ff",=0A=
fuchsia: "#ff00ff",=0A=
gray: "#808080",=0A=
green: "#008000",=0A=
lime: "#00ff00",=0A=
maroon: "#800000",=0A=
navy: "#000080",=0A=
olive: "#808000",=0A=
purple: "#800080",=0A=
red: "#ff0000",=0A=
silver: "#c0c0c0",=0A=
teal: "#008080",=0A=
white: "#ffffff",=0A=
yellow: "#ffff00",=0A=
=0A=
// 4.2.3. "transparent" color keyword=0A=
transparent: [ null, null, null, 0 ],=0A=
=0A=
_default: "#ffffff"=0A=
};=0A=
=0A=
})( jQuery );=0A=
=0A=
=0A=
/************************************************************************=
******/=0A=
/****************************** CLASS ANIMATIONS =
******************************/=0A=
/************************************************************************=
******/=0A=
(function() {=0A=
=0A=
var classAnimationActions =3D [ "add", "remove", "toggle" ],=0A=
shorthandStyles =3D {=0A=
border: 1,=0A=
borderBottom: 1,=0A=
borderColor: 1,=0A=
borderLeft: 1,=0A=
borderRight: 1,=0A=
borderTop: 1,=0A=
borderWidth: 1,=0A=
margin: 1,=0A=
padding: 1=0A=
};=0A=
=0A=
$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", =
"borderTopStyle" ], function( _, prop ) {=0A=
$.fx.step[ prop ] =3D function( fx ) {=0A=
if ( fx.end !=3D=3D "none" && !fx.setAttr || fx.pos =3D=3D=3D 1 && =
!fx.setAttr ) {=0A=
jQuery.style( fx.elem, prop, fx.end );=0A=
fx.setAttr =3D true;=0A=
}=0A=
};=0A=
});=0A=
=0A=
function getElementStyles( elem ) {=0A=
var key, len,=0A=
style =3D elem.ownerDocument.defaultView ?=0A=
elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :=0A=
elem.currentStyle,=0A=
styles =3D {};=0A=
=0A=
if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {=0A=
len =3D style.length;=0A=
while ( len-- ) {=0A=
key =3D style[ len ];=0A=
if ( typeof style[ key ] =3D=3D=3D "string" ) {=0A=
styles[ $.camelCase( key ) ] =3D style[ key ];=0A=
}=0A=
}=0A=
// support: Opera, IE <9=0A=
} else {=0A=
for ( key in style ) {=0A=
if ( typeof style[ key ] =3D=3D=3D "string" ) {=0A=
styles[ key ] =3D style[ key ];=0A=
}=0A=
}=0A=
}=0A=
=0A=
return styles;=0A=
}=0A=
=0A=
=0A=
function styleDifference( oldStyle, newStyle ) {=0A=
var diff =3D {},=0A=
name, value;=0A=
=0A=
for ( name in newStyle ) {=0A=
value =3D newStyle[ name ];=0A=
if ( oldStyle[ name ] !=3D=3D value ) {=0A=
if ( !shorthandStyles[ name ] ) {=0A=
if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {=0A=
diff[ name ] =3D value;=0A=
}=0A=
}=0A=
}=0A=
}=0A=
=0A=
return diff;=0A=
}=0A=
=0A=
// support: jQuery <1.8=0A=
if ( !$.fn.addBack ) {=0A=
$.fn.addBack =3D function( selector ) {=0A=
return this.add( selector =3D=3D null ?=0A=
this.prevObject : this.prevObject.filter( selector )=0A=
);=0A=
};=0A=
}=0A=
=0A=
$.effects.animateClass =3D function( value, duration, easing, callback ) =
{=0A=
var o =3D $.speed( duration, easing, callback );=0A=
=0A=
return this.queue( function() {=0A=
var animated =3D $( this ),=0A=
baseClass =3D animated.attr( "class" ) || "",=0A=
applyClassChange,=0A=
allAnimations =3D o.children ? animated.find( "*" ).addBack() : =
animated;=0A=
=0A=
// map the animated objects to store the original styles.=0A=
allAnimations =3D allAnimations.map(function() {=0A=
var el =3D $( this );=0A=
return {=0A=
el: el,=0A=
start: getElementStyles( this )=0A=
};=0A=
});=0A=
=0A=
// apply class change=0A=
applyClassChange =3D function() {=0A=
$.each( classAnimationActions, function(i, action) {=0A=
if ( value[ action ] ) {=0A=
animated[ action + "Class" ]( value[ action ] );=0A=
}=0A=
});=0A=
};=0A=
applyClassChange();=0A=
=0A=
// map all animated objects again - calculate new styles and diff=0A=
allAnimations =3D allAnimations.map(function() {=0A=
this.end =3D getElementStyles( this.el[ 0 ] );=0A=
this.diff =3D styleDifference( this.start, this.end );=0A=
return this;=0A=
});=0A=
=0A=
// apply original class=0A=
animated.attr( "class", baseClass );=0A=
=0A=
// map all animated objects again - this time collecting a promise=0A=
allAnimations =3D allAnimations.map(function() {=0A=
var styleInfo =3D this,=0A=
dfd =3D $.Deferred(),=0A=
opts =3D $.extend({}, o, {=0A=
queue: false,=0A=
complete: function() {=0A=
dfd.resolve( styleInfo );=0A=
}=0A=
});=0A=
=0A=
this.el.animate( this.diff, opts );=0A=
return dfd.promise();=0A=
});=0A=
=0A=
// once all animations have completed:=0A=
$.when.apply( $, allAnimations.get() ).done(function() {=0A=
=0A=
// set the final class=0A=
applyClassChange();=0A=
=0A=
// for each animated element,=0A=
// clear all css properties that were animated=0A=
$.each( arguments, function() {=0A=
var el =3D this.el;=0A=
$.each( this.diff, function(key) {=0A=
el.css( key, "" );=0A=
});=0A=
});=0A=
=0A=
// this is guarnteed to be there if you use jQuery.speed()=0A=
// it also handles dequeuing the next anim...=0A=
o.complete.call( animated[ 0 ] );=0A=
});=0A=
});=0A=
};=0A=
=0A=
$.fn.extend({=0A=
addClass: (function( orig ) {=0A=
return function( classNames, speed, easing, callback ) {=0A=
return speed ?=0A=
$.effects.animateClass.call( this,=0A=
{ add: classNames }, speed, easing, callback ) :=0A=
orig.apply( this, arguments );=0A=
};=0A=
})( $.fn.addClass ),=0A=
=0A=
removeClass: (function( orig ) {=0A=
return function( classNames, speed, easing, callback ) {=0A=
return arguments.length > 1 ?=0A=
$.effects.animateClass.call( this,=0A=
{ remove: classNames }, speed, easing, callback ) :=0A=
orig.apply( this, arguments );=0A=
};=0A=
})( $.fn.removeClass ),=0A=
=0A=
toggleClass: (function( orig ) {=0A=
return function( classNames, force, speed, easing, callback ) {=0A=
if ( typeof force =3D=3D=3D "boolean" || force =3D=3D=3D undefined ) {=0A=
if ( !speed ) {=0A=
// without speed parameter=0A=
return orig.apply( this, arguments );=0A=
} else {=0A=
return $.effects.animateClass.call( this,=0A=
(force ? { add: classNames } : { remove: classNames }),=0A=
speed, easing, callback );=0A=
}=0A=
} else {=0A=
// without force parameter=0A=
return $.effects.animateClass.call( this,=0A=
{ toggle: classNames }, force, speed, easing );=0A=
}=0A=
};=0A=
})( $.fn.toggleClass ),=0A=
=0A=
switchClass: function( remove, add, speed, easing, callback) {=0A=
return $.effects.animateClass.call( this, {=0A=
add: add,=0A=
remove: remove=0A=
}, speed, easing, callback );=0A=
}=0A=
});=0A=
=0A=
})();=0A=
=0A=
/************************************************************************=
******/=0A=
/*********************************** EFFECTS =
**********************************/=0A=
/************************************************************************=
******/=0A=
=0A=
(function() {=0A=
=0A=
$.extend( $.effects, {=0A=
version: "1.10.4",=0A=
=0A=
// Saves a set of properties in a data storage=0A=
save: function( element, set ) {=0A=
for( var i=3D0; i < set.length; i++ ) {=0A=
if ( set[ i ] !=3D=3D null ) {=0A=
element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );=0A=
}=0A=
}=0A=
},=0A=
=0A=
// Restores a set of previously saved properties from a data storage=0A=
restore: function( element, set ) {=0A=
var val, i;=0A=
for( i=3D0; i < set.length; i++ ) {=0A=
if ( set[ i ] !=3D=3D null ) {=0A=
val =3D element.data( dataSpace + set[ i ] );=0A=
// support: jQuery 1.6.2=0A=
// http://bugs.jquery.com/ticket/9917=0A=
// jQuery 1.6.2 incorrectly returns undefined for any falsy value.=0A=
// We can't differentiate between "" and 0 here, so we just assume=0A=
// empty string since it's likely to be a more common value...=0A=
if ( val =3D=3D=3D undefined ) {=0A=
val =3D "";=0A=
}=0A=
element.css( set[ i ], val );=0A=
}=0A=
}=0A=
},=0A=
=0A=
setMode: function( el, mode ) {=0A=
if (mode =3D=3D=3D "toggle") {=0A=
mode =3D el.is( ":hidden" ) ? "show" : "hide";=0A=
}=0A=
return mode;=0A=
},=0A=
=0A=
// Translates a [top,left] array into a baseline value=0A=
// this should be a little more flexible in the future to handle a =
string & hash=0A=
getBaseline: function( origin, original ) {=0A=
var y, x;=0A=
switch ( origin[ 0 ] ) {=0A=
case "top": y =3D 0; break;=0A=
case "middle": y =3D 0.5; break;=0A=
case "bottom": y =3D 1; break;=0A=
default: y =3D origin[ 0 ] / original.height;=0A=
}=0A=
switch ( origin[ 1 ] ) {=0A=
case "left": x =3D 0; break;=0A=
case "center": x =3D 0.5; break;=0A=
case "right": x =3D 1; break;=0A=
default: x =3D origin[ 1 ] / original.width;=0A=
}=0A=
return {=0A=
x: x,=0A=
y: y=0A=
};=0A=
},=0A=
=0A=
// Wraps the element around a wrapper that copies position properties=0A=
createWrapper: function( element ) {=0A=
=0A=
// if the element is already wrapped, return it=0A=
if ( element.parent().is( ".ui-effects-wrapper" )) {=0A=
return element.parent();=0A=
}=0A=
=0A=
// wrap the element=0A=
var props =3D {=0A=
width: element.outerWidth(true),=0A=
height: element.outerHeight(true),=0A=
"float": element.css( "float" )=0A=
},=0A=
wrapper =3D $( "
" )=0A=
.addClass( "ui-effects-wrapper" )=0A=
.css({=0A=
fontSize: "100%",=0A=
background: "transparent",=0A=
border: "none",=0A=
margin: 0,=0A=
padding: 0=0A=
}),=0A=
// Store the size in case width/height are defined in % - Fixes #5245=0A=
size =3D {=0A=
width: element.width(),=0A=
height: element.height()=0A=
},=0A=
active =3D document.activeElement;=0A=
=0A=
// support: Firefox=0A=
// Firefox incorrectly exposes anonymous content=0A=
// https://bugzilla.mozilla.org/show_bug.cgi?id=3D561664=0A=
try {=0A=
active.id;=0A=
} catch( e ) {=0A=
active =3D document.body;=0A=
}=0A=
=0A=
element.wrap( wrapper );=0A=
=0A=
// Fixes #7595 - Elements lose focus when wrapped.=0A=
if ( element[ 0 ] =3D=3D=3D active || $.contains( element[ 0 ], active =
) ) {=0A=
$( active ).focus();=0A=
}=0A=
=0A=
wrapper =3D element.parent(); //Hotfix for jQuery 1.4 since some =
change in wrap() seems to actually lose the reference to the wrapped =
element=0A=
=0A=
// transfer positioning properties to the wrapper=0A=
if ( element.css( "position" ) =3D=3D=3D "static" ) {=0A=
wrapper.css({ position: "relative" });=0A=
element.css({ position: "relative" });=0A=
} else {=0A=
$.extend( props, {=0A=
position: element.css( "position" ),=0A=
zIndex: element.css( "z-index" )=0A=
});=0A=
$.each([ "top", "left", "bottom", "right" ], function(i, pos) {=0A=
props[ pos ] =3D element.css( pos );=0A=
if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {=0A=
props[ pos ] =3D "auto";=0A=
}=0A=
});=0A=
element.css({=0A=
position: "relative",=0A=
top: 0,=0A=
left: 0,=0A=
right: "auto",=0A=
bottom: "auto"=0A=
});=0A=
}=0A=
element.css(size);=0A=
=0A=
return wrapper.css( props ).show();=0A=
},=0A=
=0A=
removeWrapper: function( element ) {=0A=
var active =3D document.activeElement;=0A=
=0A=
if ( element.parent().is( ".ui-effects-wrapper" ) ) {=0A=
element.parent().replaceWith( element );=0A=
=0A=
// Fixes #7595 - Elements lose focus when wrapped.=0A=
if ( element[ 0 ] =3D=3D=3D active || $.contains( element[ 0 ], =
active ) ) {=0A=
$( active ).focus();=0A=
}=0A=
}=0A=
=0A=
=0A=
return element;=0A=
},=0A=
=0A=
setTransition: function( element, list, factor, value ) {=0A=
value =3D value || {};=0A=
$.each( list, function( i, x ) {=0A=
var unit =3D element.cssUnit( x );=0A=
if ( unit[ 0 ] > 0 ) {=0A=
value[ x ] =3D unit[ 0 ] * factor + unit[ 1 ];=0A=
}=0A=
});=0A=
return value;=0A=
}=0A=
});=0A=
=0A=
// return an effect options object for the given parameters:=0A=
function _normalizeArguments( effect, options, speed, callback ) {=0A=
=0A=
// allow passing all options as the first parameter=0A=
if ( $.isPlainObject( effect ) ) {=0A=
options =3D effect;=0A=
effect =3D effect.effect;=0A=
}=0A=
=0A=
// convert to an object=0A=
effect =3D { effect: effect };=0A=
=0A=
// catch (effect, null, ...)=0A=
if ( options =3D=3D null ) {=0A=
options =3D {};=0A=
}=0A=
=0A=
// catch (effect, callback)=0A=
if ( $.isFunction( options ) ) {=0A=
callback =3D options;=0A=
speed =3D null;=0A=
options =3D {};=0A=
}=0A=
=0A=
// catch (effect, speed, ?)=0A=
if ( typeof options =3D=3D=3D "number" || $.fx.speeds[ options ] ) {=0A=
callback =3D speed;=0A=
speed =3D options;=0A=
options =3D {};=0A=
}=0A=
=0A=
// catch (effect, options, callback)=0A=
if ( $.isFunction( speed ) ) {=0A=
callback =3D speed;=0A=
speed =3D null;=0A=
}=0A=
=0A=
// add options to effect=0A=
if ( options ) {=0A=
$.extend( effect, options );=0A=
}=0A=
=0A=
speed =3D speed || options.duration;=0A=
effect.duration =3D $.fx.off ? 0 :=0A=
typeof speed =3D=3D=3D "number" ? speed :=0A=
speed in $.fx.speeds ? $.fx.speeds[ speed ] :=0A=
$.fx.speeds._default;=0A=
=0A=
effect.complete =3D callback || options.complete;=0A=
=0A=
return effect;=0A=
}=0A=
=0A=
function standardAnimationOption( option ) {=0A=
// Valid standard speeds (nothing, number, named speed)=0A=
if ( !option || typeof option =3D=3D=3D "number" || $.fx.speeds[ option =
] ) {=0A=
return true;=0A=
}=0A=
=0A=
// Invalid strings - treat as "normal" speed=0A=
if ( typeof option =3D=3D=3D "string" && !$.effects.effect[ option ] ) {=0A=
return true;=0A=
}=0A=
=0A=
// Complete callback=0A=
if ( $.isFunction( option ) ) {=0A=
return true;=0A=
}=0A=
=0A=
// Options hash (but not naming an effect)=0A=
if ( typeof option =3D=3D=3D "object" && !option.effect ) {=0A=
return true;=0A=
}=0A=
=0A=
// Didn't match any standard API=0A=
return false;=0A=
}=0A=
=0A=
$.fn.extend({=0A=
effect: function( /* effect, options, speed, callback */ ) {=0A=
var args =3D _normalizeArguments.apply( this, arguments ),=0A=
mode =3D args.mode,=0A=
queue =3D args.queue,=0A=
effectMethod =3D $.effects.effect[ args.effect ];=0A=
=0A=
if ( $.fx.off || !effectMethod ) {=0A=
// delegate to the original method (e.g., .show()) if possible=0A=
if ( mode ) {=0A=
return this[ mode ]( args.duration, args.complete );=0A=
} else {=0A=
return this.each( function() {=0A=
if ( args.complete ) {=0A=
args.complete.call( this );=0A=
}=0A=
});=0A=
}=0A=
}=0A=
=0A=
function run( next ) {=0A=
var elem =3D $( this ),=0A=
complete =3D args.complete,=0A=
mode =3D args.mode;=0A=
=0A=
function done() {=0A=
if ( $.isFunction( complete ) ) {=0A=
complete.call( elem[0] );=0A=
}=0A=
if ( $.isFunction( next ) ) {=0A=
next();=0A=
}=0A=
}=0A=
=0A=
// If the element already has the correct final state, delegate to=0A=
// the core methods so the internal tracking of "olddisplay" works.=0A=
if ( elem.is( ":hidden" ) ? mode =3D=3D=3D "hide" : mode =3D=3D=3D =
"show" ) {=0A=
elem[ mode ]();=0A=
done();=0A=
} else {=0A=
effectMethod.call( elem[0], args, done );=0A=
}=0A=
}=0A=
=0A=
return queue =3D=3D=3D false ? this.each( run ) : this.queue( queue || =
"fx", run );=0A=
},=0A=
=0A=
show: (function( orig ) {=0A=
return function( option ) {=0A=
if ( standardAnimationOption( option ) ) {=0A=
return orig.apply( this, arguments );=0A=
} else {=0A=
var args =3D _normalizeArguments.apply( this, arguments );=0A=
args.mode =3D "show";=0A=
return this.effect.call( this, args );=0A=
}=0A=
};=0A=
})( $.fn.show ),=0A=
=0A=
hide: (function( orig ) {=0A=
return function( option ) {=0A=
if ( standardAnimationOption( option ) ) {=0A=
return orig.apply( this, arguments );=0A=
} else {=0A=
var args =3D _normalizeArguments.apply( this, arguments );=0A=
args.mode =3D "hide";=0A=
return this.effect.call( this, args );=0A=
}=0A=
};=0A=
})( $.fn.hide ),=0A=
=0A=
toggle: (function( orig ) {=0A=
return function( option ) {=0A=
if ( standardAnimationOption( option ) || typeof option =3D=3D=3D =
"boolean" ) {=0A=
return orig.apply( this, arguments );=0A=
} else {=0A=
var args =3D _normalizeArguments.apply( this, arguments );=0A=
args.mode =3D "toggle";=0A=
return this.effect.call( this, args );=0A=
}=0A=
};=0A=
})( $.fn.toggle ),=0A=
=0A=
// helper functions=0A=
cssUnit: function(key) {=0A=
var style =3D this.css( key ),=0A=
val =3D [];=0A=
=0A=
$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {=0A=
if ( style.indexOf( unit ) > 0 ) {=0A=
val =3D [ parseFloat( style ), unit ];=0A=
}=0A=
});=0A=
return val;=0A=
}=0A=
});=0A=
=0A=
})();=0A=
=0A=
/************************************************************************=
******/=0A=
/*********************************** EASING =
***********************************/=0A=
/************************************************************************=
******/=0A=
=0A=
(function() {=0A=
=0A=
// based on easing equations from Robert Penner =
(http://www.robertpenner.com/easing)=0A=
=0A=
var baseEasings =3D {};=0A=
=0A=
$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name =
) {=0A=
baseEasings[ name ] =3D function( p ) {=0A=
return Math.pow( p, i + 2 );=0A=
};=0A=
});=0A=
=0A=
$.extend( baseEasings, {=0A=
Sine: function ( p ) {=0A=
return 1 - Math.cos( p * Math.PI / 2 );=0A=
},=0A=
Circ: function ( p ) {=0A=
return 1 - Math.sqrt( 1 - p * p );=0A=
},=0A=
Elastic: function( p ) {=0A=
return p =3D=3D=3D 0 || p =3D=3D=3D 1 ? p :=0A=
-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * =
Math.PI / 15 );=0A=
},=0A=
Back: function( p ) {=0A=
return p * p * ( 3 * p - 2 );=0A=
},=0A=
Bounce: function ( p ) {=0A=
var pow2,=0A=
bounce =3D 4;=0A=
=0A=
while ( p < ( ( pow2 =3D Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}=0A=
return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - =
2 ) / 22 - p, 2 );=0A=
}=0A=
});=0A=
=0A=
$.each( baseEasings, function( name, easeIn ) {=0A=
$.easing[ "easeIn" + name ] =3D easeIn;=0A=
$.easing[ "easeOut" + name ] =3D function( p ) {=0A=
return 1 - easeIn( 1 - p );=0A=
};=0A=
$.easing[ "easeInOut" + name ] =3D function( p ) {=0A=
return p < 0.5 ?=0A=
easeIn( p * 2 ) / 2 :=0A=
1 - easeIn( p * -2 + 2 ) / 2;=0A=
};=0A=
});=0A=
=0A=
})();=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
var rvertical =3D /up|down|vertical/,=0A=
rpositivemotion =3D /up|left|vertical|horizontal/;=0A=
=0A=
$.effects.effect.blind =3D function( o, done ) {=0A=
// Create element=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "height", =
"width" ],=0A=
mode =3D $.effects.setMode( el, o.mode || "hide" ),=0A=
direction =3D o.direction || "up",=0A=
vertical =3D rvertical.test( direction ),=0A=
ref =3D vertical ? "height" : "width",=0A=
ref2 =3D vertical ? "top" : "left",=0A=
motion =3D rpositivemotion.test( direction ),=0A=
animation =3D {},=0A=
show =3D mode =3D=3D=3D "show",=0A=
wrapper, distance, margin;=0A=
=0A=
// if already wrapped, the wrapper's properties are my property. #6245=0A=
if ( el.parent().is( ".ui-effects-wrapper" ) ) {=0A=
$.effects.save( el.parent(), props );=0A=
} else {=0A=
$.effects.save( el, props );=0A=
}=0A=
el.show();=0A=
wrapper =3D $.effects.createWrapper( el ).css({=0A=
overflow: "hidden"=0A=
});=0A=
=0A=
distance =3D wrapper[ ref ]();=0A=
margin =3D parseFloat( wrapper.css( ref2 ) ) || 0;=0A=
=0A=
animation[ ref ] =3D show ? distance : 0;=0A=
if ( !motion ) {=0A=
el=0A=
.css( vertical ? "bottom" : "right", 0 )=0A=
.css( vertical ? "top" : "left", "auto" )=0A=
.css({ position: "absolute" });=0A=
=0A=
animation[ ref2 ] =3D show ? margin : distance + margin;=0A=
}=0A=
=0A=
// start at 0 if we are showing=0A=
if ( show ) {=0A=
wrapper.css( ref, 0 );=0A=
if ( ! motion ) {=0A=
wrapper.css( ref2, margin + distance );=0A=
}=0A=
}=0A=
=0A=
// Animate=0A=
wrapper.animate( animation, {=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
queue: false,=0A=
complete: function() {=0A=
if ( mode =3D=3D=3D "hide" ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
}=0A=
});=0A=
=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.bounce =3D function( o, done ) {=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "height", =
"width" ],=0A=
=0A=
// defaults:=0A=
mode =3D $.effects.setMode( el, o.mode || "effect" ),=0A=
hide =3D mode =3D=3D=3D "hide",=0A=
show =3D mode =3D=3D=3D "show",=0A=
direction =3D o.direction || "up",=0A=
distance =3D o.distance,=0A=
times =3D o.times || 5,=0A=
=0A=
// number of internal animations=0A=
anims =3D times * 2 + ( show || hide ? 1 : 0 ),=0A=
speed =3D o.duration / anims,=0A=
easing =3D o.easing,=0A=
=0A=
// utility:=0A=
ref =3D ( direction =3D=3D=3D "up" || direction =3D=3D=3D "down" ) ? =
"top" : "left",=0A=
motion =3D ( direction =3D=3D=3D "up" || direction =3D=3D=3D "left" ),=0A=
i,=0A=
upAnim,=0A=
downAnim,=0A=
=0A=
// we will need to re-assemble the queue to stack our animations in =
place=0A=
queue =3D el.queue(),=0A=
queuelen =3D queue.length;=0A=
=0A=
// Avoid touching opacity to prevent clearType and PNG issues in IE=0A=
if ( show || hide ) {=0A=
props.push( "opacity" );=0A=
}=0A=
=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
$.effects.createWrapper( el ); // Create Wrapper=0A=
=0A=
// default distance for the BIGGEST bounce is the outer Distance / 3=0A=
if ( !distance ) {=0A=
distance =3D el[ ref =3D=3D=3D "top" ? "outerHeight" : "outerWidth" =
]() / 3;=0A=
}=0A=
=0A=
if ( show ) {=0A=
downAnim =3D { opacity: 1 };=0A=
downAnim[ ref ] =3D 0;=0A=
=0A=
// if we are showing, force opacity 0 and set the initial position=0A=
// then do the "first" animation=0A=
el.css( "opacity", 0 )=0A=
.css( ref, motion ? -distance * 2 : distance * 2 )=0A=
.animate( downAnim, speed, easing );=0A=
}=0A=
=0A=
// start at the smallest distance if we are hiding=0A=
if ( hide ) {=0A=
distance =3D distance / Math.pow( 2, times - 1 );=0A=
}=0A=
=0A=
downAnim =3D {};=0A=
downAnim[ ref ] =3D 0;=0A=
// Bounces up/down/left/right then back to 0 -- times * 2 animations =
happen here=0A=
for ( i =3D 0; i < times; i++ ) {=0A=
upAnim =3D {};=0A=
upAnim[ ref ] =3D ( motion ? "-=3D" : "+=3D" ) + distance;=0A=
=0A=
el.animate( upAnim, speed, easing )=0A=
.animate( downAnim, speed, easing );=0A=
=0A=
distance =3D hide ? distance * 2 : distance / 2;=0A=
}=0A=
=0A=
// Last Bounce when Hiding=0A=
if ( hide ) {=0A=
upAnim =3D { opacity: 0 };=0A=
upAnim[ ref ] =3D ( motion ? "-=3D" : "+=3D" ) + distance;=0A=
=0A=
el.animate( upAnim, speed, easing );=0A=
}=0A=
=0A=
el.queue(function() {=0A=
if ( hide ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
});=0A=
=0A=
// inject all the animations we just queued to be first in line (after =
"inprogress")=0A=
if ( queuelen > 1) {=0A=
queue.splice.apply( queue,=0A=
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );=0A=
}=0A=
el.dequeue();=0A=
=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.clip =3D function( o, done ) {=0A=
// Create element=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "height", =
"width" ],=0A=
mode =3D $.effects.setMode( el, o.mode || "hide" ),=0A=
show =3D mode =3D=3D=3D "show",=0A=
direction =3D o.direction || "vertical",=0A=
vert =3D direction =3D=3D=3D "vertical",=0A=
size =3D vert ? "height" : "width",=0A=
position =3D vert ? "top" : "left",=0A=
animation =3D {},=0A=
wrapper, animate, distance;=0A=
=0A=
// Save & Show=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
=0A=
// Create Wrapper=0A=
wrapper =3D $.effects.createWrapper( el ).css({=0A=
overflow: "hidden"=0A=
});=0A=
animate =3D ( el[0].tagName =3D=3D=3D "IMG" ) ? wrapper : el;=0A=
distance =3D animate[ size ]();=0A=
=0A=
// Shift=0A=
if ( show ) {=0A=
animate.css( size, 0 );=0A=
animate.css( position, distance / 2 );=0A=
}=0A=
=0A=
// Create Animation Object:=0A=
animation[ size ] =3D show ? distance : 0;=0A=
animation[ position ] =3D show ? 0 : distance / 2;=0A=
=0A=
// Animate=0A=
animate.animate( animation, {=0A=
queue: false,=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
complete: function() {=0A=
if ( !show ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
}=0A=
});=0A=
=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.drop =3D function( o, done ) {=0A=
=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "opacity", =
"height", "width" ],=0A=
mode =3D $.effects.setMode( el, o.mode || "hide" ),=0A=
show =3D mode =3D=3D=3D "show",=0A=
direction =3D o.direction || "left",=0A=
ref =3D ( direction =3D=3D=3D "up" || direction =3D=3D=3D "down" ) ? =
"top" : "left",=0A=
motion =3D ( direction =3D=3D=3D "up" || direction =3D=3D=3D "left" ) =
? "pos" : "neg",=0A=
animation =3D {=0A=
opacity: show ? 1 : 0=0A=
},=0A=
distance;=0A=
=0A=
// Adjust=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
$.effects.createWrapper( el );=0A=
=0A=
distance =3D o.distance || el[ ref =3D=3D=3D "top" ? "outerHeight": =
"outerWidth" ]( true ) / 2;=0A=
=0A=
if ( show ) {=0A=
el=0A=
.css( "opacity", 0 )=0A=
.css( ref, motion =3D=3D=3D "pos" ? -distance : distance );=0A=
}=0A=
=0A=
// Animation=0A=
animation[ ref ] =3D ( show ?=0A=
( motion =3D=3D=3D "pos" ? "+=3D" : "-=3D" ) :=0A=
( motion =3D=3D=3D "pos" ? "-=3D" : "+=3D" ) ) +=0A=
distance;=0A=
=0A=
// Animate=0A=
el.animate( animation, {=0A=
queue: false,=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
complete: function() {=0A=
if ( mode =3D=3D=3D "hide" ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
}=0A=
});=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.explode =3D function( o, done ) {=0A=
=0A=
var rows =3D o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,=0A=
cells =3D rows,=0A=
el =3D $( this ),=0A=
mode =3D $.effects.setMode( el, o.mode || "hide" ),=0A=
show =3D mode =3D=3D=3D "show",=0A=
=0A=
// show and then visibility:hidden the element before calculating =
offset=0A=
offset =3D el.show().css( "visibility", "hidden" ).offset(),=0A=
=0A=
// width and height of a piece=0A=
width =3D Math.ceil( el.outerWidth() / cells ),=0A=
height =3D Math.ceil( el.outerHeight() / rows ),=0A=
pieces =3D [],=0A=
=0A=
// loop=0A=
i, j, left, top, mx, my;=0A=
=0A=
// children animate complete:=0A=
function childComplete() {=0A=
pieces.push( this );=0A=
if ( pieces.length =3D=3D=3D rows * cells ) {=0A=
animComplete();=0A=
}=0A=
}=0A=
=0A=
// clone the element for each row and cell.=0A=
for( i =3D 0; i < rows ; i++ ) { // =3D=3D=3D>=0A=
top =3D offset.top + i * height;=0A=
my =3D i - ( rows - 1 ) / 2 ;=0A=
=0A=
for( j =3D 0; j < cells ; j++ ) { // |||=0A=
left =3D offset.left + j * width;=0A=
mx =3D j - ( cells - 1 ) / 2 ;=0A=
=0A=
// Create a clone of the now hidden main element that will be =
absolute positioned=0A=
// within a wrapper div off the -left and -top equal to size of our =
pieces=0A=
el=0A=
.clone()=0A=
.appendTo( "body" )=0A=
.wrap( "
" )=0A=
.css({=0A=
position: "absolute",=0A=
visibility: "visible",=0A=
left: -j * width,=0A=
top: -i * height=0A=
})=0A=
=0A=
// select the wrapper - make it overflow: hidden and absolute =
positioned based on=0A=
// where the original was located +left and +top equal to the size of =
pieces=0A=
.parent()=0A=
.addClass( "ui-effects-explode" )=0A=
.css({=0A=
position: "absolute",=0A=
overflow: "hidden",=0A=
width: width,=0A=
height: height,=0A=
left: left + ( show ? mx * width : 0 ),=0A=
top: top + ( show ? my * height : 0 ),=0A=
opacity: show ? 0 : 1=0A=
}).animate({=0A=
left: left + ( show ? 0 : mx * width ),=0A=
top: top + ( show ? 0 : my * height ),=0A=
opacity: show ? 1 : 0=0A=
}, o.duration || 500, o.easing, childComplete );=0A=
}=0A=
}=0A=
=0A=
function animComplete() {=0A=
el.css({=0A=
visibility: "visible"=0A=
});=0A=
$( pieces ).remove();=0A=
if ( !show ) {=0A=
el.hide();=0A=
}=0A=
done();=0A=
}=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.fade =3D function( o, done ) {=0A=
var el =3D $( this ),=0A=
mode =3D $.effects.setMode( el, o.mode || "toggle" );=0A=
=0A=
el.animate({=0A=
opacity: mode=0A=
}, {=0A=
queue: false,=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
complete: done=0A=
});=0A=
};=0A=
=0A=
})( jQuery );=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.fold =3D function( o, done ) {=0A=
=0A=
// Create element=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "height", =
"width" ],=0A=
mode =3D $.effects.setMode( el, o.mode || "hide" ),=0A=
show =3D mode =3D=3D=3D "show",=0A=
hide =3D mode =3D=3D=3D "hide",=0A=
size =3D o.size || 15,=0A=
percent =3D /([0-9]+)%/.exec( size ),=0A=
horizFirst =3D !!o.horizFirst,=0A=
widthFirst =3D show !=3D=3D horizFirst,=0A=
ref =3D widthFirst ? [ "width", "height" ] : [ "height", "width" ],=0A=
duration =3D o.duration / 2,=0A=
wrapper, distance,=0A=
animation1 =3D {},=0A=
animation2 =3D {};=0A=
=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
=0A=
// Create Wrapper=0A=
wrapper =3D $.effects.createWrapper( el ).css({=0A=
overflow: "hidden"=0A=
});=0A=
distance =3D widthFirst ?=0A=
[ wrapper.width(), wrapper.height() ] :=0A=
[ wrapper.height(), wrapper.width() ];=0A=
=0A=
if ( percent ) {=0A=
size =3D parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];=0A=
}=0A=
if ( show ) {=0A=
wrapper.css( horizFirst ? {=0A=
height: 0,=0A=
width: size=0A=
} : {=0A=
height: size,=0A=
width: 0=0A=
});=0A=
}=0A=
=0A=
// Animation=0A=
animation1[ ref[ 0 ] ] =3D show ? distance[ 0 ] : size;=0A=
animation2[ ref[ 1 ] ] =3D show ? distance[ 1 ] : 0;=0A=
=0A=
// Animate=0A=
wrapper=0A=
.animate( animation1, duration, o.easing )=0A=
.animate( animation2, duration, o.easing, function() {=0A=
if ( hide ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
});=0A=
=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.highlight =3D function( o, done ) {=0A=
var elem =3D $( this ),=0A=
props =3D [ "backgroundImage", "backgroundColor", "opacity" ],=0A=
mode =3D $.effects.setMode( elem, o.mode || "show" ),=0A=
animation =3D {=0A=
backgroundColor: elem.css( "backgroundColor" )=0A=
};=0A=
=0A=
if (mode =3D=3D=3D "hide") {=0A=
animation.opacity =3D 0;=0A=
}=0A=
=0A=
$.effects.save( elem, props );=0A=
=0A=
elem=0A=
.show()=0A=
.css({=0A=
backgroundImage: "none",=0A=
backgroundColor: o.color || "#ffff99"=0A=
})=0A=
.animate( animation, {=0A=
queue: false,=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
complete: function() {=0A=
if ( mode =3D=3D=3D "hide" ) {=0A=
elem.hide();=0A=
}=0A=
$.effects.restore( elem, props );=0A=
done();=0A=
}=0A=
});=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.pulsate =3D function( o, done ) {=0A=
var elem =3D $( this ),=0A=
mode =3D $.effects.setMode( elem, o.mode || "show" ),=0A=
show =3D mode =3D=3D=3D "show",=0A=
hide =3D mode =3D=3D=3D "hide",=0A=
showhide =3D ( show || mode =3D=3D=3D "hide" ),=0A=
=0A=
// showing or hiding leaves of the "last" animation=0A=
anims =3D ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),=0A=
duration =3D o.duration / anims,=0A=
animateTo =3D 0,=0A=
queue =3D elem.queue(),=0A=
queuelen =3D queue.length,=0A=
i;=0A=
=0A=
if ( show || !elem.is(":visible")) {=0A=
elem.css( "opacity", 0 ).show();=0A=
animateTo =3D 1;=0A=
}=0A=
=0A=
// anims - 1 opacity "toggles"=0A=
for ( i =3D 1; i < anims; i++ ) {=0A=
elem.animate({=0A=
opacity: animateTo=0A=
}, duration, o.easing );=0A=
animateTo =3D 1 - animateTo;=0A=
}=0A=
=0A=
elem.animate({=0A=
opacity: animateTo=0A=
}, duration, o.easing);=0A=
=0A=
elem.queue(function() {=0A=
if ( hide ) {=0A=
elem.hide();=0A=
}=0A=
done();=0A=
});=0A=
=0A=
// We just queued up "anims" animations, we need to put them next in =
the queue=0A=
if ( queuelen > 1 ) {=0A=
queue.splice.apply( queue,=0A=
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );=0A=
}=0A=
elem.dequeue();=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.puff =3D function( o, done ) {=0A=
var elem =3D $( this ),=0A=
mode =3D $.effects.setMode( elem, o.mode || "hide" ),=0A=
hide =3D mode =3D=3D=3D "hide",=0A=
percent =3D parseInt( o.percent, 10 ) || 150,=0A=
factor =3D percent / 100,=0A=
original =3D {=0A=
height: elem.height(),=0A=
width: elem.width(),=0A=
outerHeight: elem.outerHeight(),=0A=
outerWidth: elem.outerWidth()=0A=
};=0A=
=0A=
$.extend( o, {=0A=
effect: "scale",=0A=
queue: false,=0A=
fade: true,=0A=
mode: mode,=0A=
complete: done,=0A=
percent: hide ? percent : 100,=0A=
from: hide ?=0A=
original :=0A=
{=0A=
height: original.height * factor,=0A=
width: original.width * factor,=0A=
outerHeight: original.outerHeight * factor,=0A=
outerWidth: original.outerWidth * factor=0A=
}=0A=
});=0A=
=0A=
elem.effect( o );=0A=
};=0A=
=0A=
$.effects.effect.scale =3D function( o, done ) {=0A=
=0A=
// Create element=0A=
var el =3D $( this ),=0A=
options =3D $.extend( true, {}, o ),=0A=
mode =3D $.effects.setMode( el, o.mode || "effect" ),=0A=
percent =3D parseInt( o.percent, 10 ) ||=0A=
( parseInt( o.percent, 10 ) =3D=3D=3D 0 ? 0 : ( mode =3D=3D=3D "hide" =
? 0 : 100 ) ),=0A=
direction =3D o.direction || "both",=0A=
origin =3D o.origin,=0A=
original =3D {=0A=
height: el.height(),=0A=
width: el.width(),=0A=
outerHeight: el.outerHeight(),=0A=
outerWidth: el.outerWidth()=0A=
},=0A=
factor =3D {=0A=
y: direction !=3D=3D "horizontal" ? (percent / 100) : 1,=0A=
x: direction !=3D=3D "vertical" ? (percent / 100) : 1=0A=
};=0A=
=0A=
// We are going to pass this effect to the size effect:=0A=
options.effect =3D "size";=0A=
options.queue =3D false;=0A=
options.complete =3D done;=0A=
=0A=
// Set default origin and restore for show/hide=0A=
if ( mode !=3D=3D "effect" ) {=0A=
options.origin =3D origin || ["middle","center"];=0A=
options.restore =3D true;=0A=
}=0A=
=0A=
options.from =3D o.from || ( mode =3D=3D=3D "show" ? {=0A=
height: 0,=0A=
width: 0,=0A=
outerHeight: 0,=0A=
outerWidth: 0=0A=
} : original );=0A=
options.to =3D {=0A=
height: original.height * factor.y,=0A=
width: original.width * factor.x,=0A=
outerHeight: original.outerHeight * factor.y,=0A=
outerWidth: original.outerWidth * factor.x=0A=
};=0A=
=0A=
// Fade option to support puff=0A=
if ( options.fade ) {=0A=
if ( mode =3D=3D=3D "show" ) {=0A=
options.from.opacity =3D 0;=0A=
options.to.opacity =3D 1;=0A=
}=0A=
if ( mode =3D=3D=3D "hide" ) {=0A=
options.from.opacity =3D 1;=0A=
options.to.opacity =3D 0;=0A=
}=0A=
}=0A=
=0A=
// Animate=0A=
el.effect( options );=0A=
=0A=
};=0A=
=0A=
$.effects.effect.size =3D function( o, done ) {=0A=
=0A=
// Create element=0A=
var original, baseline, factor,=0A=
el =3D $( this ),=0A=
props0 =3D [ "position", "top", "bottom", "left", "right", "width", =
"height", "overflow", "opacity" ],=0A=
=0A=
// Always restore=0A=
props1 =3D [ "position", "top", "bottom", "left", "right", "overflow", =
"opacity" ],=0A=
=0A=
// Copy for children=0A=
props2 =3D [ "width", "height", "overflow" ],=0A=
cProps =3D [ "fontSize" ],=0A=
vProps =3D [ "borderTopWidth", "borderBottomWidth", "paddingTop", =
"paddingBottom" ],=0A=
hProps =3D [ "borderLeftWidth", "borderRightWidth", "paddingLeft", =
"paddingRight" ],=0A=
=0A=
// Set options=0A=
mode =3D $.effects.setMode( el, o.mode || "effect" ),=0A=
restore =3D o.restore || mode !=3D=3D "effect",=0A=
scale =3D o.scale || "both",=0A=
origin =3D o.origin || [ "middle", "center" ],=0A=
position =3D el.css( "position" ),=0A=
props =3D restore ? props0 : props1,=0A=
zero =3D {=0A=
height: 0,=0A=
width: 0,=0A=
outerHeight: 0,=0A=
outerWidth: 0=0A=
};=0A=
=0A=
if ( mode =3D=3D=3D "show" ) {=0A=
el.show();=0A=
}=0A=
original =3D {=0A=
height: el.height(),=0A=
width: el.width(),=0A=
outerHeight: el.outerHeight(),=0A=
outerWidth: el.outerWidth()=0A=
};=0A=
=0A=
if ( o.mode =3D=3D=3D "toggle" && mode =3D=3D=3D "show" ) {=0A=
el.from =3D o.to || zero;=0A=
el.to =3D o.from || original;=0A=
} else {=0A=
el.from =3D o.from || ( mode =3D=3D=3D "show" ? zero : original );=0A=
el.to =3D o.to || ( mode =3D=3D=3D "hide" ? zero : original );=0A=
}=0A=
=0A=
// Set scaling factor=0A=
factor =3D {=0A=
from: {=0A=
y: el.from.height / original.height,=0A=
x: el.from.width / original.width=0A=
},=0A=
to: {=0A=
y: el.to.height / original.height,=0A=
x: el.to.width / original.width=0A=
}=0A=
};=0A=
=0A=
// Scale the css box=0A=
if ( scale =3D=3D=3D "box" || scale =3D=3D=3D "both" ) {=0A=
=0A=
// Vertical props scaling=0A=
if ( factor.from.y !=3D=3D factor.to.y ) {=0A=
props =3D props.concat( vProps );=0A=
el.from =3D $.effects.setTransition( el, vProps, factor.from.y, =
el.from );=0A=
el.to =3D $.effects.setTransition( el, vProps, factor.to.y, el.to );=0A=
}=0A=
=0A=
// Horizontal props scaling=0A=
if ( factor.from.x !=3D=3D factor.to.x ) {=0A=
props =3D props.concat( hProps );=0A=
el.from =3D $.effects.setTransition( el, hProps, factor.from.x, =
el.from );=0A=
el.to =3D $.effects.setTransition( el, hProps, factor.to.x, el.to );=0A=
}=0A=
}=0A=
=0A=
// Scale the content=0A=
if ( scale =3D=3D=3D "content" || scale =3D=3D=3D "both" ) {=0A=
=0A=
// Vertical props scaling=0A=
if ( factor.from.y !=3D=3D factor.to.y ) {=0A=
props =3D props.concat( cProps ).concat( props2 );=0A=
el.from =3D $.effects.setTransition( el, cProps, factor.from.y, =
el.from );=0A=
el.to =3D $.effects.setTransition( el, cProps, factor.to.y, el.to );=0A=
}=0A=
}=0A=
=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
$.effects.createWrapper( el );=0A=
el.css( "overflow", "hidden" ).css( el.from );=0A=
=0A=
// Adjust=0A=
if (origin) { // Calculate baseline shifts=0A=
baseline =3D $.effects.getBaseline( origin, original );=0A=
el.from.top =3D ( original.outerHeight - el.outerHeight() ) * =
baseline.y;=0A=
el.from.left =3D ( original.outerWidth - el.outerWidth() ) * =
baseline.x;=0A=
el.to.top =3D ( original.outerHeight - el.to.outerHeight ) * =
baseline.y;=0A=
el.to.left =3D ( original.outerWidth - el.to.outerWidth ) * baseline.x;=0A=
}=0A=
el.css( el.from ); // set top & left=0A=
=0A=
// Animate=0A=
if ( scale =3D=3D=3D "content" || scale =3D=3D=3D "both" ) { // Scale =
the children=0A=
=0A=
// Add margins/font-size=0A=
vProps =3D vProps.concat([ "marginTop", "marginBottom" =
]).concat(cProps);=0A=
hProps =3D hProps.concat([ "marginLeft", "marginRight" ]);=0A=
props2 =3D props0.concat(vProps).concat(hProps);=0A=
=0A=
el.find( "*[width]" ).each( function(){=0A=
var child =3D $( this ),=0A=
c_original =3D {=0A=
height: child.height(),=0A=
width: child.width(),=0A=
outerHeight: child.outerHeight(),=0A=
outerWidth: child.outerWidth()=0A=
};=0A=
if (restore) {=0A=
$.effects.save(child, props2);=0A=
}=0A=
=0A=
child.from =3D {=0A=
height: c_original.height * factor.from.y,=0A=
width: c_original.width * factor.from.x,=0A=
outerHeight: c_original.outerHeight * factor.from.y,=0A=
outerWidth: c_original.outerWidth * factor.from.x=0A=
};=0A=
child.to =3D {=0A=
height: c_original.height * factor.to.y,=0A=
width: c_original.width * factor.to.x,=0A=
outerHeight: c_original.height * factor.to.y,=0A=
outerWidth: c_original.width * factor.to.x=0A=
};=0A=
=0A=
// Vertical props scaling=0A=
if ( factor.from.y !=3D=3D factor.to.y ) {=0A=
child.from =3D $.effects.setTransition( child, vProps, =
factor.from.y, child.from );=0A=
child.to =3D $.effects.setTransition( child, vProps, factor.to.y, =
child.to );=0A=
}=0A=
=0A=
// Horizontal props scaling=0A=
if ( factor.from.x !=3D=3D factor.to.x ) {=0A=
child.from =3D $.effects.setTransition( child, hProps, =
factor.from.x, child.from );=0A=
child.to =3D $.effects.setTransition( child, hProps, factor.to.x, =
child.to );=0A=
}=0A=
=0A=
// Animate children=0A=
child.css( child.from );=0A=
child.animate( child.to, o.duration, o.easing, function() {=0A=
=0A=
// Restore children=0A=
if ( restore ) {=0A=
$.effects.restore( child, props2 );=0A=
}=0A=
});=0A=
});=0A=
}=0A=
=0A=
// Animate=0A=
el.animate( el.to, {=0A=
queue: false,=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
complete: function() {=0A=
if ( el.to.opacity =3D=3D=3D 0 ) {=0A=
el.css( "opacity", el.from.opacity );=0A=
}=0A=
if( mode =3D=3D=3D "hide" ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
if ( !restore ) {=0A=
=0A=
// we need to calculate our new positioning based on the scaling=0A=
if ( position =3D=3D=3D "static" ) {=0A=
el.css({=0A=
position: "relative",=0A=
top: el.to.top,=0A=
left: el.to.left=0A=
});=0A=
} else {=0A=
$.each([ "top", "left" ], function( idx, pos ) {=0A=
el.css( pos, function( _, str ) {=0A=
var val =3D parseInt( str, 10 ),=0A=
toRef =3D idx ? el.to.left : el.to.top;=0A=
=0A=
// if original was "auto", recalculate the new value from wrapper=0A=
if ( str =3D=3D=3D "auto" ) {=0A=
return toRef + "px";=0A=
}=0A=
=0A=
return val + toRef + "px";=0A=
});=0A=
});=0A=
}=0A=
}=0A=
=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
}=0A=
});=0A=
=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.shake =3D function( o, done ) {=0A=
=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "height", =
"width" ],=0A=
mode =3D $.effects.setMode( el, o.mode || "effect" ),=0A=
direction =3D o.direction || "left",=0A=
distance =3D o.distance || 20,=0A=
times =3D o.times || 3,=0A=
anims =3D times * 2 + 1,=0A=
speed =3D Math.round(o.duration/anims),=0A=
ref =3D (direction =3D=3D=3D "up" || direction =3D=3D=3D "down") ? =
"top" : "left",=0A=
positiveMotion =3D (direction =3D=3D=3D "up" || direction =3D=3D=3D =
"left"),=0A=
animation =3D {},=0A=
animation1 =3D {},=0A=
animation2 =3D {},=0A=
i,=0A=
=0A=
// we will need to re-assemble the queue to stack our animations in =
place=0A=
queue =3D el.queue(),=0A=
queuelen =3D queue.length;=0A=
=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
$.effects.createWrapper( el );=0A=
=0A=
// Animation=0A=
animation[ ref ] =3D ( positiveMotion ? "-=3D" : "+=3D" ) + distance;=0A=
animation1[ ref ] =3D ( positiveMotion ? "+=3D" : "-=3D" ) + distance * =
2;=0A=
animation2[ ref ] =3D ( positiveMotion ? "-=3D" : "+=3D" ) + distance * =
2;=0A=
=0A=
// Animate=0A=
el.animate( animation, speed, o.easing );=0A=
=0A=
// Shakes=0A=
for ( i =3D 1; i < times; i++ ) {=0A=
el.animate( animation1, speed, o.easing ).animate( animation2, speed, =
o.easing );=0A=
}=0A=
el=0A=
.animate( animation1, speed, o.easing )=0A=
.animate( animation, speed / 2, o.easing )=0A=
.queue(function() {=0A=
if ( mode =3D=3D=3D "hide" ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
});=0A=
=0A=
// inject all the animations we just queued to be first in line (after =
"inprogress")=0A=
if ( queuelen > 1) {=0A=
queue.splice.apply( queue,=0A=
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );=0A=
}=0A=
el.dequeue();=0A=
=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.slide =3D function( o, done ) {=0A=
=0A=
// Create element=0A=
var el =3D $( this ),=0A=
props =3D [ "position", "top", "bottom", "left", "right", "width", =
"height" ],=0A=
mode =3D $.effects.setMode( el, o.mode || "show" ),=0A=
show =3D mode =3D=3D=3D "show",=0A=
direction =3D o.direction || "left",=0A=
ref =3D (direction =3D=3D=3D "up" || direction =3D=3D=3D "down") ? =
"top" : "left",=0A=
positiveMotion =3D (direction =3D=3D=3D "up" || direction =3D=3D=3D =
"left"),=0A=
distance,=0A=
animation =3D {};=0A=
=0A=
// Adjust=0A=
$.effects.save( el, props );=0A=
el.show();=0A=
distance =3D o.distance || el[ ref =3D=3D=3D "top" ? "outerHeight" : =
"outerWidth" ]( true );=0A=
=0A=
$.effects.createWrapper( el ).css({=0A=
overflow: "hidden"=0A=
});=0A=
=0A=
if ( show ) {=0A=
el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : =
-distance) : distance );=0A=
}=0A=
=0A=
// Animation=0A=
animation[ ref ] =3D ( show ?=0A=
( positiveMotion ? "+=3D" : "-=3D") :=0A=
( positiveMotion ? "-=3D" : "+=3D")) +=0A=
distance;=0A=
=0A=
// Animate=0A=
el.animate( animation, {=0A=
queue: false,=0A=
duration: o.duration,=0A=
easing: o.easing,=0A=
complete: function() {=0A=
if ( mode =3D=3D=3D "hide" ) {=0A=
el.hide();=0A=
}=0A=
$.effects.restore( el, props );=0A=
$.effects.removeWrapper( el );=0A=
done();=0A=
}=0A=
});=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.effects.effect.transfer =3D function( o, done ) {=0A=
var elem =3D $( this ),=0A=
target =3D $( o.to ),=0A=
targetFixed =3D target.css( "position" ) =3D=3D=3D "fixed",=0A=
body =3D $("body"),=0A=
fixTop =3D targetFixed ? body.scrollTop() : 0,=0A=
fixLeft =3D targetFixed ? body.scrollLeft() : 0,=0A=
endPosition =3D target.offset(),=0A=
animation =3D {=0A=
top: endPosition.top - fixTop ,=0A=
left: endPosition.left - fixLeft ,=0A=
height: target.innerHeight(),=0A=
width: target.innerWidth()=0A=
},=0A=
startPosition =3D elem.offset(),=0A=
transfer =3D $( "
" )=0A=
.appendTo( document.body )=0A=
.addClass( o.className )=0A=
.css({=0A=
top: startPosition.top - fixTop ,=0A=
left: startPosition.left - fixLeft ,=0A=
height: elem.innerHeight(),=0A=
width: elem.innerWidth(),=0A=
position: targetFixed ? "fixed" : "absolute"=0A=
})=0A=
.animate( animation, o.duration, o.easing, function() {=0A=
transfer.remove();=0A=
done();=0A=
});=0A=
};=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.widget( "ui.menu", {=0A=
version: "1.10.4",=0A=
defaultElement: "
",=0A=
delay: 300,=0A=
options: {=0A=
icons: {=0A=
submenu: "ui-icon-carat-1-e"=0A=
},=0A=
menus: "ul",=0A=
position: {=0A=
my: "left top",=0A=
at: "right top"=0A=
},=0A=
role: "menu",=0A=
=0A=
// callbacks=0A=
blur: null,=0A=
focus: null,=0A=
select: null=0A=
},=0A=
=0A=
_create: function() {=0A=
this.activeMenu =3D this.element;=0A=
// flag used to prevent firing of the click handler=0A=
// as the event bubbles up through nested menus=0A=
this.mouseHandled =3D false;=0A=
this.element=0A=
.uniqueId()=0A=
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )=0A=
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" =
).length )=0A=
.attr({=0A=
role: this.options.role,=0A=
tabIndex: 0=0A=
})=0A=
// need to catch all clicks on disabled menu=0A=
// not possible through _on=0A=
.bind( "click" + this.eventNamespace, $.proxy(function( event ) {=0A=
if ( this.options.disabled ) {=0A=
event.preventDefault();=0A=
}=0A=
}, this ));=0A=
=0A=
if ( this.options.disabled ) {=0A=
this.element=0A=
.addClass( "ui-state-disabled" )=0A=
.attr( "aria-disabled", "true" );=0A=
}=0A=
=0A=
this._on({=0A=
// Prevent focus from sticking to links inside menu after clicking=0A=
// them (focus should always stay on UL during navigation).=0A=
"mousedown .ui-menu-item > a": function( event ) {=0A=
event.preventDefault();=0A=
},=0A=
"click .ui-state-disabled > a": function( event ) {=0A=
event.preventDefault();=0A=
},=0A=
"click .ui-menu-item:has(a)": function( event ) {=0A=
var target =3D $( event.target ).closest( ".ui-menu-item" );=0A=
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length =
) {=0A=
this.select( event );=0A=
=0A=
// Only set the mouseHandled flag if the event will bubble, see =
#9469.=0A=
if ( !event.isPropagationStopped() ) {=0A=
this.mouseHandled =3D true;=0A=
}=0A=
=0A=
// Open submenu on click=0A=
if ( target.has( ".ui-menu" ).length ) {=0A=
this.expand( event );=0A=
} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 =
].activeElement ).closest( ".ui-menu" ).length ) {=0A=
=0A=
// Redirect focus to the menu=0A=
this.element.trigger( "focus", [ true ] );=0A=
=0A=
// If the active item is on the top level, let it stay active.=0A=
// Otherwise, blur the active item since it is no longer visible.=0A=
if ( this.active && this.active.parents( ".ui-menu" ).length =
=3D=3D=3D 1 ) {=0A=
clearTimeout( this.timer );=0A=
}=0A=
}=0A=
}=0A=
},=0A=
"mouseenter .ui-menu-item": function( event ) {=0A=
var target =3D $( event.currentTarget );=0A=
// Remove ui-state-active class from siblings of the newly focused =
menu item=0A=
// to avoid a jump caused by adjacent elements both having a class =
with a border=0A=
target.siblings().children( ".ui-state-active" ).removeClass( =
"ui-state-active" );=0A=
this.focus( event, target );=0A=
},=0A=
mouseleave: "collapseAll",=0A=
"mouseleave .ui-menu": "collapseAll",=0A=
focus: function( event, keepActiveItem ) {=0A=
// If there's already an active item, keep it active=0A=
// If not, activate the first item=0A=
var item =3D this.active || this.element.children( ".ui-menu-item" =
).eq( 0 );=0A=
=0A=
if ( !keepActiveItem ) {=0A=
this.focus( event, item );=0A=
}=0A=
},=0A=
blur: function( event ) {=0A=
this._delay(function() {=0A=
if ( !$.contains( this.element[0], this.document[0].activeElement ) =
) {=0A=
this.collapseAll( event );=0A=
}=0A=
});=0A=
},=0A=
keydown: "_keydown"=0A=
});=0A=
=0A=
this.refresh();=0A=
=0A=
// Clicks outside of a menu collapse any open menus=0A=
this._on( this.document, {=0A=
click: function( event ) {=0A=
if ( !$( event.target ).closest( ".ui-menu" ).length ) {=0A=
this.collapseAll( event );=0A=
}=0A=
=0A=
// Reset the mouseHandled flag=0A=
this.mouseHandled =3D false;=0A=
}=0A=
});=0A=
},=0A=
=0A=
_destroy: function() {=0A=
// Destroy (sub)menus=0A=
this.element=0A=
.removeAttr( "aria-activedescendant" )=0A=
.find( ".ui-menu" ).addBack()=0A=
.removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all =
ui-menu-icons" )=0A=
.removeAttr( "role" )=0A=
.removeAttr( "tabIndex" )=0A=
.removeAttr( "aria-labelledby" )=0A=
.removeAttr( "aria-expanded" )=0A=
.removeAttr( "aria-hidden" )=0A=
.removeAttr( "aria-disabled" )=0A=
.removeUniqueId()=0A=
.show();=0A=
=0A=
// Destroy menu items=0A=
this.element.find( ".ui-menu-item" )=0A=
.removeClass( "ui-menu-item" )=0A=
.removeAttr( "role" )=0A=
.removeAttr( "aria-disabled" )=0A=
.children( "a" )=0A=
.removeUniqueId()=0A=
.removeClass( "ui-corner-all ui-state-hover" )=0A=
.removeAttr( "tabIndex" )=0A=
.removeAttr( "role" )=0A=
.removeAttr( "aria-haspopup" )=0A=
.children().each( function() {=0A=
var elem =3D $( this );=0A=
if ( elem.data( "ui-menu-submenu-carat" ) ) {=0A=
elem.remove();=0A=
}=0A=
});=0A=
=0A=
// Destroy menu dividers=0A=
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider =
ui-widget-content" );=0A=
},=0A=
=0A=
_keydown: function( event ) {=0A=
var match, prev, character, skip, regex,=0A=
preventDefault =3D true;=0A=
=0A=
function escape( value ) {=0A=
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );=0A=
}=0A=
=0A=
switch ( event.keyCode ) {=0A=
case $.ui.keyCode.PAGE_UP:=0A=
this.previousPage( event );=0A=
break;=0A=
case $.ui.keyCode.PAGE_DOWN:=0A=
this.nextPage( event );=0A=
break;=0A=
case $.ui.keyCode.HOME:=0A=
this._move( "first", "first", event );=0A=
break;=0A=
case $.ui.keyCode.END:=0A=
this._move( "last", "last", event );=0A=
break;=0A=
case $.ui.keyCode.UP:=0A=
this.previous( event );=0A=
break;=0A=
case $.ui.keyCode.DOWN:=0A=
this.next( event );=0A=
break;=0A=
case $.ui.keyCode.LEFT:=0A=
this.collapse( event );=0A=
break;=0A=
case $.ui.keyCode.RIGHT:=0A=
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {=0A=
this.expand( event );=0A=
}=0A=
break;=0A=
case $.ui.keyCode.ENTER:=0A=
case $.ui.keyCode.SPACE:=0A=
this._activate( event );=0A=
break;=0A=
case $.ui.keyCode.ESCAPE:=0A=
this.collapse( event );=0A=
break;=0A=
default:=0A=
preventDefault =3D false;=0A=
prev =3D this.previousFilter || "";=0A=
character =3D String.fromCharCode( event.keyCode );=0A=
skip =3D false;=0A=
=0A=
clearTimeout( this.filterTimer );=0A=
=0A=
if ( character =3D=3D=3D prev ) {=0A=
skip =3D true;=0A=
} else {=0A=
character =3D prev + character;=0A=
}=0A=
=0A=
regex =3D new RegExp( "^" + escape( character ), "i" );=0A=
match =3D this.activeMenu.children( ".ui-menu-item" =
).filter(function() {=0A=
return regex.test( $( this ).children( "a" ).text() );=0A=
});=0A=
match =3D skip && match.index( this.active.next() ) !=3D=3D -1 ?=0A=
this.active.nextAll( ".ui-menu-item" ) :=0A=
match;=0A=
=0A=
// If no matches on the current filter, reset to the last character =
pressed=0A=
// to move down the menu to the first item that starts with that =
character=0A=
if ( !match.length ) {=0A=
character =3D String.fromCharCode( event.keyCode );=0A=
regex =3D new RegExp( "^" + escape( character ), "i" );=0A=
match =3D this.activeMenu.children( ".ui-menu-item" =
).filter(function() {=0A=
return regex.test( $( this ).children( "a" ).text() );=0A=
});=0A=
}=0A=
=0A=
if ( match.length ) {=0A=
this.focus( event, match );=0A=
if ( match.length > 1 ) {=0A=
this.previousFilter =3D character;=0A=
this.filterTimer =3D this._delay(function() {=0A=
delete this.previousFilter;=0A=
}, 1000 );=0A=
} else {=0A=
delete this.previousFilter;=0A=
}=0A=
} else {=0A=
delete this.previousFilter;=0A=
}=0A=
}=0A=
=0A=
if ( preventDefault ) {=0A=
event.preventDefault();=0A=
}=0A=
},=0A=
=0A=
_activate: function( event ) {=0A=
if ( !this.active.is( ".ui-state-disabled" ) ) {=0A=
if ( this.active.children( "a[aria-haspopup=3D'true']" ).length ) {=0A=
this.expand( event );=0A=
} else {=0A=
this.select( event );=0A=
}=0A=
}=0A=
},=0A=
=0A=
refresh: function() {=0A=
var menus,=0A=
icon =3D this.options.icons.submenu,=0A=
submenus =3D this.element.find( this.options.menus );=0A=
=0A=
this.element.toggleClass( "ui-menu-icons", !!this.element.find( =
".ui-icon" ).length );=0A=
=0A=
// Initialize nested menus=0A=
submenus.filter( ":not(.ui-menu)" )=0A=
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )=0A=
.hide()=0A=
.attr({=0A=
role: this.options.role,=0A=
"aria-hidden": "true",=0A=
"aria-expanded": "false"=0A=
})=0A=
.each(function() {=0A=
var menu =3D $( this ),=0A=
item =3D menu.prev( "a" ),=0A=
submenuCarat =3D $( "" )=0A=
.addClass( "ui-menu-icon ui-icon " + icon )=0A=
.data( "ui-menu-submenu-carat", true );=0A=
=0A=
item=0A=
.attr( "aria-haspopup", "true" )=0A=
.prepend( submenuCarat );=0A=
menu.attr( "aria-labelledby", item.attr( "id" ) );=0A=
});=0A=
=0A=
menus =3D submenus.add( this.element );=0A=
=0A=
// Don't refresh list items that are already adapted=0A=
menus.children( ":not(.ui-menu-item):has(a)" )=0A=
.addClass( "ui-menu-item" )=0A=
.attr( "role", "presentation" )=0A=
.children( "a" )=0A=
.uniqueId()=0A=
.addClass( "ui-corner-all" )=0A=
.attr({=0A=
tabIndex: -1,=0A=
role: this._itemRole()=0A=
});=0A=
=0A=
// Initialize unlinked menu-items containing spaces and/or dashes only =
as dividers=0A=
menus.children( ":not(.ui-menu-item)" ).each(function() {=0A=
var item =3D $( this );=0A=
// hyphen, em dash, en dash=0A=
if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {=0A=
item.addClass( "ui-widget-content ui-menu-divider" );=0A=
}=0A=
});=0A=
=0A=
// Add aria-disabled attribute to any disabled menu item=0A=
menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );=0A=
=0A=
// If the active item has been removed, blur the menu=0A=
if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) =
) {=0A=
this.blur();=0A=
}=0A=
},=0A=
=0A=
_itemRole: function() {=0A=
return {=0A=
menu: "menuitem",=0A=
listbox: "option"=0A=
}[ this.options.role ];=0A=
},=0A=
=0A=
_setOption: function( key, value ) {=0A=
if ( key =3D=3D=3D "icons" ) {=0A=
this.element.find( ".ui-menu-icon" )=0A=
.removeClass( this.options.icons.submenu )=0A=
.addClass( value.submenu );=0A=
}=0A=
this._super( key, value );=0A=
},=0A=
=0A=
focus: function( event, item ) {=0A=
var nested, focused;=0A=
this.blur( event, event && event.type =3D=3D=3D "focus" );=0A=
=0A=
this._scrollIntoView( item );=0A=
=0A=
this.active =3D item.first();=0A=
focused =3D this.active.children( "a" ).addClass( "ui-state-focus" );=0A=
// Only update aria-activedescendant if there's a role=0A=
// otherwise we assume focus is managed elsewhere=0A=
if ( this.options.role ) {=0A=
this.element.attr( "aria-activedescendant", focused.attr( "id" ) );=0A=
}=0A=
=0A=
// Highlight active parent menu item, if any=0A=
this.active=0A=
.parent()=0A=
.closest( ".ui-menu-item" )=0A=
.children( "a:first" )=0A=
.addClass( "ui-state-active" );=0A=
=0A=
if ( event && event.type =3D=3D=3D "keydown" ) {=0A=
this._close();=0A=
} else {=0A=
this.timer =3D this._delay(function() {=0A=
this._close();=0A=
}, this.delay );=0A=
}=0A=
=0A=
nested =3D item.children( ".ui-menu" );=0A=
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {=0A=
this._startOpening(nested);=0A=
}=0A=
this.activeMenu =3D item.parent();=0A=
=0A=
this._trigger( "focus", event, { item: item } );=0A=
},=0A=
=0A=
_scrollIntoView: function( item ) {=0A=
var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;=0A=
if ( this._hasScroll() ) {=0A=
borderTop =3D parseFloat( $.css( this.activeMenu[0], "borderTopWidth" =
) ) || 0;=0A=
paddingTop =3D parseFloat( $.css( this.activeMenu[0], "paddingTop" ) =
) || 0;=0A=
offset =3D item.offset().top - this.activeMenu.offset().top - =
borderTop - paddingTop;=0A=
scroll =3D this.activeMenu.scrollTop();=0A=
elementHeight =3D this.activeMenu.height();=0A=
itemHeight =3D item.height();=0A=
=0A=
if ( offset < 0 ) {=0A=
this.activeMenu.scrollTop( scroll + offset );=0A=
} else if ( offset + itemHeight > elementHeight ) {=0A=
this.activeMenu.scrollTop( scroll + offset - elementHeight + =
itemHeight );=0A=
}=0A=
}=0A=
},=0A=
=0A=
blur: function( event, fromFocus ) {=0A=
if ( !fromFocus ) {=0A=
clearTimeout( this.timer );=0A=
}=0A=
=0A=
if ( !this.active ) {=0A=
return;=0A=
}=0A=
=0A=
this.active.children( "a" ).removeClass( "ui-state-focus" );=0A=
this.active =3D null;=0A=
=0A=
this._trigger( "blur", event, { item: this.active } );=0A=
},=0A=
=0A=
_startOpening: function( submenu ) {=0A=
clearTimeout( this.timer );=0A=
=0A=
// Don't open if already open fixes a Firefox bug that caused a .5 =
pixel=0A=
// shift in the submenu position when mousing over the carat icon=0A=
if ( submenu.attr( "aria-hidden" ) !=3D=3D "true" ) {=0A=
return;=0A=
}=0A=
=0A=
this.timer =3D this._delay(function() {=0A=
this._close();=0A=
this._open( submenu );=0A=
}, this.delay );=0A=
},=0A=
=0A=
_open: function( submenu ) {=0A=
var position =3D $.extend({=0A=
of: this.active=0A=
}, this.options.position );=0A=
=0A=
clearTimeout( this.timer );=0A=
this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )=0A=
.hide()=0A=
.attr( "aria-hidden", "true" );=0A=
=0A=
submenu=0A=
.show()=0A=
.removeAttr( "aria-hidden" )=0A=
.attr( "aria-expanded", "true" )=0A=
.position( position );=0A=
},=0A=
=0A=
collapseAll: function( event, all ) {=0A=
clearTimeout( this.timer );=0A=
this.timer =3D this._delay(function() {=0A=
// If we were passed an event, look for the submenu that contains the =
event=0A=
var currentMenu =3D all ? this.element :=0A=
$( event && event.target ).closest( this.element.find( ".ui-menu" ) =
);=0A=
=0A=
// If we found no valid submenu ancestor, use the main menu to close =
all sub menus anyway=0A=
if ( !currentMenu.length ) {=0A=
currentMenu =3D this.element;=0A=
}=0A=
=0A=
this._close( currentMenu );=0A=
=0A=
this.blur( event );=0A=
this.activeMenu =3D currentMenu;=0A=
}, this.delay );=0A=
},=0A=
=0A=
// With no arguments, closes the currently active menu - if nothing is =
active=0A=
// it closes all menus. If passed an argument, it will search for =
menus BELOW=0A=
_close: function( startMenu ) {=0A=
if ( !startMenu ) {=0A=
startMenu =3D this.active ? this.active.parent() : this.element;=0A=
}=0A=
=0A=
startMenu=0A=
.find( ".ui-menu" )=0A=
.hide()=0A=
.attr( "aria-hidden", "true" )=0A=
.attr( "aria-expanded", "false" )=0A=
.end()=0A=
.find( "a.ui-state-active" )=0A=
.removeClass( "ui-state-active" );=0A=
},=0A=
=0A=
collapse: function( event ) {=0A=
var newItem =3D this.active &&=0A=
this.active.parent().closest( ".ui-menu-item", this.element );=0A=
if ( newItem && newItem.length ) {=0A=
this._close();=0A=
this.focus( event, newItem );=0A=
}=0A=
},=0A=
=0A=
expand: function( event ) {=0A=
var newItem =3D this.active &&=0A=
this.active=0A=
.children( ".ui-menu " )=0A=
.children( ".ui-menu-item" )=0A=
.first();=0A=
=0A=
if ( newItem && newItem.length ) {=0A=
this._open( newItem.parent() );=0A=
=0A=
// Delay so Firefox will not hide activedescendant change in =
expanding submenu from AT=0A=
this._delay(function() {=0A=
this.focus( event, newItem );=0A=
});=0A=
}=0A=
},=0A=
=0A=
next: function( event ) {=0A=
this._move( "next", "first", event );=0A=
},=0A=
=0A=
previous: function( event ) {=0A=
this._move( "prev", "last", event );=0A=
},=0A=
=0A=
isFirstItem: function() {=0A=
return this.active && !this.active.prevAll( ".ui-menu-item" ).length;=0A=
},=0A=
=0A=
isLastItem: function() {=0A=
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;=0A=
},=0A=
=0A=
_move: function( direction, filter, event ) {=0A=
var next;=0A=
if ( this.active ) {=0A=
if ( direction =3D=3D=3D "first" || direction =3D=3D=3D "last" ) {=0A=
next =3D this.active=0A=
[ direction =3D=3D=3D "first" ? "prevAll" : "nextAll" ]( =
".ui-menu-item" )=0A=
.eq( -1 );=0A=
} else {=0A=
next =3D this.active=0A=
[ direction + "All" ]( ".ui-menu-item" )=0A=
.eq( 0 );=0A=
}=0A=
}=0A=
if ( !next || !next.length || !this.active ) {=0A=
next =3D this.activeMenu.children( ".ui-menu-item" )[ filter ]();=0A=
}=0A=
=0A=
this.focus( event, next );=0A=
},=0A=
=0A=
nextPage: function( event ) {=0A=
var item, base, height;=0A=
=0A=
if ( !this.active ) {=0A=
this.next( event );=0A=
return;=0A=
}=0A=
if ( this.isLastItem() ) {=0A=
return;=0A=
}=0A=
if ( this._hasScroll() ) {=0A=
base =3D this.active.offset().top;=0A=
height =3D this.element.height();=0A=
this.active.nextAll( ".ui-menu-item" ).each(function() {=0A=
item =3D $( this );=0A=
return item.offset().top - base - height < 0;=0A=
});=0A=
=0A=
this.focus( event, item );=0A=
} else {=0A=
this.focus( event, this.activeMenu.children( ".ui-menu-item" )=0A=
[ !this.active ? "first" : "last" ]() );=0A=
}=0A=
},=0A=
=0A=
previousPage: function( event ) {=0A=
var item, base, height;=0A=
if ( !this.active ) {=0A=
this.next( event );=0A=
return;=0A=
}=0A=
if ( this.isFirstItem() ) {=0A=
return;=0A=
}=0A=
if ( this._hasScroll() ) {=0A=
base =3D this.active.offset().top;=0A=
height =3D this.element.height();=0A=
this.active.prevAll( ".ui-menu-item" ).each(function() {=0A=
item =3D $( this );=0A=
return item.offset().top - base + height > 0;=0A=
});=0A=
=0A=
this.focus( event, item );=0A=
} else {=0A=
this.focus( event, this.activeMenu.children( ".ui-menu-item" =
).first() );=0A=
}=0A=
},=0A=
=0A=
_hasScroll: function() {=0A=
return this.element.outerHeight() < this.element.prop( "scrollHeight" =
);=0A=
},=0A=
=0A=
select: function( event ) {=0A=
// TODO: It should never be possible to not have an active item at this=0A=
// point, but the tests don't trigger mouseenter before click.=0A=
this.active =3D this.active || $( event.target ).closest( =
".ui-menu-item" );=0A=
var ui =3D { item: this.active };=0A=
if ( !this.active.has( ".ui-menu" ).length ) {=0A=
this.collapseAll( event, true );=0A=
}=0A=
this._trigger( "select", event, ui );=0A=
}=0A=
});=0A=
=0A=
}( jQuery ));=0A=
(function( $, undefined ) {=0A=
=0A=
$.widget( "ui.progressbar", {=0A=
version: "1.10.4",=0A=
options: {=0A=
max: 100,=0A=
value: 0,=0A=
=0A=
change: null,=0A=
complete: null=0A=
},=0A=
=0A=
min: 0,=0A=
=0A=
_create: function() {=0A=
// Constrain initial value=0A=
this.oldValue =3D this.options.value =3D this._constrainedValue();=0A=
=0A=
this.element=0A=
.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" =
)=0A=
.attr({=0A=
// Only set static values, aria-valuenow and aria-valuemax are=0A=
// set inside _refreshValue()=0A=
role: "progressbar",=0A=
"aria-valuemin": this.min=0A=
});=0A=
=0A=
this.valueDiv =3D $( "" )=0A=
.appendTo( this.element );=0A=
=0A=
this._refreshValue();=0A=
},=0A=
=0A=
_destroy: function() {=0A=
this.element=0A=
.removeClass( "ui-progressbar ui-widget ui-widget-content =
ui-corner-all" )=0A=
.removeAttr( "role" )=0A=
.removeAttr( "aria-valuemin" )=0A=
.removeAttr( "aria-valuemax" )=0A=
.removeAttr( "aria-valuenow" );=0A=
=0A=
this.valueDiv.remove();=0A=
},=0A=
=0A=
value: function( newValue ) {=0A=
if ( newValue =3D=3D=3D undefined ) {=0A=
return this.options.value;=0A=
}=0A=
=0A=
this.options.value =3D this._constrainedValue( newValue );=0A=
this._refreshValue();=0A=
},=0A=
=0A=
_constrainedValue: function( newValue ) {=0A=
if ( newValue =3D=3D=3D undefined ) {=0A=
newValue =3D this.options.value;=0A=
}=0A=
=0A=
this.indeterminate =3D newValue =3D=3D=3D false;=0A=
=0A=
// sanitize value=0A=
if ( typeof newValue !=3D=3D "number" ) {=0A=
newValue =3D 0;=0A=
}=0A=
=0A=
return this.indeterminate ? false :=0A=
Math.min( this.options.max, Math.max( this.min, newValue ) );=0A=
},=0A=
=0A=
_setOptions: function( options ) {=0A=
// Ensure "value" option is set after other values (like max)=0A=
var value =3D options.value;=0A=
delete options.value;=0A=
=0A=
this._super( options );=0A=
=0A=
this.options.value =3D this._constrainedValue( value );=0A=
this._refreshValue();=0A=
},=0A=
=0A=
_setOption: function( key, value ) {=0A=
if ( key =3D=3D=3D "max" ) {=0A=
// Don't allow a max less than min=0A=
value =3D Math.max( this.min, value );=0A=
}=0A=
=0A=
this._super( key, value );=0A=
},=0A=
=0A=
_percentage: function() {=0A=
return this.indeterminate ? 100 : 100 * ( this.options.value - =
this.min ) / ( this.options.max - this.min );=0A=
},=0A=
=0A=
_refreshValue: function() {=0A=
var value =3D this.options.value,=0A=
percentage =3D this._percentage();=0A=
=0A=
this.valueDiv=0A=
.toggle( this.indeterminate || value > this.min )=0A=
.toggleClass( "ui-corner-right", value =3D=3D=3D this.options.max )=0A=
.width( percentage.toFixed(0) + "%" );=0A=
=0A=
this.element.toggleClass( "ui-progressbar-indeterminate", =
this.indeterminate );=0A=
=0A=
if ( this.indeterminate ) {=0A=
this.element.removeAttr( "aria-valuenow" );=0A=
if ( !this.overlayDiv ) {=0A=
this.overlayDiv =3D $( "" ).appendTo( this.valueDiv );=0A=
}=0A=
} else {=0A=
this.element.attr({=0A=
"aria-valuemax": this.options.max,=0A=
"aria-valuenow": value=0A=
});=0A=
if ( this.overlayDiv ) {=0A=
this.overlayDiv.remove();=0A=
this.overlayDiv =3D null;=0A=
}=0A=
}=0A=
=0A=
if ( this.oldValue !=3D=3D value ) {=0A=
this.oldValue =3D value;=0A=
this._trigger( "change" );=0A=
}=0A=
if ( value =3D=3D=3D this.options.max ) {=0A=
this._trigger( "complete" );=0A=
}=0A=
}=0A=
});=0A=
=0A=
})( jQuery );=0A=
(function( $, undefined ) {=0A=
=0A=
function num(v) {=0A=
return parseInt(v, 10) || 0;=0A=
}=0A=
=0A=
function isNumber(value) {=0A=
return !isNaN(parseInt(value, 10));=0A=
}=0A=
=0A=
$.widget("ui.resizable", $.ui.mouse, {=0A=
version: "1.10.4",=0A=
widgetEventPrefix: "resize",=0A=
options: {=0A=
alsoResize: false,=0A=
animate: false,=0A=
animateDuration: "slow",=0A=
animateEasing: "swing",=0A=
aspectRatio: false,=0A=
autoHide: false,=0A=
containment: false,=0A=
ghost: false,=0A=
grid: false,=0A=
handles: "e,s,se",=0A=
helper: false,=0A=
maxHeight: null,=0A=
maxWidth: null,=0A=
minHeight: 10,=0A=
minWidth: 10,=0A=
// See #7960=0A=
zIndex: 90,=0A=
=0A=
// callbacks=0A=
resize: null,=0A=
start: null,=0A=
stop: null=0A=
},=0A=
_create: function() {=0A=
=0A=
var n, i, handle, axis, hname,=0A=
that =3D this,=0A=
o =3D this.options;=0A=
this.element.addClass("ui-resizable");=0A=
=0A=
$.extend(this, {=0A=
_aspectRatio: !!(o.aspectRatio),=0A=
aspectRatio: o.aspectRatio,=0A=
originalElement: this.element,=0A=
_proportionallyResizeElements: [],=0A=
_helper: o.helper || o.ghost || o.animate ? o.helper || =
"ui-resizable-helper" : null=0A=
});=0A=
=0A=
//Wrap the element if it cannot hold child nodes=0A=
=
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|im=
g/i)) {=0A=
=0A=
//Create a wrapper element and set the wrapper to the new current =
internal element=0A=
this.element.wrap(=0A=
$("").css({=0A=
position: this.element.css("position"),=0A=
width: this.element.outerWidth(),=0A=
height: this.element.outerHeight(),=0A=
top: this.element.css("top"),=0A=
left: this.element.css("left")=0A=
})=0A=
);=0A=
=0A=
//Overwrite the original this.element=0A=
this.element =3D this.element.parent().data(=0A=
"ui-resizable", this.element.data("ui-resizable")=0A=
);=0A=
=0A=
this.elementIsWrapper =3D true;=0A=
=0A=
//Move margins to the wrapper=0A=
this.element.css({ marginLeft: =
this.originalElement.css("marginLeft"), marginTop: =
this.originalElement.css("marginTop"), marginRight: =
this.originalElement.css("marginRight"), marginBottom: =
this.originalElement.css("marginBottom") });=0A=
this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: =
0, marginBottom: 0});=0A=
=0A=
//Prevent Safari textarea resize=0A=
this.originalResizeStyle =3D this.originalElement.css("resize");=0A=
this.originalElement.css("resize", "none");=0A=
=0A=
//Push the actual element to our proportionallyResize internal array=0A=
this._proportionallyResizeElements.push(this.originalElement.css({ =
position: "static", zoom: 1, display: "block" }));=0A=
=0A=
// avoid IE jump (hard set the margin)=0A=
this.originalElement.css({ margin: this.originalElement.css("margin") =
});=0A=
=0A=
// fix handlers offset=0A=
this._proportionallyResize();=0A=
=0A=
}=0A=
=0A=
this.handles =3D o.handles || (!$(".ui-resizable-handle", =
this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: =
".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: =
".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: =
".ui-resizable-nw" });=0A=
if(this.handles.constructor =3D=3D=3D String) {=0A=
=0A=
if ( this.handles =3D=3D=3D "all") {=0A=
this.handles =3D "n,e,s,w,se,sw,ne,nw";=0A=
}=0A=
=0A=
n =3D this.handles.split(",");=0A=
this.handles =3D {};=0A=
=0A=
for(i =3D 0; i < n.length; i++) {=0A=
=0A=
handle =3D $.trim(n[i]);=0A=
hname =3D "ui-resizable-"+handle;=0A=
axis =3D $("");=0A=
=0A=
// Apply zIndex to all handles - see #7960=0A=
axis.css({ zIndex: o.zIndex });=0A=
=0A=
//TODO : What's going on here?=0A=
if ("se" =3D=3D=3D handle) {=0A=
axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");=0A=
}=0A=
=0A=
//Insert into internal handles object and append to element=0A=
this.handles[handle] =3D ".ui-resizable-"+handle;=0A=
this.element.append(axis);=0A=
}=0A=
=0A=
}=0A=
=0A=
this._renderAxis =3D function(target) {=0A=
=0A=
var i, axis, padPos, padWrapper;=0A=
=0A=
target =3D target || this.element;=0A=
=0A=
for(i in this.handles) {=0A=
=0A=
if(this.handles[i].constructor =3D=3D=3D String) {=0A=
this.handles[i] =3D $(this.handles[i], this.element).show();=0A=
}=0A=
=0A=
//Apply pad to wrapper element, needed to fix axis position =
(textarea, inputs, scrolls)=0A=
if (this.elementIsWrapper && =
this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) =
{=0A=
=0A=
axis =3D $(this.handles[i], this.element);=0A=
=0A=
//Checking the correct pad and border=0A=
padWrapper =3D /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : =
axis.outerWidth();=0A=
=0A=
//The padding type i have to apply...=0A=
padPos =3D [ "padding",=0A=
/ne|nw|n/.test(i) ? "Top" :=0A=
/se|sw|s/.test(i) ? "Bottom" :=0A=
/^e$/.test(i) ? "Right" : "Left" ].join("");=0A=
=0A=
target.css(padPos, padWrapper);=0A=
=0A=
this._proportionallyResize();=0A=
=0A=
}=0A=
=0A=
//TODO: What's that good for? There's not anything to be executed =
left=0A=
if(!$(this.handles[i]).length) {=0A=
continue;=0A=
}=0A=
}=0A=
};=0A=
=0A=
//TODO: make renderAxis a prototype function=0A=
this._renderAxis(this.element);=0A=
=0A=
this._handles =3D $(".ui-resizable-handle", this.element)=0A=
.disableSelection();=0A=
=0A=
//Matching axis name=0A=
this._handles.mouseover(function() {=0A=
if (!that.resizing) {=0A=
if (this.className) {=0A=
axis =3D =
this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);=0A=
}=0A=
//Axis, default =3D se=0A=
that.axis =3D axis && axis[1] ? axis[1] : "se";=0A=
}=0A=
});=0A=
=0A=
//If we want to auto hide the elements=0A=
if (o.autoHide) {=0A=
this._handles.hide();=0A=
$(this.element)=0A=
.addClass("ui-resizable-autohide")=0A=
.mouseenter(function() {=0A=
if (o.disabled) {=0A=
return;=0A=
}=0A=
$(this).removeClass("ui-resizable-autohide");=0A=
that._handles.show();=0A=
})=0A=
.mouseleave(function(){=0A=
if (o.disabled) {=0A=
return;=0A=
}=0A=
if (!that.resizing) {=0A=
$(this).addClass("ui-resizable-autohide");=0A=
that._handles.hide();=0A=
}=0A=
});=0A=
}=0A=
=0A=
//Initialize the mouse interaction=0A=
this._mouseInit();=0A=
=0A=
},=0A=
=0A=
_destroy: function() {=0A=
=0A=
this._mouseDestroy();=0A=
=0A=
var wrapper,=0A=
_destroy =3D function(exp) {=0A=
$(exp).removeClass("ui-resizable ui-resizable-disabled =
ui-resizable-resizing")=0A=
=
.removeData("resizable").removeData("ui-resizable").unbind(".resizable").=
find(".ui-resizable-handle").remove();=0A=
};=0A=
=0A=
//TODO: Unwrap at same DOM position=0A=
if (this.elementIsWrapper) {=0A=
_destroy(this.element);=0A=
wrapper =3D this.element;=0A=
this.originalElement.css({=0A=
position: wrapper.css("position"),=0A=
width: wrapper.outerWidth(),=0A=
height: wrapper.outerHeight(),=0A=
top: wrapper.css("top"),=0A=
left: wrapper.css("left")=0A=
}).insertAfter( wrapper );=0A=
wrapper.remove();=0A=
}=0A=
=0A=
this.originalElement.css("resize", this.originalResizeStyle);=0A=
_destroy(this.originalElement);=0A=
=0A=
return this;=0A=
},=0A=
=0A=
_mouseCapture: function(event) {=0A=
var i, handle,=0A=
capture =3D false;=0A=
=0A=
for (i in this.handles) {=0A=
handle =3D $(this.handles[i])[0];=0A=
if (handle =3D=3D=3D event.target || $.contains(handle, =
event.target)) {=0A=
capture =3D true;=0A=
}=0A=
}=0A=
=0A=
return !this.options.disabled && capture;=0A=
},=0A=
=0A=
_mouseStart: function(event) {=0A=
=0A=
var curleft, curtop, cursor,=0A=
o =3D this.options,=0A=
iniPos =3D this.element.position(),=0A=
el =3D this.element;=0A=
=0A=
this.resizing =3D true;=0A=
=0A=
// bugfix for http://dev.jquery.com/ticket/1749=0A=
if ( (/absolute/).test( el.css("position") ) ) {=0A=
el.css({ position: "absolute", top: el.css("top"), left: =
el.css("left") });=0A=
} else if (el.is(".ui-draggable")) {=0A=
el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });=0A=
}=0A=
=0A=
this._renderProxy();=0A=
=0A=
curleft =3D num(this.helper.css("left"));=0A=
curtop =3D num(this.helper.css("top"));=0A=
=0A=
if (o.containment) {=0A=
curleft +=3D $(o.containment).scrollLeft() || 0;=0A=
curtop +=3D $(o.containment).scrollTop() || 0;=0A=
}=0A=
=0A=
//Store needed variables=0A=
this.offset =3D this.helper.offset();=0A=
this.position =3D { left: curleft, top: curtop };=0A=
this.size =3D this._helper ? { width: this.helper.width(), height: =
this.helper.height() } : { width: el.width(), height: el.height() };=0A=
this.originalSize =3D this._helper ? { width: el.outerWidth(), height: =
el.outerHeight() } : { width: el.width(), height: el.height() };=0A=
this.originalPosition =3D { left: curleft, top: curtop };=0A=
this.sizeDiff =3D { width: el.outerWidth() - el.width(), height: =
el.outerHeight() - el.height() };=0A=
this.originalMousePosition =3D { left: event.pageX, top: event.pageY };=0A=
=0A=
//Aspect Ratio=0A=
this.aspectRatio =3D (typeof o.aspectRatio =3D=3D=3D "number") ? =
o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || =
1);=0A=
=0A=
cursor =3D $(".ui-resizable-" + this.axis).css("cursor");=0A=
$("body").css("cursor", cursor =3D=3D=3D "auto" ? this.axis + =
"-resize" : cursor);=0A=
=0A=
el.addClass("ui-resizable-resizing");=0A=
this._propagate("start", event);=0A=
return true;=0A=
},=0A=
=0A=
_mouseDrag: function(event) {=0A=
=0A=
//Increase performance, avoid regex=0A=
var data,=0A=
el =3D this.helper, props =3D {},=0A=
smp =3D this.originalMousePosition,=0A=
a =3D this.axis,=0A=
prevTop =3D this.position.top,=0A=
prevLeft =3D this.position.left,=0A=
prevWidth =3D this.size.width,=0A=
prevHeight =3D this.size.height,=0A=
dx =3D (event.pageX-smp.left)||0,=0A=
dy =3D (event.pageY-smp.top)||0,=0A=
trigger =3D this._change[a];=0A=
=0A=
if (!trigger) {=0A=
return false;=0A=
}=0A=
=0A=
// Calculate the attrs that will be change=0A=
data =3D trigger.apply(this, [event, dx, dy]);=0A=
=0A=
// Put this in the mouseDrag handler since the user can start pressing =
shift while resizing=0A=
this._updateVirtualBoundaries(event.shiftKey);=0A=
if (this._aspectRatio || event.shiftKey) {=0A=
data =3D this._updateRatio(data, event);=0A=
}=0A=
=0A=
data =3D this._respectSize(data, event);=0A=
=0A=
this._updateCache(data);=0A=
=0A=
// plugins callbacks need to be called first=0A=
this._propagate("resize", event);=0A=
=0A=
if (this.position.top !=3D=3D prevTop) {=0A=
props.top =3D this.position.top + "px";=0A=
}=0A=
if (this.position.left !=3D=3D prevLeft) {=0A=
props.left =3D this.position.left + "px";=0A=
}=0A=
if (this.size.width !=3D=3D prevWidth) {=0A=
props.width =3D this.size.width + "px";=0A=
}=0A=
if (this.size.height !=3D=3D prevHeight) {=0A=
props.height =3D this.size.height + "px";=0A=
}=0A=
el.css(props);=0A=
=0A=
if (!this._helper && this._proportionallyResizeElements.length) {=0A=
this._proportionallyResize();=0A=
}=0A=
=0A=
// Call the user callback if the element was resized=0A=
if ( ! $.isEmptyObject(props) ) {=0A=
this._trigger("resize", event, this.ui());=0A=
}=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_mouseStop: function(event) {=0A=
=0A=
this.resizing =3D false;=0A=
var pr, ista, soffseth, soffsetw, s, left, top,=0A=
o =3D this.options, that =3D this;=0A=
=0A=
if(this._helper) {=0A=
=0A=
pr =3D this._proportionallyResizeElements;=0A=
ista =3D pr.length && (/textarea/i).test(pr[0].nodeName);=0A=
soffseth =3D ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump =
height */ ? 0 : that.sizeDiff.height;=0A=
soffsetw =3D ista ? 0 : that.sizeDiff.width;=0A=
=0A=
s =3D { width: (that.helper.width() - soffsetw), height: =
(that.helper.height() - soffseth) };=0A=
left =3D (parseInt(that.element.css("left"), 10) + =
(that.position.left - that.originalPosition.left)) || null;=0A=
top =3D (parseInt(that.element.css("top"), 10) + (that.position.top - =
that.originalPosition.top)) || null;=0A=
=0A=
if (!o.animate) {=0A=
this.element.css($.extend(s, { top: top, left: left }));=0A=
}=0A=
=0A=
that.helper.height(that.size.height);=0A=
that.helper.width(that.size.width);=0A=
=0A=
if (this._helper && !o.animate) {=0A=
this._proportionallyResize();=0A=
}=0A=
}=0A=
=0A=
$("body").css("cursor", "auto");=0A=
=0A=
this.element.removeClass("ui-resizable-resizing");=0A=
=0A=
this._propagate("stop", event);=0A=
=0A=
if (this._helper) {=0A=
this.helper.remove();=0A=
}=0A=
=0A=
return false;=0A=
=0A=
},=0A=
=0A=
_updateVirtualBoundaries: function(forceAspectRatio) {=0A=
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,=0A=
o =3D this.options;=0A=
=0A=
b =3D {=0A=
minWidth: isNumber(o.minWidth) ? o.minWidth : 0,=0A=
maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,=0A=
minHeight: isNumber(o.minHeight) ? o.minHeight : 0,=0A=
maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity=0A=
};=0A=
=0A=
if(this._aspectRatio || forceAspectRatio) {=0A=
// We want to create an enclosing box whose aspect ration is the =
requested one=0A=
// First, compute the "projected" size for each dimension based on =
the aspect ratio and other dimension=0A=
pMinWidth =3D b.minHeight * this.aspectRatio;=0A=
pMinHeight =3D b.minWidth / this.aspectRatio;=0A=
pMaxWidth =3D b.maxHeight * this.aspectRatio;=0A=
pMaxHeight =3D b.maxWidth / this.aspectRatio;=0A=
=0A=
if(pMinWidth > b.minWidth) {=0A=
b.minWidth =3D pMinWidth;=0A=
}=0A=
if(pMinHeight > b.minHeight) {=0A=
b.minHeight =3D pMinHeight;=0A=
}=0A=
if(pMaxWidth < b.maxWidth) {=0A=
b.maxWidth =3D pMaxWidth;=0A=
}=0A=
if(pMaxHeight < b.maxHeight) {=0A=
b.maxHeight =3D pMaxHeight;=0A=
}=0A=
}=0A=
this._vBoundaries =3D b;=0A=
},=0A=
=0A=
_updateCache: function(data) {=0A=
this.offset =3D this.helper.offset();=0A=
if (isNumber(data.left)) {=0A=
this.position.left =3D data.left;=0A=
}=0A=
if (isNumber(data.top)) {=0A=
this.position.top =3D data.top;=0A=
}=0A=
if (isNumber(data.height)) {=0A=
this.size.height =3D data.height;=0A=
}=0A=
if (isNumber(data.width)) {=0A=
this.size.width =3D data.width;=0A=
}=0A=
},=0A=
=0A=
_updateRatio: function( data ) {=0A=
=0A=
var cpos =3D this.position,=0A=
csize =3D this.size,=0A=
a =3D this.axis;=0A=
=0A=
if (isNumber(data.height)) {=0A=
data.width =3D (data.height * this.aspectRatio);=0A=
} else if (isNumber(data.width)) {=0A=
data.height =3D (data.width / this.aspectRatio);=0A=
}=0A=
=0A=
if (a =3D=3D=3D "sw") {=0A=
data.left =3D cpos.left + (csize.width - data.width);=0A=
data.top =3D null;=0A=
}=0A=
if (a =3D=3D=3D "nw") {=0A=
data.top =3D cpos.top + (csize.height - data.height);=0A=
data.left =3D cpos.left + (csize.width - data.width);=0A=
}=0A=
=0A=
return data;=0A=
},=0A=
=0A=
_respectSize: function( data ) {=0A=
=0A=
var o =3D this._vBoundaries,=0A=
a =3D this.axis,=0A=
ismaxw =3D isNumber(data.width) && o.maxWidth && (o.maxWidth < =
data.width), ismaxh =3D isNumber(data.height) && o.maxHeight && =
(o.maxHeight < data.height),=0A=
isminw =3D isNumber(data.width) && o.minWidth && (o.minWidth > =
data.width), isminh =3D isNumber(data.height) && o.minHeight && =
(o.minHeight > data.height),=0A=
dw =3D this.originalPosition.left + this.originalSize.width,=0A=
dh =3D this.position.top + this.size.height,=0A=
cw =3D /sw|nw|w/.test(a), ch =3D /nw|ne|n/.test(a);=0A=
if (isminw) {=0A=
data.width =3D o.minWidth;=0A=
}=0A=
if (isminh) {=0A=
data.height =3D o.minHeight;=0A=
}=0A=
if (ismaxw) {=0A=
data.width =3D o.maxWidth;=0A=
}=0A=
if (ismaxh) {=0A=
data.height =3D o.maxHeight;=0A=
}=0A=
=0A=
if (isminw && cw) {=0A=
data.left =3D dw - o.minWidth;=0A=
}=0A=
if (ismaxw && cw) {=0A=
data.left =3D dw - o.maxWidth;=0A=
}=0A=
if (isminh && ch) {=0A=
data.top =3D dh - o.minHeight;=0A=
}=0A=
if (ismaxh && ch) {=0A=
data.top =3D dh - o.maxHeight;=0A=
}=0A=
=0A=
// fixing jump error on top/left - bug #2330=0A=
if (!data.width && !data.height && !data.left && data.top) {=0A=
data.top =3D null;=0A=
} else if (!data.width && !data.height && !data.top && data.left) {=0A=
data.left =3D null;=0A=
}=0A=
=0A=
return data;=0A=
},=0A=
=0A=
_proportionallyResize: function() {=0A=
=0A=
if (!this._proportionallyResizeElements.length) {=0A=
return;=0A=
}=0A=
=0A=
var i, j, borders, paddings, prel,=0A=
element =3D this.helper || this.element;=0A=
=0A=
for ( i=3D0; i < this._proportionallyResizeElements.length; i++) {=0A=
=0A=
prel =3D this._proportionallyResizeElements[i];=0A=
=0A=
if (!this.borderDif) {=0A=
this.borderDif =3D [];=0A=
borders =3D [prel.css("borderTopWidth"), =
prel.css("borderRightWidth"), prel.css("borderBottomWidth"), =
prel.css("borderLeftWidth")];=0A=
paddings =3D [prel.css("paddingTop"), prel.css("paddingRight"), =
prel.css("paddingBottom"), prel.css("paddingLeft")];=0A=
=0A=
for ( j =3D 0; j < borders.length; j++ ) {=0A=
this.borderDif[ j ] =3D ( parseInt( borders[ j ], 10 ) || 0 ) + ( =
parseInt( paddings[ j ], 10 ) || 0 );=0A=
}=0A=
}=0A=
=0A=
prel.css({=0A=
height: (element.height() - this.borderDif[0] - this.borderDif[2]) =
|| 0,=0A=
width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0=0A=
});=0A=
=0A=
}=0A=
=0A=
},=0A=
=0A=
_renderProxy: function() {=0A=
=0A=
var el =3D this.element, o =3D this.options;=0A=
this.elementOffset =3D el.offset();=0A=
=0A=
if(this._helper) {=0A=
=0A=
this.helper =3D this.helper || $("");=0A=
=0A=
this.helper.addClass(this._helper).css({=0A=
width: this.element.outerWidth() - 1,=0A=
height: this.element.outerHeight() - 1,=0A=
position: "absolute",=0A=
left: this.elementOffset.left +"px",=0A=
top: this.elementOffset.top +"px",=0A=
zIndex: ++o.zIndex //TODO: Don't modify option=0A=
});=0A=
=0A=
this.helper=0A=
.appendTo("body")=0A=
.disableSelection();=0A=
=0A=
} else {=0A=
this.helper =3D this.element;=0A=
}=0A=
=0A=
},=0A=
=0A=
_change: {=0A=
e: function(event, dx) {=0A=
return { width: this.originalSize.width + dx };=0A=
},=0A=
w: function(event, dx) {=0A=
var cs =3D this.originalSize, sp =3D this.originalPosition;=0A=
return { left: sp.left + dx, width: cs.width - dx };=0A=
},=0A=
n: function(event, dx, dy) {=0A=
var cs =3D this.originalSize, sp =3D this.originalPosition;=0A=
return { top: sp.top + dy, height: cs.height - dy };=0A=
},=0A=
s: function(event, dx, dy) {=0A=
return { height: this.originalSize.height + dy };=0A=
},=0A=
se: function(event, dx, dy) {=0A=
return $.extend(this._change.s.apply(this, arguments), =
this._change.e.apply(this, [event, dx, dy]));=0A=
},=0A=
sw: function(event, dx, dy) {=0A=
return $.extend(this._change.s.apply(this, arguments), =
this._change.w.apply(this, [event, dx, dy]));=0A=
},=0A=
ne: function(event, dx, dy) {=0A=
return $.extend(this._change.n.apply(this, arguments), =
this._change.e.apply(this, [event, dx, dy]));=0A=
},=0A=
nw: function(event, dx, dy) {=0A=
return $.extend(this._change.n.apply(this, arguments), =
this._change.w.apply(this, [event, dx, dy]));=0A=
}=0A=
},=0A=
=0A=
_propagate: function(n, event) {=0A=
$.ui.plugin.call(this, n, [event, this.ui()]);=0A=
(n !=3D=3D "resize" && this._trigger(n, event, this.ui()));=0A=
},=0A=
=0A=
plugins: {},=0A=
=0A=
ui: function() {=0A=
return {=0A=
originalElement: this.originalElement,=0A=
element: this.element,=0A=
helper: this.helper,=0A=
position: this.position,=0A=
size: this.size,=0A=
originalSize: this.originalSize,=0A=
originalPosition: this.originalPosition=0A=
};=0A=
}=0A=
=0A=
});=0A=
=0A=
/*=0A=
* Resizable Extensions=0A=
*/=0A=
=0A=
$.ui.plugin.add("resizable", "animate", {=0A=
=0A=
stop: function( event ) {=0A=
var that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
pr =3D that._proportionallyResizeElements,=0A=
ista =3D pr.length && (/textarea/i).test(pr[0].nodeName),=0A=
soffseth =3D ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump =
height */ ? 0 : that.sizeDiff.height,=0A=
soffsetw =3D ista ? 0 : that.sizeDiff.width,=0A=
style =3D { width: (that.size.width - soffsetw), height: =
(that.size.height - soffseth) },=0A=
left =3D (parseInt(that.element.css("left"), 10) + =
(that.position.left - that.originalPosition.left)) || null,=0A=
top =3D (parseInt(that.element.css("top"), 10) + (that.position.top - =
that.originalPosition.top)) || null;=0A=
=0A=
that.element.animate(=0A=
$.extend(style, top && left ? { top: top, left: left } : {}), {=0A=
duration: o.animateDuration,=0A=
easing: o.animateEasing,=0A=
step: function() {=0A=
=0A=
var data =3D {=0A=
width: parseInt(that.element.css("width"), 10),=0A=
height: parseInt(that.element.css("height"), 10),=0A=
top: parseInt(that.element.css("top"), 10),=0A=
left: parseInt(that.element.css("left"), 10)=0A=
};=0A=
=0A=
if (pr && pr.length) {=0A=
$(pr[0]).css({ width: data.width, height: data.height });=0A=
}=0A=
=0A=
// propagating resize, and updating values for each animation step=0A=
that._updateCache(data);=0A=
that._propagate("resize", event);=0A=
=0A=
}=0A=
}=0A=
);=0A=
}=0A=
=0A=
});=0A=
=0A=
$.ui.plugin.add("resizable", "containment", {=0A=
=0A=
start: function() {=0A=
var element, p, co, ch, cw, width, height,=0A=
that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
el =3D that.element,=0A=
oc =3D o.containment,=0A=
ce =3D (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? =
el.parent().get(0) : oc;=0A=
=0A=
if (!ce) {=0A=
return;=0A=
}=0A=
=0A=
that.containerElement =3D $(ce);=0A=
=0A=
if (/document/.test(oc) || oc =3D=3D=3D document) {=0A=
that.containerOffset =3D { left: 0, top: 0 };=0A=
that.containerPosition =3D { left: 0, top: 0 };=0A=
=0A=
that.parentData =3D {=0A=
element: $(document), left: 0, top: 0,=0A=
width: $(document).width(), height: $(document).height() || =
document.body.parentNode.scrollHeight=0A=
};=0A=
}=0A=
=0A=
// i'm a node, so compute top, left, right, bottom=0A=
else {=0A=
element =3D $(ce);=0A=
p =3D [];=0A=
$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] =
=3D num(element.css("padding" + name)); });=0A=
=0A=
that.containerOffset =3D element.offset();=0A=
that.containerPosition =3D element.position();=0A=
that.containerSize =3D { height: (element.innerHeight() - p[3]), =
width: (element.innerWidth() - p[1]) };=0A=
=0A=
co =3D that.containerOffset;=0A=
ch =3D that.containerSize.height;=0A=
cw =3D that.containerSize.width;=0A=
width =3D ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );=0A=
height =3D ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);=0A=
=0A=
that.parentData =3D {=0A=
element: ce, left: co.left, top: co.top, width: width, height: height=0A=
};=0A=
}=0A=
},=0A=
=0A=
resize: function( event ) {=0A=
var woset, hoset, isParent, isOffsetRelative,=0A=
that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
co =3D that.containerOffset, cp =3D that.position,=0A=
pRatio =3D that._aspectRatio || event.shiftKey,=0A=
cop =3D { top:0, left:0 }, ce =3D that.containerElement;=0A=
=0A=
if (ce[0] !=3D=3D document && (/static/).test(ce.css("position"))) {=0A=
cop =3D co;=0A=
}=0A=
=0A=
if (cp.left < (that._helper ? co.left : 0)) {=0A=
that.size.width =3D that.size.width + (that._helper ? =
(that.position.left - co.left) : (that.position.left - cop.left));=0A=
if (pRatio) {=0A=
that.size.height =3D that.size.width / that.aspectRatio;=0A=
}=0A=
that.position.left =3D o.helper ? co.left : 0;=0A=
}=0A=
=0A=
if (cp.top < (that._helper ? co.top : 0)) {=0A=
that.size.height =3D that.size.height + (that._helper ? =
(that.position.top - co.top) : that.position.top);=0A=
if (pRatio) {=0A=
that.size.width =3D that.size.height * that.aspectRatio;=0A=
}=0A=
that.position.top =3D that._helper ? co.top : 0;=0A=
}=0A=
=0A=
that.offset.left =3D that.parentData.left+that.position.left;=0A=
that.offset.top =3D that.parentData.top+that.position.top;=0A=
=0A=
woset =3D Math.abs( (that._helper ? that.offset.left - cop.left : =
(that.offset.left - cop.left)) + that.sizeDiff.width );=0A=
hoset =3D Math.abs( (that._helper ? that.offset.top - cop.top : =
(that.offset.top - co.top)) + that.sizeDiff.height );=0A=
=0A=
isParent =3D that.containerElement.get(0) =3D=3D=3D =
that.element.parent().get(0);=0A=
isOffsetRelative =3D =
/relative|absolute/.test(that.containerElement.css("position"));=0A=
=0A=
if ( isParent && isOffsetRelative ) {=0A=
woset -=3D Math.abs( that.parentData.left );=0A=
}=0A=
=0A=
if (woset + that.size.width >=3D that.parentData.width) {=0A=
that.size.width =3D that.parentData.width - woset;=0A=
if (pRatio) {=0A=
that.size.height =3D that.size.width / that.aspectRatio;=0A=
}=0A=
}=0A=
=0A=
if (hoset + that.size.height >=3D that.parentData.height) {=0A=
that.size.height =3D that.parentData.height - hoset;=0A=
if (pRatio) {=0A=
that.size.width =3D that.size.height * that.aspectRatio;=0A=
}=0A=
}=0A=
},=0A=
=0A=
stop: function(){=0A=
var that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
co =3D that.containerOffset,=0A=
cop =3D that.containerPosition,=0A=
ce =3D that.containerElement,=0A=
helper =3D $(that.helper),=0A=
ho =3D helper.offset(),=0A=
w =3D helper.outerWidth() - that.sizeDiff.width,=0A=
h =3D helper.outerHeight() - that.sizeDiff.height;=0A=
=0A=
if (that._helper && !o.animate && =
(/relative/).test(ce.css("position"))) {=0A=
$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h =
});=0A=
}=0A=
=0A=
if (that._helper && !o.animate && (/static/).test(ce.css("position"))) =
{=0A=
$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h =
});=0A=
}=0A=
=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("resizable", "alsoResize", {=0A=
=0A=
start: function () {=0A=
var that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
_store =3D function (exp) {=0A=
$(exp).each(function() {=0A=
var el =3D $(this);=0A=
el.data("ui-resizable-alsoresize", {=0A=
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),=0A=
left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), =
10)=0A=
});=0A=
});=0A=
};=0A=
=0A=
if (typeof(o.alsoResize) =3D=3D=3D "object" && =
!o.alsoResize.parentNode) {=0A=
if (o.alsoResize.length) { o.alsoResize =3D o.alsoResize[0]; =
_store(o.alsoResize); }=0A=
else { $.each(o.alsoResize, function (exp) { _store(exp); }); }=0A=
}else{=0A=
_store(o.alsoResize);=0A=
}=0A=
},=0A=
=0A=
resize: function (event, ui) {=0A=
var that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
os =3D that.originalSize,=0A=
op =3D that.originalPosition,=0A=
delta =3D {=0A=
height: (that.size.height - os.height) || 0, width: (that.size.width =
- os.width) || 0,=0A=
top: (that.position.top - op.top) || 0, left: (that.position.left - =
op.left) || 0=0A=
},=0A=
=0A=
_alsoResize =3D function (exp, c) {=0A=
$(exp).each(function() {=0A=
var el =3D $(this), start =3D =
$(this).data("ui-resizable-alsoresize"), style =3D {},=0A=
css =3D c && c.length ? c : =
el.parents(ui.originalElement[0]).length ? ["width", "height"] : =
["width", "height", "top", "left"];=0A=
=0A=
$.each(css, function (i, prop) {=0A=
var sum =3D (start[prop]||0) + (delta[prop]||0);=0A=
if (sum && sum >=3D 0) {=0A=
style[prop] =3D sum || null;=0A=
}=0A=
});=0A=
=0A=
el.css(style);=0A=
});=0A=
};=0A=
=0A=
if (typeof(o.alsoResize) =3D=3D=3D "object" && !o.alsoResize.nodeType) =
{=0A=
$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });=0A=
}else{=0A=
_alsoResize(o.alsoResize);=0A=
}=0A=
},=0A=
=0A=
stop: function () {=0A=
$(this).removeData("resizable-alsoresize");=0A=
}=0A=
});=0A=
=0A=
$.ui.plugin.add("resizable", "ghost", {=0A=
=0A=
start: function() {=0A=
=0A=
var that =3D $(this).data("ui-resizable"), o =3D that.options, cs =3D =
that.size;=0A=
=0A=
that.ghost =3D that.originalElement.clone();=0A=
that.ghost=0A=
.css({ opacity: 0.25, display: "block", position: "relative", height: =
cs.height, width: cs.width, margin: 0, left: 0, top: 0 })=0A=
.addClass("ui-resizable-ghost")=0A=
.addClass(typeof o.ghost =3D=3D=3D "string" ? o.ghost : "");=0A=
=0A=
that.ghost.appendTo(that.helper);=0A=
=0A=
},=0A=
=0A=
resize: function(){=0A=
var that =3D $(this).data("ui-resizable");=0A=
if (that.ghost) {=0A=
that.ghost.css({ position: "relative", height: that.size.height, =
width: that.size.width });=0A=
}=0A=
},=0A=
=0A=
stop: function() {=0A=
var that =3D $(this).data("ui-resizable");=0A=
if (that.ghost && that.helper) {=0A=
that.helper.get(0).removeChild(that.ghost.get(0));=0A=
}=0A=
}=0A=
=0A=
});=0A=
=0A=
$.ui.plugin.add("resizable", "grid", {=0A=
=0A=
resize: function() {=0A=
var that =3D $(this).data("ui-resizable"),=0A=
o =3D that.options,=0A=
cs =3D that.size,=0A=
os =3D that.originalSize,=0A=
op =3D that.originalPosition,=0A=
a =3D that.axis,=0A=
grid =3D typeof o.grid =3D=3D=3D "number" ? [o.grid, o.grid] : o.grid,=0A=
gridX =3D (grid[0]||1),=0A=
gridY =3D (grid[1]||1),=0A=
ox =3D Math.round((cs.width - os.width) / gridX) * gridX,=0A=
oy =3D Math.round((cs.height - os.height) / gridY) * gridY,=0A=
newWidth =3D os.width + ox,=0A=
newHeight =3D os.height + oy,=0A=
isMaxWidth =3D o.maxWidth && (o.maxWidth < newWidth),=0A=
isMaxHeight =3D o.maxHeight && (o.maxHeight < newHeight),=0A=
isMinWidth =3D o.minWidth && (o.minWidth > newWidth),=0A=
isMinHeight =3D o.minHeight && (o.minHeight > newHeight);=0A=
=0A=
o.grid =3D grid;=0A=
=0A=
if (isMinWidth) {=0A=
newWidth =3D newWidth + gridX;=0A=
}=0A=
if (isMinHeight) {=0A=
newHeight =3D newHeight + gridY;=0A=
}=0A=
if (isMaxWidth) {=0A=
newWidth =3D newWidth - gridX;=0A=
}=0A=
if (isMaxHeight) {=0A=
newHeight =3D newHeight - gridY;=0A=
}=0A=
=0A=
if (/^(se|s|e)$/.test(a)) {=0A=
that.size.width =3D newWidth;=0A=
that.size.height =3D newHeight;=0A=
} else if (/^(ne)$/.test(a)) {=0A=
that.size.width =3D newWidth;=0A=
that.size.height =3D newHeight;=0A=
that.position.top =3D op.top - oy;=0A=
} else if (/^(sw)$/.test(a)) {=0A=
that.size.width =3D newWidth;=0A=
that.size.height =3D newHeight;=0A=
that.position.left =3D op.left - ox;=0A=
} else {=0A=
if ( newHeight - gridY > 0 ) {=0A=
that.size.height =3D newHeight;=0A=
that.position.top =3D op.top - oy;=0A=
} else {=0A=
that.size.height =3D gridY;=0A=
that.position.top =3D op.top + os.height - gridY;=0A=
}=0A=
if ( newWidth - gridX > 0 ) {=0A=
that.size.width =3D newWidth;=0A=
that.position.left =3D op.left - ox;=0A=
} else {=0A=
that.size.width =3D gridX;=0A=
that.position.left =3D op.left + os.width - gridX;=0A=
}=0A=
}=0A=
}=0A=
=0A=
});=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
$.widget("ui.selectable", $.ui.mouse, {=0A=
version: "1.10.4",=0A=
options: {=0A=
appendTo: "body",=0A=
autoRefresh: true,=0A=
distance: 0,=0A=
filter: "*",=0A=
tolerance: "touch",=0A=
=0A=
// callbacks=0A=
selected: null,=0A=
selecting: null,=0A=
start: null,=0A=
stop: null,=0A=
unselected: null,=0A=
unselecting: null=0A=
},=0A=
_create: function() {=0A=
var selectees,=0A=
that =3D this;=0A=
=0A=
this.element.addClass("ui-selectable");=0A=
=0A=
this.dragged =3D false;=0A=
=0A=
// cache selectee children based on filter=0A=
this.refresh =3D function() {=0A=
selectees =3D $(that.options.filter, that.element[0]);=0A=
selectees.addClass("ui-selectee");=0A=
selectees.each(function() {=0A=
var $this =3D $(this),=0A=
pos =3D $this.offset();=0A=
$.data(this, "selectable-item", {=0A=
element: this,=0A=
$element: $this,=0A=
left: pos.left,=0A=
top: pos.top,=0A=
right: pos.left + $this.outerWidth(),=0A=
bottom: pos.top + $this.outerHeight(),=0A=
startselected: false,=0A=
selected: $this.hasClass("ui-selected"),=0A=
selecting: $this.hasClass("ui-selecting"),=0A=
unselecting: $this.hasClass("ui-unselecting")=0A=
});=0A=
});=0A=
};=0A=
this.refresh();=0A=
=0A=
this.selectees =3D selectees.addClass("ui-selectee");=0A=
=0A=
this._mouseInit();=0A=
=0A=
this.helper =3D $("");=0A=
},=0A=
=0A=
_destroy: function() {=0A=
this.selectees=0A=
.removeClass("ui-selectee")=0A=
.removeData("selectable-item");=0A=
this.element=0A=
.removeClass("ui-selectable ui-selectable-disabled");=0A=
this._mouseDestroy();=0A=
},=0A=
=0A=
_mouseStart: function(event) {=0A=
var that =3D this,=0A=
options =3D this.options;=0A=
=0A=
this.opos =3D [event.pageX, event.pageY];=0A=
=0A=
if (this.options.disabled) {=0A=
return;=0A=
}=0A=
=0A=
this.selectees =3D $(options.filter, this.element[0]);=0A=
=0A=
this._trigger("start", event);=0A=
=0A=
$(options.appendTo).append(this.helper);=0A=
// position helper (lasso)=0A=
this.helper.css({=0A=
"left": event.pageX,=0A=
"top": event.pageY,=0A=
"width": 0,=0A=
"height": 0=0A=
});=0A=
=0A=
if (options.autoRefresh) {=0A=
this.refresh();=0A=
}=0A=
=0A=
this.selectees.filter(".ui-selected").each(function() {=0A=
var selectee =3D $.data(this, "selectable-item");=0A=
selectee.startselected =3D true;=0A=
if (!event.metaKey && !event.ctrlKey) {=0A=
selectee.$element.removeClass("ui-selected");=0A=
selectee.selected =3D false;=0A=
selectee.$element.addClass("ui-unselecting");=0A=
selectee.unselecting =3D true;=0A=
// selectable UNSELECTING callback=0A=
that._trigger("unselecting", event, {=0A=
unselecting: selectee.element=0A=
});=0A=
}=0A=
});=0A=
=0A=
$(event.target).parents().addBack().each(function() {=0A=
var doSelect,=0A=
selectee =3D $.data(this, "selectable-item");=0A=
if (selectee) {=0A=
doSelect =3D (!event.metaKey && !event.ctrlKey) || =
!selectee.$element.hasClass("ui-selected");=0A=
selectee.$element=0A=
.removeClass(doSelect ? "ui-unselecting" : "ui-selected")=0A=
.addClass(doSelect ? "ui-selecting" : "ui-unselecting");=0A=
selectee.unselecting =3D !doSelect;=0A=
selectee.selecting =3D doSelect;=0A=
selectee.selected =3D doSelect;=0A=
// selectable (UN)SELECTING callback=0A=
if (doSelect) {=0A=
that._trigger("selecting", event, {=0A=
selecting: selectee.element=0A=
});=0A=
} else {=0A=
that._trigger("unselecting", event, {=0A=
unselecting: selectee.element=0A=
});=0A=
}=0A=
return false;=0A=
}=0A=
});=0A=
=0A=
},=0A=
=0A=
_mouseDrag: function(event) {=0A=
=0A=
this.dragged =3D true;=0A=
=0A=
if (this.options.disabled) {=0A=
return;=0A=
}=0A=
=0A=
var tmp,=0A=
that =3D this,=0A=
options =3D this.options,=0A=
x1 =3D this.opos[0],=0A=
y1 =3D this.opos[1],=0A=
x2 =3D event.pageX,=0A=
y2 =3D event.pageY;=0A=
=0A=
if (x1 > x2) { tmp =3D x2; x2 =3D x1; x1 =3D tmp; }=0A=
if (y1 > y2) { tmp =3D y2; y2 =3D y1; y1 =3D tmp; }=0A=
this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});=0A=
=0A=
this.selectees.each(function() {=0A=
var selectee =3D $.data(this, "selectable-item"),=0A=
hit =3D false;=0A=
=0A=
//prevent helper from being selected if appendTo: selectable=0A=
if (!selectee || selectee.element =3D=3D=3D that.element[0]) {=0A=
return;=0A=
}=0A=
=0A=
if (options.tolerance =3D=3D=3D "touch") {=0A=
hit =3D ( !(selectee.left > x2 || selectee.right < x1 || =
selectee.top > y2 || selectee.bottom < y1) );=0A=
} else if (options.tolerance =3D=3D=3D "fit") {=0A=
hit =3D (selectee.left > x1 && selectee.right < x2 && selectee.top > =
y1 && selectee.bottom < y2);=0A=
}=0A=
=0A=
if (hit) {=0A=
// SELECT=0A=
if (selectee.selected) {=0A=
selectee.$element.removeClass("ui-selected");=0A=
selectee.selected =3D false;=0A=
}=0A=
if (selectee.unselecting) {=0A=
selectee.$element.removeClass("ui-unselecting");=0A=
selectee.unselecting =3D false;=0A=
}=0A=
if (!selectee.selecting) {=0A=
selectee.$element.addClass("ui-selecting");=0A=
selectee.selecting =3D true;=0A=
// selectable SELECTING callback=0A=
that._trigger("selecting", event, {=0A=
selecting: selectee.element=0A=
});=0A=
}=0A=
} else {=0A=
// UNSELECT=0A=
if (selectee.selecting) {=0A=
if ((event.metaKey || event.ctrlKey) && selectee.startselected) {=0A=
selectee.$element.removeClass("ui-selecting");=0A=
selectee.selecting =3D false;=0A=
selectee.$element.addClass("ui-selected");=0A=
selectee.selected =3D true;=0A=
} else {=0A=
selectee.$element.removeClass("ui-selecting");=0A=
selectee.selecting =3D false;=0A=
if (selectee.startselected) {=0A=
selectee.$element.addClass("ui-unselecting");=0A=
selectee.unselecting =3D true;=0A=
}=0A=
// selectable UNSELECTING callback=0A=
that._trigger("unselecting", event, {=0A=
unselecting: selectee.element=0A=
});=0A=
}=0A=
}=0A=
if (selectee.selected) {=0A=
if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {=0A=
selectee.$element.removeClass("ui-selected");=0A=
selectee.selected =3D false;=0A=
=0A=
selectee.$element.addClass("ui-unselecting");=0A=
selectee.unselecting =3D true;=0A=
// selectable UNSELECTING callback=0A=
that._trigger("unselecting", event, {=0A=
unselecting: selectee.element=0A=
});=0A=
}=0A=
}=0A=
}=0A=
});=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_mouseStop: function(event) {=0A=
var that =3D this;=0A=
=0A=
this.dragged =3D false;=0A=
=0A=
$(".ui-unselecting", this.element[0]).each(function() {=0A=
var selectee =3D $.data(this, "selectable-item");=0A=
selectee.$element.removeClass("ui-unselecting");=0A=
selectee.unselecting =3D false;=0A=
selectee.startselected =3D false;=0A=
that._trigger("unselected", event, {=0A=
unselected: selectee.element=0A=
});=0A=
});=0A=
$(".ui-selecting", this.element[0]).each(function() {=0A=
var selectee =3D $.data(this, "selectable-item");=0A=
selectee.$element.removeClass("ui-selecting").addClass("ui-selected");=0A=
selectee.selecting =3D false;=0A=
selectee.selected =3D true;=0A=
selectee.startselected =3D true;=0A=
that._trigger("selected", event, {=0A=
selected: selectee.element=0A=
});=0A=
});=0A=
this._trigger("stop", event);=0A=
=0A=
this.helper.remove();=0A=
=0A=
return false;=0A=
}=0A=
=0A=
});=0A=
=0A=
})(jQuery);=0A=
(function( $, undefined ) {=0A=
=0A=
// number of pages in a slider=0A=
// (how many times can you page up/down to go through the whole range)=0A=
var numPages =3D 5;=0A=
=0A=
$.widget( "ui.slider", $.ui.mouse, {=0A=
version: "1.10.4",=0A=
widgetEventPrefix: "slide",=0A=
=0A=
options: {=0A=
animate: false,=0A=
distance: 0,=0A=
max: 100,=0A=
min: 0,=0A=
orientation: "horizontal",=0A=
range: false,=0A=
step: 1,=0A=
value: 0,=0A=
values: null,=0A=
=0A=
// callbacks=0A=
change: null,=0A=
slide: null,=0A=
start: null,=0A=
stop: null=0A=
},=0A=
=0A=
_create: function() {=0A=
this._keySliding =3D false;=0A=
this._mouseSliding =3D false;=0A=
this._animateOff =3D true;=0A=
this._handleIndex =3D null;=0A=
this._detectOrientation();=0A=
this._mouseInit();=0A=
=0A=
this.element=0A=
.addClass( "ui-slider" +=0A=
" ui-slider-" + this.orientation +=0A=
" ui-widget" +=0A=
" ui-widget-content" +=0A=
" ui-corner-all");=0A=
=0A=
this._refresh();=0A=
this._setOption( "disabled", this.options.disabled );=0A=
=0A=
this._animateOff =3D false;=0A=
},=0A=
=0A=
_refresh: function() {=0A=
this._createRange();=0A=
this._createHandles();=0A=
this._setupEvents();=0A=
this._refreshValue();=0A=
},=0A=
=0A=
_createHandles: function() {=0A=
var i, handleCount,=0A=
options =3D this.options,=0A=
existingHandles =3D this.element.find( ".ui-slider-handle" =
).addClass( "ui-state-default ui-corner-all" ),=0A=
handle =3D "",=0A=
handles =3D [];=0A=
=0A=
handleCount =3D ( options.values && options.values.length ) || 1;=0A=
=0A=
if ( existingHandles.length > handleCount ) {=0A=
existingHandles.slice( handleCount ).remove();=0A=
existingHandles =3D existingHandles.slice( 0, handleCount );=0A=
}=0A=
=0A=
for ( i =3D existingHandles.length; i < handleCount; i++ ) {=0A=
handles.push( handle );=0A=
}=0A=
=0A=
this.handles =3D existingHandles.add( $( handles.join( "" ) =
).appendTo( this.element ) );=0A=
=0A=
this.handle =3D this.handles.eq( 0 );=0A=
=0A=
this.handles.each(function( i ) {=0A=
$( this ).data( "ui-slider-handle-index", i );=0A=
});=0A=
},=0A=
=0A=
_createRange: function() {=0A=
var options =3D this.options,=0A=
classes =3D "";=0A=
=0A=
if ( options.range ) {=0A=
if ( options.range =3D=3D=3D true ) {=0A=
if ( !options.values ) {=0A=
options.values =3D [ this._valueMin(), this._valueMin() ];=0A=
} else if ( options.values.length && options.values.length !=3D=3D 2 =
) {=0A=
options.values =3D [ options.values[0], options.values[0] ];=0A=
} else if ( $.isArray( options.values ) ) {=0A=
options.values =3D options.values.slice(0);=0A=
}=0A=
}=0A=
=0A=
if ( !this.range || !this.range.length ) {=0A=
this.range =3D $( "" )=0A=
.appendTo( this.element );=0A=
=0A=
classes =3D "ui-slider-range" +=0A=
// note: this isn't the most fittingly semantic framework class for =
this element,=0A=
// but worked best visually with a variety of themes=0A=
" ui-widget-header ui-corner-all";=0A=
} else {=0A=
this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )=0A=
// Handle range switching from true to min/max=0A=
.css({=0A=
"left": "",=0A=
"bottom": ""=0A=
});=0A=
}=0A=
=0A=
this.range.addClass( classes +=0A=
( ( options.range =3D=3D=3D "min" || options.range =3D=3D=3D "max" ) =
? " ui-slider-range-" + options.range : "" ) );=0A=
} else {=0A=
if ( this.range ) {=0A=
this.range.remove();=0A=
}=0A=
this.range =3D null;=0A=
}=0A=
},=0A=
=0A=
_setupEvents: function() {=0A=
var elements =3D this.handles.add( this.range ).filter( "a" );=0A=
this._off( elements );=0A=
this._on( elements, this._handleEvents );=0A=
this._hoverable( elements );=0A=
this._focusable( elements );=0A=
},=0A=
=0A=
_destroy: function() {=0A=
this.handles.remove();=0A=
if ( this.range ) {=0A=
this.range.remove();=0A=
}=0A=
=0A=
this.element=0A=
.removeClass( "ui-slider" +=0A=
" ui-slider-horizontal" +=0A=
" ui-slider-vertical" +=0A=
" ui-widget" +=0A=
" ui-widget-content" +=0A=
" ui-corner-all" );=0A=
=0A=
this._mouseDestroy();=0A=
},=0A=
=0A=
_mouseCapture: function( event ) {=0A=
var position, normValue, distance, closestHandle, index, allowed, =
offset, mouseOverHandle,=0A=
that =3D this,=0A=
o =3D this.options;=0A=
=0A=
if ( o.disabled ) {=0A=
return false;=0A=
}=0A=
=0A=
this.elementSize =3D {=0A=
width: this.element.outerWidth(),=0A=
height: this.element.outerHeight()=0A=
};=0A=
this.elementOffset =3D this.element.offset();=0A=
=0A=
position =3D { x: event.pageX, y: event.pageY };=0A=
normValue =3D this._normValueFromMouse( position );=0A=
distance =3D this._valueMax() - this._valueMin() + 1;=0A=
this.handles.each(function( i ) {=0A=
var thisDistance =3D Math.abs( normValue - that.values(i) );=0A=
if (( distance > thisDistance ) ||=0A=
( distance =3D=3D=3D thisDistance &&=0A=
(i =3D=3D=3D that._lastChangedValue || that.values(i) =3D=3D=3D =
o.min ))) {=0A=
distance =3D thisDistance;=0A=
closestHandle =3D $( this );=0A=
index =3D i;=0A=
}=0A=
});=0A=
=0A=
allowed =3D this._start( event, index );=0A=
if ( allowed =3D=3D=3D false ) {=0A=
return false;=0A=
}=0A=
this._mouseSliding =3D true;=0A=
=0A=
this._handleIndex =3D index;=0A=
=0A=
closestHandle=0A=
.addClass( "ui-state-active" )=0A=
.focus();=0A=
=0A=
offset =3D closestHandle.offset();=0A=
mouseOverHandle =3D !$( event.target ).parents().addBack().is( =
".ui-slider-handle" );=0A=
this._clickOffset =3D mouseOverHandle ? { left: 0, top: 0 } : {=0A=
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),=0A=
top: event.pageY - offset.top -=0A=
( closestHandle.height() / 2 ) -=0A=
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -=0A=
( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +=0A=
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)=0A=
};=0A=
=0A=
if ( !this.handles.hasClass( "ui-state-hover" ) ) {=0A=
this._slide( event, index, normValue );=0A=
}=0A=
this._animateOff =3D true;=0A=
return true;=0A=
},=0A=
=0A=
_mouseStart: function() {=0A=
return true;=0A=
},=0A=
=0A=
_mouseDrag: function( event ) {=0A=
var position =3D { x: event.pageX, y: event.pageY },=0A=
normValue =3D this._normValueFromMouse( position );=0A=
=0A=
this._slide( event, this._handleIndex, normValue );=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_mouseStop: function( event ) {=0A=
this.handles.removeClass( "ui-state-active" );=0A=
this._mouseSliding =3D false;=0A=
=0A=
this._stop( event, this._handleIndex );=0A=
this._change( event, this._handleIndex );=0A=
=0A=
this._handleIndex =3D null;=0A=
this._clickOffset =3D null;=0A=
this._animateOff =3D false;=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_detectOrientation: function() {=0A=
this.orientation =3D ( this.options.orientation =3D=3D=3D "vertical" ) =
? "vertical" : "horizontal";=0A=
},=0A=
=0A=
_normValueFromMouse: function( position ) {=0A=
var pixelTotal,=0A=
pixelMouse,=0A=
percentMouse,=0A=
valueTotal,=0A=
valueMouse;=0A=
=0A=
if ( this.orientation =3D=3D=3D "horizontal" ) {=0A=
pixelTotal =3D this.elementSize.width;=0A=
pixelMouse =3D position.x - this.elementOffset.left - ( =
this._clickOffset ? this._clickOffset.left : 0 );=0A=
} else {=0A=
pixelTotal =3D this.elementSize.height;=0A=
pixelMouse =3D position.y - this.elementOffset.top - ( =
this._clickOffset ? this._clickOffset.top : 0 );=0A=
}=0A=
=0A=
percentMouse =3D ( pixelMouse / pixelTotal );=0A=
if ( percentMouse > 1 ) {=0A=
percentMouse =3D 1;=0A=
}=0A=
if ( percentMouse < 0 ) {=0A=
percentMouse =3D 0;=0A=
}=0A=
if ( this.orientation =3D=3D=3D "vertical" ) {=0A=
percentMouse =3D 1 - percentMouse;=0A=
}=0A=
=0A=
valueTotal =3D this._valueMax() - this._valueMin();=0A=
valueMouse =3D this._valueMin() + percentMouse * valueTotal;=0A=
=0A=
return this._trimAlignValue( valueMouse );=0A=
},=0A=
=0A=
_start: function( event, index ) {=0A=
var uiHash =3D {=0A=
handle: this.handles[ index ],=0A=
value: this.value()=0A=
};=0A=
if ( this.options.values && this.options.values.length ) {=0A=
uiHash.value =3D this.values( index );=0A=
uiHash.values =3D this.values();=0A=
}=0A=
return this._trigger( "start", event, uiHash );=0A=
},=0A=
=0A=
_slide: function( event, index, newVal ) {=0A=
var otherVal,=0A=
newValues,=0A=
allowed;=0A=
=0A=
if ( this.options.values && this.options.values.length ) {=0A=
otherVal =3D this.values( index ? 0 : 1 );=0A=
=0A=
if ( ( this.options.values.length =3D=3D=3D 2 && this.options.range =
=3D=3D=3D true ) &&=0A=
( ( index =3D=3D=3D 0 && newVal > otherVal) || ( index =3D=3D=3D 1 =
&& newVal < otherVal ) )=0A=
) {=0A=
newVal =3D otherVal;=0A=
}=0A=
=0A=
if ( newVal !=3D=3D this.values( index ) ) {=0A=
newValues =3D this.values();=0A=
newValues[ index ] =3D newVal;=0A=
// A slide can be canceled by returning false from the slide callback=0A=
allowed =3D this._trigger( "slide", event, {=0A=
handle: this.handles[ index ],=0A=
value: newVal,=0A=
values: newValues=0A=
} );=0A=
otherVal =3D this.values( index ? 0 : 1 );=0A=
if ( allowed !=3D=3D false ) {=0A=
this.values( index, newVal );=0A=
}=0A=
}=0A=
} else {=0A=
if ( newVal !=3D=3D this.value() ) {=0A=
// A slide can be canceled by returning false from the slide callback=0A=
allowed =3D this._trigger( "slide", event, {=0A=
handle: this.handles[ index ],=0A=
value: newVal=0A=
} );=0A=
if ( allowed !=3D=3D false ) {=0A=
this.value( newVal );=0A=
}=0A=
}=0A=
}=0A=
},=0A=
=0A=
_stop: function( event, index ) {=0A=
var uiHash =3D {=0A=
handle: this.handles[ index ],=0A=
value: this.value()=0A=
};=0A=
if ( this.options.values && this.options.values.length ) {=0A=
uiHash.value =3D this.values( index );=0A=
uiHash.values =3D this.values();=0A=
}=0A=
=0A=
this._trigger( "stop", event, uiHash );=0A=
},=0A=
=0A=
_change: function( event, index ) {=0A=
if ( !this._keySliding && !this._mouseSliding ) {=0A=
var uiHash =3D {=0A=
handle: this.handles[ index ],=0A=
value: this.value()=0A=
};=0A=
if ( this.options.values && this.options.values.length ) {=0A=
uiHash.value =3D this.values( index );=0A=
uiHash.values =3D this.values();=0A=
}=0A=
=0A=
//store the last changed value index for reference when handles =
overlap=0A=
this._lastChangedValue =3D index;=0A=
=0A=
this._trigger( "change", event, uiHash );=0A=
}=0A=
},=0A=
=0A=
value: function( newValue ) {=0A=
if ( arguments.length ) {=0A=
this.options.value =3D this._trimAlignValue( newValue );=0A=
this._refreshValue();=0A=
this._change( null, 0 );=0A=
return;=0A=
}=0A=
=0A=
return this._value();=0A=
},=0A=
=0A=
values: function( index, newValue ) {=0A=
var vals,=0A=
newValues,=0A=
i;=0A=
=0A=
if ( arguments.length > 1 ) {=0A=
this.options.values[ index ] =3D this._trimAlignValue( newValue );=0A=
this._refreshValue();=0A=
this._change( null, index );=0A=
return;=0A=
}=0A=
=0A=
if ( arguments.length ) {=0A=
if ( $.isArray( arguments[ 0 ] ) ) {=0A=
vals =3D this.options.values;=0A=
newValues =3D arguments[ 0 ];=0A=
for ( i =3D 0; i < vals.length; i +=3D 1 ) {=0A=
vals[ i ] =3D this._trimAlignValue( newValues[ i ] );=0A=
this._change( null, i );=0A=
}=0A=
this._refreshValue();=0A=
} else {=0A=
if ( this.options.values && this.options.values.length ) {=0A=
return this._values( index );=0A=
} else {=0A=
return this.value();=0A=
}=0A=
}=0A=
} else {=0A=
return this._values();=0A=
}=0A=
},=0A=
=0A=
_setOption: function( key, value ) {=0A=
var i,=0A=
valsLength =3D 0;=0A=
=0A=
if ( key =3D=3D=3D "range" && this.options.range =3D=3D=3D true ) {=0A=
if ( value =3D=3D=3D "min" ) {=0A=
this.options.value =3D this._values( 0 );=0A=
this.options.values =3D null;=0A=
} else if ( value =3D=3D=3D "max" ) {=0A=
this.options.value =3D this._values( this.options.values.length-1 );=0A=
this.options.values =3D null;=0A=
}=0A=
}=0A=
=0A=
if ( $.isArray( this.options.values ) ) {=0A=
valsLength =3D this.options.values.length;=0A=
}=0A=
=0A=
$.Widget.prototype._setOption.apply( this, arguments );=0A=
=0A=
switch ( key ) {=0A=
case "orientation":=0A=
this._detectOrientation();=0A=
this.element=0A=
.removeClass( "ui-slider-horizontal ui-slider-vertical" )=0A=
.addClass( "ui-slider-" + this.orientation );=0A=
this._refreshValue();=0A=
break;=0A=
case "value":=0A=
this._animateOff =3D true;=0A=
this._refreshValue();=0A=
this._change( null, 0 );=0A=
this._animateOff =3D false;=0A=
break;=0A=
case "values":=0A=
this._animateOff =3D true;=0A=
this._refreshValue();=0A=
for ( i =3D 0; i < valsLength; i +=3D 1 ) {=0A=
this._change( null, i );=0A=
}=0A=
this._animateOff =3D false;=0A=
break;=0A=
case "min":=0A=
case "max":=0A=
this._animateOff =3D true;=0A=
this._refreshValue();=0A=
this._animateOff =3D false;=0A=
break;=0A=
case "range":=0A=
this._animateOff =3D true;=0A=
this._refresh();=0A=
this._animateOff =3D false;=0A=
break;=0A=
}=0A=
},=0A=
=0A=
//internal value getter=0A=
// _value() returns value trimmed by min and max, aligned by step=0A=
_value: function() {=0A=
var val =3D this.options.value;=0A=
val =3D this._trimAlignValue( val );=0A=
=0A=
return val;=0A=
},=0A=
=0A=
//internal values getter=0A=
// _values() returns array of values trimmed by min and max, aligned by =
step=0A=
// _values( index ) returns single value trimmed by min and max, =
aligned by step=0A=
_values: function( index ) {=0A=
var val,=0A=
vals,=0A=
i;=0A=
=0A=
if ( arguments.length ) {=0A=
val =3D this.options.values[ index ];=0A=
val =3D this._trimAlignValue( val );=0A=
=0A=
return val;=0A=
} else if ( this.options.values && this.options.values.length ) {=0A=
// .slice() creates a copy of the array=0A=
// this copy gets trimmed by min and max and then returned=0A=
vals =3D this.options.values.slice();=0A=
for ( i =3D 0; i < vals.length; i+=3D 1) {=0A=
vals[ i ] =3D this._trimAlignValue( vals[ i ] );=0A=
}=0A=
=0A=
return vals;=0A=
} else {=0A=
return [];=0A=
}=0A=
},=0A=
=0A=
// returns the step-aligned value that val is closest to, between =
(inclusive) min and max=0A=
_trimAlignValue: function( val ) {=0A=
if ( val <=3D this._valueMin() ) {=0A=
return this._valueMin();=0A=
}=0A=
if ( val >=3D this._valueMax() ) {=0A=
return this._valueMax();=0A=
}=0A=
var step =3D ( this.options.step > 0 ) ? this.options.step : 1,=0A=
valModStep =3D (val - this._valueMin()) % step,=0A=
alignValue =3D val - valModStep;=0A=
=0A=
if ( Math.abs(valModStep) * 2 >=3D step ) {=0A=
alignValue +=3D ( valModStep > 0 ) ? step : ( -step );=0A=
}=0A=
=0A=
// Since JavaScript has problems with large floats, round=0A=
// the final value to 5 digits after the decimal point (see #4124)=0A=
return parseFloat( alignValue.toFixed(5) );=0A=
},=0A=
=0A=
_valueMin: function() {=0A=
return this.options.min;=0A=
},=0A=
=0A=
_valueMax: function() {=0A=
return this.options.max;=0A=
},=0A=
=0A=
_refreshValue: function() {=0A=
var lastValPercent, valPercent, value, valueMin, valueMax,=0A=
oRange =3D this.options.range,=0A=
o =3D this.options,=0A=
that =3D this,=0A=
animate =3D ( !this._animateOff ) ? o.animate : false,=0A=
_set =3D {};=0A=
=0A=
if ( this.options.values && this.options.values.length ) {=0A=
this.handles.each(function( i ) {=0A=
valPercent =3D ( that.values(i) - that._valueMin() ) / ( =
that._valueMax() - that._valueMin() ) * 100;=0A=
_set[ that.orientation =3D=3D=3D "horizontal" ? "left" : "bottom" ] =
=3D valPercent + "%";=0A=
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, =
o.animate );=0A=
if ( that.options.range =3D=3D=3D true ) {=0A=
if ( that.orientation =3D=3D=3D "horizontal" ) {=0A=
if ( i =3D=3D=3D 0 ) {=0A=
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: =
valPercent + "%" }, o.animate );=0A=
}=0A=
if ( i =3D=3D=3D 1 ) {=0A=
that.range[ animate ? "animate" : "css" ]( { width: ( valPercent =
- lastValPercent ) + "%" }, { queue: false, duration: o.animate } );=0A=
}=0A=
} else {=0A=
if ( i =3D=3D=3D 0 ) {=0A=
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: =
( valPercent ) + "%" }, o.animate );=0A=
}=0A=
if ( i =3D=3D=3D 1 ) {=0A=
that.range[ animate ? "animate" : "css" ]( { height: ( valPercent =
- lastValPercent ) + "%" }, { queue: false, duration: o.animate } );=0A=
}=0A=
}=0A=
}=0A=
lastValPercent =3D valPercent;=0A=
});=0A=
} else {=0A=
value =3D this.value();=0A=
valueMin =3D this._valueMin();=0A=
valueMax =3D this._valueMax();=0A=
valPercent =3D ( valueMax !=3D=3D valueMin ) ?=0A=
( value - valueMin ) / ( valueMax - valueMin ) * 100 :=0A=
0;=0A=
_set[ this.orientation =3D=3D=3D "horizontal" ? "left" : "bottom" ] =
=3D valPercent + "%";=0A=
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, =
o.animate );=0A=
=0A=
if ( oRange =3D=3D=3D "min" && this.orientation =3D=3D=3D =
"horizontal" ) {=0A=
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: =
valPercent + "%" }, o.animate );=0A=
}=0A=
if ( oRange =3D=3D=3D "max" && this.orientation =3D=3D=3D =
"horizontal" ) {=0A=
this.range[ animate ? "animate" : "css" ]( { width: ( 100 - =
valPercent ) + "%" }, { queue: false, duration: o.animate } );=0A=
}=0A=
if ( oRange =3D=3D=3D "min" && this.orientation =3D=3D=3D "vertical" =
) {=0A=
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: =
valPercent + "%" }, o.animate );=0A=
}=0A=
if ( oRange =3D=3D=3D "max" && this.orientation =3D=3D=3D "vertical" =
) {=0A=
this.range[ animate ? "animate" : "css" ]( { height: ( 100 - =
valPercent ) + "%" }, { queue: false, duration: o.animate } );=0A=
}=0A=
}=0A=
},=0A=
=0A=
_handleEvents: {=0A=
keydown: function( event ) {=0A=
var allowed, curVal, newVal, step,=0A=
index =3D $( event.target ).data( "ui-slider-handle-index" );=0A=
=0A=
switch ( event.keyCode ) {=0A=
case $.ui.keyCode.HOME:=0A=
case $.ui.keyCode.END:=0A=
case $.ui.keyCode.PAGE_UP:=0A=
case $.ui.keyCode.PAGE_DOWN:=0A=
case $.ui.keyCode.UP:=0A=
case $.ui.keyCode.RIGHT:=0A=
case $.ui.keyCode.DOWN:=0A=
case $.ui.keyCode.LEFT:=0A=
event.preventDefault();=0A=
if ( !this._keySliding ) {=0A=
this._keySliding =3D true;=0A=
$( event.target ).addClass( "ui-state-active" );=0A=
allowed =3D this._start( event, index );=0A=
if ( allowed =3D=3D=3D false ) {=0A=
return;=0A=
}=0A=
}=0A=
break;=0A=
}=0A=
=0A=
step =3D this.options.step;=0A=
if ( this.options.values && this.options.values.length ) {=0A=
curVal =3D newVal =3D this.values( index );=0A=
} else {=0A=
curVal =3D newVal =3D this.value();=0A=
}=0A=
=0A=
switch ( event.keyCode ) {=0A=
case $.ui.keyCode.HOME:=0A=
newVal =3D this._valueMin();=0A=
break;=0A=
case $.ui.keyCode.END:=0A=
newVal =3D this._valueMax();=0A=
break;=0A=
case $.ui.keyCode.PAGE_UP:=0A=
newVal =3D this._trimAlignValue( curVal + ( (this._valueMax() - =
this._valueMin()) / numPages ) );=0A=
break;=0A=
case $.ui.keyCode.PAGE_DOWN:=0A=
newVal =3D this._trimAlignValue( curVal - ( (this._valueMax() - =
this._valueMin()) / numPages ) );=0A=
break;=0A=
case $.ui.keyCode.UP:=0A=
case $.ui.keyCode.RIGHT:=0A=
if ( curVal =3D=3D=3D this._valueMax() ) {=0A=
return;=0A=
}=0A=
newVal =3D this._trimAlignValue( curVal + step );=0A=
break;=0A=
case $.ui.keyCode.DOWN:=0A=
case $.ui.keyCode.LEFT:=0A=
if ( curVal =3D=3D=3D this._valueMin() ) {=0A=
return;=0A=
}=0A=
newVal =3D this._trimAlignValue( curVal - step );=0A=
break;=0A=
}=0A=
=0A=
this._slide( event, index, newVal );=0A=
},=0A=
click: function( event ) {=0A=
event.preventDefault();=0A=
},=0A=
keyup: function( event ) {=0A=
var index =3D $( event.target ).data( "ui-slider-handle-index" );=0A=
=0A=
if ( this._keySliding ) {=0A=
this._keySliding =3D false;=0A=
this._stop( event, index );=0A=
this._change( event, index );=0A=
$( event.target ).removeClass( "ui-state-active" );=0A=
}=0A=
}=0A=
}=0A=
=0A=
});=0A=
=0A=
}(jQuery));=0A=
(function( $, undefined ) {=0A=
=0A=
function isOverAxis( x, reference, size ) {=0A=
return ( x > reference ) && ( x < ( reference + size ) );=0A=
}=0A=
=0A=
function isFloating(item) {=0A=
return (/left|right/).test(item.css("float")) || =
(/inline|table-cell/).test(item.css("display"));=0A=
}=0A=
=0A=
$.widget("ui.sortable", $.ui.mouse, {=0A=
version: "1.10.4",=0A=
widgetEventPrefix: "sort",=0A=
ready: false,=0A=
options: {=0A=
appendTo: "parent",=0A=
axis: false,=0A=
connectWith: false,=0A=
containment: false,=0A=
cursor: "auto",=0A=
cursorAt: false,=0A=
dropOnEmpty: true,=0A=
forcePlaceholderSize: false,=0A=
forceHelperSize: false,=0A=
grid: false,=0A=
handle: false,=0A=
helper: "original",=0A=
items: "> *",=0A=
opacity: false,=0A=
placeholder: false,=0A=
revert: false,=0A=
scroll: true,=0A=
scrollSensitivity: 20,=0A=
scrollSpeed: 20,=0A=
scope: "default",=0A=
tolerance: "intersect",=0A=
zIndex: 1000,=0A=
=0A=
// callbacks=0A=
activate: null,=0A=
beforeStop: null,=0A=
change: null,=0A=
deactivate: null,=0A=
out: null,=0A=
over: null,=0A=
receive: null,=0A=
remove: null,=0A=
sort: null,=0A=
start: null,=0A=
stop: null,=0A=
update: null=0A=
},=0A=
_create: function() {=0A=
=0A=
var o =3D this.options;=0A=
this.containerCache =3D {};=0A=
this.element.addClass("ui-sortable");=0A=
=0A=
//Get the items=0A=
this.refresh();=0A=
=0A=
//Let's determine if the items are being displayed horizontally=0A=
this.floating =3D this.items.length ? o.axis =3D=3D=3D "x" || =
isFloating(this.items[0].item) : false;=0A=
=0A=
//Let's determine the parent's offset=0A=
this.offset =3D this.element.offset();=0A=
=0A=
//Initialize mouse events for interaction=0A=
this._mouseInit();=0A=
=0A=
//We're ready to go=0A=
this.ready =3D true;=0A=
=0A=
},=0A=
=0A=
_destroy: function() {=0A=
this.element=0A=
.removeClass("ui-sortable ui-sortable-disabled");=0A=
this._mouseDestroy();=0A=
=0A=
for ( var i =3D this.items.length - 1; i >=3D 0; i-- ) {=0A=
this.items[i].item.removeData(this.widgetName + "-item");=0A=
}=0A=
=0A=
return this;=0A=
},=0A=
=0A=
_setOption: function(key, value){=0A=
if ( key =3D=3D=3D "disabled" ) {=0A=
this.options[ key ] =3D value;=0A=
=0A=
this.widget().toggleClass( "ui-sortable-disabled", !!value );=0A=
} else {=0A=
// Don't call widget base _setOption for disable as it adds =
ui-state-disabled class=0A=
$.Widget.prototype._setOption.apply(this, arguments);=0A=
}=0A=
},=0A=
=0A=
_mouseCapture: function(event, overrideHandle) {=0A=
var currentItem =3D null,=0A=
validHandle =3D false,=0A=
that =3D this;=0A=
=0A=
if (this.reverting) {=0A=
return false;=0A=
}=0A=
=0A=
if(this.options.disabled || this.options.type =3D=3D=3D "static") {=0A=
return false;=0A=
}=0A=
=0A=
//We have to refresh the items data once first=0A=
this._refreshItems(event);=0A=
=0A=
//Find out if the clicked node (or one of its parents) is a actual =
item in this.items=0A=
$(event.target).parents().each(function() {=0A=
if($.data(this, that.widgetName + "-item") =3D=3D=3D that) {=0A=
currentItem =3D $(this);=0A=
return false;=0A=
}=0A=
});=0A=
if($.data(event.target, that.widgetName + "-item") =3D=3D=3D that) {=0A=
currentItem =3D $(event.target);=0A=
}=0A=
=0A=
if(!currentItem) {=0A=
return false;=0A=
}=0A=
if(this.options.handle && !overrideHandle) {=0A=
$(this.options.handle, =
currentItem).find("*").addBack().each(function() {=0A=
if(this =3D=3D=3D event.target) {=0A=
validHandle =3D true;=0A=
}=0A=
});=0A=
if(!validHandle) {=0A=
return false;=0A=
}=0A=
}=0A=
=0A=
this.currentItem =3D currentItem;=0A=
this._removeCurrentsFromItems();=0A=
return true;=0A=
=0A=
},=0A=
=0A=
_mouseStart: function(event, overrideHandle, noActivation) {=0A=
=0A=
var i, body,=0A=
o =3D this.options;=0A=
=0A=
this.currentContainer =3D this;=0A=
=0A=
//We only need to call refreshPositions, because the refreshItems call =
has been moved to mouseCapture=0A=
this.refreshPositions();=0A=
=0A=
//Create and append the visible helper=0A=
this.helper =3D this._createHelper(event);=0A=
=0A=
//Cache the helper size=0A=
this._cacheHelperProportions();=0A=
=0A=
/*=0A=
* - Position generation -=0A=
* This block generates everything position related - it's the core of =
draggables.=0A=
*/=0A=
=0A=
//Cache the margins of the original element=0A=
this._cacheMargins();=0A=
=0A=
//Get the next scrolling parent=0A=
this.scrollParent =3D this.helper.scrollParent();=0A=
=0A=
//The element's absolute position on the page minus margins=0A=
this.offset =3D this.currentItem.offset();=0A=
this.offset =3D {=0A=
top: this.offset.top - this.margins.top,=0A=
left: this.offset.left - this.margins.left=0A=
};=0A=
=0A=
$.extend(this.offset, {=0A=
click: { //Where the click happened, relative to the element=0A=
left: event.pageX - this.offset.left,=0A=
top: event.pageY - this.offset.top=0A=
},=0A=
parent: this._getParentOffset(),=0A=
relative: this._getRelativeOffset() //This is a relative to absolute =
position minus the actual position calculation - only used for relative =
positioned helper=0A=
});=0A=
=0A=
// Only after we got the offset, we can change the helper's position =
to absolute=0A=
// TODO: Still need to figure out a way to make relative sorting =
possible=0A=
this.helper.css("position", "absolute");=0A=
this.cssPosition =3D this.helper.css("position");=0A=
=0A=
//Generate the original position=0A=
this.originalPosition =3D this._generatePosition(event);=0A=
this.originalPageX =3D event.pageX;=0A=
this.originalPageY =3D event.pageY;=0A=
=0A=
//Adjust the mouse offset relative to the helper if "cursorAt" is =
supplied=0A=
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));=0A=
=0A=
//Cache the former DOM position=0A=
this.domPosition =3D { prev: this.currentItem.prev()[0], parent: =
this.currentItem.parent()[0] };=0A=
=0A=
//If the helper is not the original, hide the original so it's not =
playing any role during the drag, won't cause anything bad this way=0A=
if(this.helper[0] !=3D=3D this.currentItem[0]) {=0A=
this.currentItem.hide();=0A=
}=0A=
=0A=
//Create the placeholder=0A=
this._createPlaceholder();=0A=
=0A=
//Set a containment if given in the options=0A=
if(o.containment) {=0A=
this._setContainment();=0A=
}=0A=
=0A=
if( o.cursor && o.cursor !=3D=3D "auto" ) { // cursor option=0A=
body =3D this.document.find( "body" );=0A=
=0A=
// support: IE=0A=
this.storedCursor =3D body.css( "cursor" );=0A=
body.css( "cursor", o.cursor );=0A=
=0A=
this.storedStylesheet =3D $( "" ).appendTo( body );=0A=
}=0A=
=0A=
if(o.opacity) { // opacity option=0A=
if (this.helper.css("opacity")) {=0A=
this._storedOpacity =3D this.helper.css("opacity");=0A=
}=0A=
this.helper.css("opacity", o.opacity);=0A=
}=0A=
=0A=
if(o.zIndex) { // zIndex option=0A=
if (this.helper.css("zIndex")) {=0A=
this._storedZIndex =3D this.helper.css("zIndex");=0A=
}=0A=
this.helper.css("zIndex", o.zIndex);=0A=
}=0A=
=0A=
//Prepare scrolling=0A=
if(this.scrollParent[0] !=3D=3D document && =
this.scrollParent[0].tagName !=3D=3D "HTML") {=0A=
this.overflowOffset =3D this.scrollParent.offset();=0A=
}=0A=
=0A=
//Call callbacks=0A=
this._trigger("start", event, this._uiHash());=0A=
=0A=
//Recache the helper size=0A=
if(!this._preserveHelperProportions) {=0A=
this._cacheHelperProportions();=0A=
}=0A=
=0A=
=0A=
//Post "activate" events to possible containers=0A=
if( !noActivation ) {=0A=
for ( i =3D this.containers.length - 1; i >=3D 0; i-- ) {=0A=
this.containers[ i ]._trigger( "activate", event, this._uiHash( this =
) );=0A=
}=0A=
}=0A=
=0A=
//Prepare possible droppables=0A=
if($.ui.ddmanager) {=0A=
$.ui.ddmanager.current =3D this;=0A=
}=0A=
=0A=
if ($.ui.ddmanager && !o.dropBehaviour) {=0A=
$.ui.ddmanager.prepareOffsets(this, event);=0A=
}=0A=
=0A=
this.dragging =3D true;=0A=
=0A=
this.helper.addClass("ui-sortable-helper");=0A=
this._mouseDrag(event); //Execute the drag once - this causes the =
helper not to be visible before getting its correct position=0A=
return true;=0A=
=0A=
},=0A=
=0A=
_mouseDrag: function(event) {=0A=
var i, item, itemElement, intersection,=0A=
o =3D this.options,=0A=
scrolled =3D false;=0A=
=0A=
//Compute the helpers position=0A=
this.position =3D this._generatePosition(event);=0A=
this.positionAbs =3D this._convertPositionTo("absolute");=0A=
=0A=
if (!this.lastPositionAbs) {=0A=
this.lastPositionAbs =3D this.positionAbs;=0A=
}=0A=
=0A=
//Do scrolling=0A=
if(this.options.scroll) {=0A=
if(this.scrollParent[0] !=3D=3D document && =
this.scrollParent[0].tagName !=3D=3D "HTML") {=0A=
=0A=
if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - =
event.pageY < o.scrollSensitivity) {=0A=
this.scrollParent[0].scrollTop =3D scrolled =3D =
this.scrollParent[0].scrollTop + o.scrollSpeed;=0A=
} else if(event.pageY - this.overflowOffset.top < =
o.scrollSensitivity) {=0A=
this.scrollParent[0].scrollTop =3D scrolled =3D =
this.scrollParent[0].scrollTop - o.scrollSpeed;=0A=
}=0A=
=0A=
if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - =
event.pageX < o.scrollSensitivity) {=0A=
this.scrollParent[0].scrollLeft =3D scrolled =3D =
this.scrollParent[0].scrollLeft + o.scrollSpeed;=0A=
} else if(event.pageX - this.overflowOffset.left < =
o.scrollSensitivity) {=0A=
this.scrollParent[0].scrollLeft =3D scrolled =3D =
this.scrollParent[0].scrollLeft - o.scrollSpeed;=0A=
}=0A=
=0A=
} else {=0A=
=0A=
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollTop($(document).scrollTop() - =
o.scrollSpeed);=0A=
} else if($(window).height() - (event.pageY - =
$(document).scrollTop()) < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollTop($(document).scrollTop() + =
o.scrollSpeed);=0A=
}=0A=
=0A=
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollLeft($(document).scrollLeft() - =
o.scrollSpeed);=0A=
} else if($(window).width() - (event.pageX - =
$(document).scrollLeft()) < o.scrollSensitivity) {=0A=
scrolled =3D $(document).scrollLeft($(document).scrollLeft() + =
o.scrollSpeed);=0A=
}=0A=
=0A=
}=0A=
=0A=
if(scrolled !=3D=3D false && $.ui.ddmanager && !o.dropBehaviour) {=0A=
$.ui.ddmanager.prepareOffsets(this, event);=0A=
}=0A=
}=0A=
=0A=
//Regenerate the absolute position used for position checks=0A=
this.positionAbs =3D this._convertPositionTo("absolute");=0A=
=0A=
//Set the helper position=0A=
if(!this.options.axis || this.options.axis !=3D=3D "y") {=0A=
this.helper[0].style.left =3D this.position.left+"px";=0A=
}=0A=
if(!this.options.axis || this.options.axis !=3D=3D "x") {=0A=
this.helper[0].style.top =3D this.position.top+"px";=0A=
}=0A=
=0A=
//Rearrange=0A=
for (i =3D this.items.length - 1; i >=3D 0; i--) {=0A=
=0A=
//Cache variables and intersection, continue if no intersection=0A=
item =3D this.items[i];=0A=
itemElement =3D item.item[0];=0A=
intersection =3D this._intersectsWithPointer(item);=0A=
if (!intersection) {=0A=
continue;=0A=
}=0A=
=0A=
// Only put the placeholder inside the current Container, skip all=0A=
// items from other containers. This works because when moving=0A=
// an item from one container to another the=0A=
// currentContainer is switched before the placeholder is moved.=0A=
//=0A=
// Without this, moving items in "sub-sortables" can cause=0A=
// the placeholder to jitter beetween the outer and inner container.=0A=
if (item.instance !=3D=3D this.currentContainer) {=0A=
continue;=0A=
}=0A=
=0A=
// cannot intersect with itself=0A=
// no useless actions that have been done before=0A=
// no action if the item moved is the parent of the item checked=0A=
if (itemElement !=3D=3D this.currentItem[0] &&=0A=
this.placeholder[intersection =3D=3D=3D 1 ? "next" : "prev"]()[0] =
!=3D=3D itemElement &&=0A=
!$.contains(this.placeholder[0], itemElement) &&=0A=
(this.options.type =3D=3D=3D "semi-dynamic" ? =
!$.contains(this.element[0], itemElement) : true)=0A=
) {=0A=
=0A=
this.direction =3D intersection =3D=3D=3D 1 ? "down" : "up";=0A=
=0A=
if (this.options.tolerance =3D=3D=3D "pointer" || =
this._intersectsWithSides(item)) {=0A=
this._rearrange(event, item);=0A=
} else {=0A=
break;=0A=
}=0A=
=0A=
this._trigger("change", event, this._uiHash());=0A=
break;=0A=
}=0A=
}=0A=
=0A=
//Post events to containers=0A=
this._contactContainers(event);=0A=
=0A=
//Interconnect with droppables=0A=
if($.ui.ddmanager) {=0A=
$.ui.ddmanager.drag(this, event);=0A=
}=0A=
=0A=
//Call callbacks=0A=
this._trigger("sort", event, this._uiHash());=0A=
=0A=
this.lastPositionAbs =3D this.positionAbs;=0A=
return false;=0A=
=0A=
},=0A=
=0A=
_mouseStop: function(event, noPropagation) {=0A=
=0A=
if(!event) {=0A=
return;=0A=
}=0A=
=0A=
//If we are using droppables, inform the manager about the drop=0A=
if ($.ui.ddmanager && !this.options.dropBehaviour) {=0A=
$.ui.ddmanager.drop(this, event);=0A=
}=0A=
=0A=
if(this.options.revert) {=0A=
var that =3D this,=0A=
cur =3D this.placeholder.offset(),=0A=
axis =3D this.options.axis,=0A=
animation =3D {};=0A=
=0A=
if ( !axis || axis =3D=3D=3D "x" ) {=0A=
animation.left =3D cur.left - this.offset.parent.left - =
this.margins.left + (this.offsetParent[0] =3D=3D=3D document.body ? 0 : =
this.offsetParent[0].scrollLeft);=0A=
}=0A=
if ( !axis || axis =3D=3D=3D "y" ) {=0A=
animation.top =3D cur.top - this.offset.parent.top - =
this.margins.top + (this.offsetParent[0] =3D=3D=3D document.body ? 0 : =
this.offsetParent[0].scrollTop);=0A=
}=0A=
this.reverting =3D true;=0A=
$(this.helper).animate( animation, parseInt(this.options.revert, 10) =
|| 500, function() {=0A=
that._clear(event);=0A=
});=0A=
} else {=0A=
this._clear(event, noPropagation);=0A=
}=0A=
=0A=
return false;=0A=
=0A=
},=0A=
=0A=
cancel: function() {=0A=
=0A=
if(this.dragging) {=0A=
=0A=
this._mouseUp({ target: null });=0A=
=0A=
if(this.options.helper =3D=3D=3D "original") {=0A=
=
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");=0A=
} else {=0A=
this.currentItem.show();=0A=
}=0A=
=0A=
//Post deactivating events to containers=0A=
for (var i =3D this.containers.length - 1; i >=3D 0; i--){=0A=
this.containers[i]._trigger("deactivate", null, this._uiHash(this));=0A=
if(this.containers[i].containerCache.over) {=0A=
this.containers[i]._trigger("out", null, this._uiHash(this));=0A=
this.containers[i].containerCache.over =3D 0;=0A=
}=0A=
}=0A=
=0A=
}=0A=
=0A=
if (this.placeholder) {=0A=
//$(this.placeholder[0]).remove(); would have been the jQuery way - =
unfortunately, it unbinds ALL events from the original node!=0A=
if(this.placeholder[0].parentNode) {=0A=
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);=0A=
}=0A=
if(this.options.helper !=3D=3D "original" && this.helper && =
this.helper[0].parentNode) {=0A=
this.helper.remove();=0A=
}=0A=
=0A=
$.extend(this, {=0A=
helper: null,=0A=
dragging: false,=0A=
reverting: false,=0A=
_noFinalSort: null=0A=
});=0A=
=0A=
if(this.domPosition.prev) {=0A=
$(this.domPosition.prev).after(this.currentItem);=0A=
} else {=0A=
$(this.domPosition.parent).prepend(this.currentItem);=0A=
}=0A=
}=0A=
=0A=
return this;=0A=
=0A=
},=0A=
=0A=
serialize: function(o) {=0A=
=0A=
var items =3D this._getItemsAsjQuery(o && o.connected),=0A=
str =3D [];=0A=
o =3D o || {};=0A=
=0A=
$(items).each(function() {=0A=
var res =3D ($(o.item || this).attr(o.attribute || "id") || =
"").match(o.expression || (/(.+)[\-=3D_](.+)/));=0A=
if (res) {=0A=
str.push((o.key || res[1]+"[]")+"=3D"+(o.key && o.expression ? =
res[1] : res[2]));=0A=
}=0A=
});=0A=
=0A=
if(!str.length && o.key) {=0A=
str.push(o.key + "=3D");=0A=
}=0A=
=0A=
return str.join("&");=0A=
=0A=
},=0A=
=0A=
toArray: function(o) {=0A=
=0A=
var items =3D this._getItemsAsjQuery(o && o.connected),=0A=
ret =3D [];=0A=
=0A=
o =3D o || {};=0A=
=0A=
items.each(function() { ret.push($(o.item || this).attr(o.attribute || =
"id") || ""); });=0A=
return ret;=0A=
=0A=
},=0A=
=0A=
/* Be careful with the following core functions */=0A=
_intersectsWith: function(item) {=0A=
=0A=
var x1 =3D this.positionAbs.left,=0A=
x2 =3D x1 + this.helperProportions.width,=0A=
y1 =3D this.positionAbs.top,=0A=
y2 =3D y1 + this.helperProportions.height,=0A=
l =3D item.left,=0A=
r =3D l + item.width,=0A=
t =3D item.top,=0A=
b =3D t + item.height,=0A=
dyClick =3D this.offset.click.top,=0A=
dxClick =3D this.offset.click.left,=0A=
isOverElementHeight =3D ( this.options.axis =3D=3D=3D "x" ) || ( ( y1 =
+ dyClick ) > t && ( y1 + dyClick ) < b ),=0A=
isOverElementWidth =3D ( this.options.axis =3D=3D=3D "y" ) || ( ( x1 =
+ dxClick ) > l && ( x1 + dxClick ) < r ),=0A=
isOverElement =3D isOverElementHeight && isOverElementWidth;=0A=
=0A=
if ( this.options.tolerance =3D=3D=3D "pointer" ||=0A=
this.options.forcePointerForContainers ||=0A=
(this.options.tolerance !=3D=3D "pointer" && =
this.helperProportions[this.floating ? "width" : "height"] > =
item[this.floating ? "width" : "height"])=0A=
) {=0A=
return isOverElement;=0A=
} else {=0A=
=0A=
return (l < x1 + (this.helperProportions.width / 2) && // Right Half=0A=
x2 - (this.helperProportions.width / 2) < r && // Left Half=0A=
t < y1 + (this.helperProportions.height / 2) && // Bottom Half=0A=
y2 - (this.helperProportions.height / 2) < b ); // Top Half=0A=
=0A=
}=0A=
},=0A=
=0A=
_intersectsWithPointer: function(item) {=0A=
=0A=
var isOverElementHeight =3D (this.options.axis =3D=3D=3D "x") || =
isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, =
item.height),=0A=
isOverElementWidth =3D (this.options.axis =3D=3D=3D "y") || =
isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, =
item.width),=0A=
isOverElement =3D isOverElementHeight && isOverElementWidth,=0A=
verticalDirection =3D this._getDragVerticalDirection(),=0A=
horizontalDirection =3D this._getDragHorizontalDirection();=0A=
=0A=
if (!isOverElement) {=0A=
return false;=0A=
}=0A=
=0A=
return this.floating ?=0A=
( ((horizontalDirection && horizontalDirection =3D=3D=3D "right") || =
verticalDirection =3D=3D=3D "down") ? 2 : 1 )=0A=
: ( verticalDirection && (verticalDirection =3D=3D=3D "down" ? 2 : 1) =
);=0A=
=0A=
},=0A=
=0A=
_intersectsWithSides: function(item) {=0A=
=0A=
var isOverBottomHalf =3D isOverAxis(this.positionAbs.top + =
this.offset.click.top, item.top + (item.height/2), item.height),=0A=
isOverRightHalf =3D isOverAxis(this.positionAbs.left + =
this.offset.click.left, item.left + (item.width/2), item.width),=0A=
verticalDirection =3D this._getDragVerticalDirection(),=0A=
horizontalDirection =3D this._getDragHorizontalDirection();=0A=
=0A=
if (this.floating && horizontalDirection) {=0A=
return ((horizontalDirection =3D=3D=3D "right" && isOverRightHalf) || =
(horizontalDirection =3D=3D=3D "left" && !isOverRightHalf));=0A=
} else {=0A=
return verticalDirection && ((verticalDirection =3D=3D=3D "down" && =
isOverBottomHalf) || (verticalDirection =3D=3D=3D "up" && =
!isOverBottomHalf));=0A=
}=0A=
=0A=
},=0A=
=0A=
_getDragVerticalDirection: function() {=0A=
var delta =3D this.positionAbs.top - this.lastPositionAbs.top;=0A=
return delta !=3D=3D 0 && (delta > 0 ? "down" : "up");=0A=
},=0A=
=0A=
_getDragHorizontalDirection: function() {=0A=
var delta =3D this.positionAbs.left - this.lastPositionAbs.left;=0A=
return delta !=3D=3D 0 && (delta > 0 ? "right" : "left");=0A=
},=0A=
=0A=
refresh: function(event) {=0A=
this._refreshItems(event);=0A=
this.refreshPositions();=0A=
return this;=0A=
},=0A=
=0A=
_connectWith: function() {=0A=
var options =3D this.options;=0A=
return options.connectWith.constructor =3D=3D=3D String ? =
[options.connectWith] : options.connectWith;=0A=
},=0A=
=0A=
_getItemsAsjQuery: function(connected) {=0A=
=0A=
var i, j, cur, inst,=0A=
items =3D [],=0A=
queries =3D [],=0A=
connectWith =3D this._connectWith();=0A=
=0A=
if(connectWith && connected) {=0A=
for (i =3D connectWith.length - 1; i >=3D 0; i--){=0A=
cur =3D $(connectWith[i]);=0A=
for ( j =3D cur.length - 1; j >=3D 0; j--){=0A=
inst =3D $.data(cur[j], this.widgetFullName);=0A=
if(inst && inst !=3D=3D this && !inst.options.disabled) {=0A=
queries.push([$.isFunction(inst.options.items) ? =
inst.options.items.call(inst.element) : $(inst.options.items, =
inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),=
inst]);=0A=
}=0A=
}=0A=
}=0A=
}=0A=
=0A=
queries.push([$.isFunction(this.options.items) ? =
this.options.items.call(this.element, null, { options: this.options, =
item: this.currentItem }) : $(this.options.items, =
this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),=
this]);=0A=
=0A=
function addItems() {=0A=
items.push( this );=0A=
}=0A=
for (i =3D queries.length - 1; i >=3D 0; i--){=0A=
queries[i][0].each( addItems );=0A=
}=0A=
=0A=
return $(items);=0A=
=0A=
},=0A=
=0A=
_removeCurrentsFromItems: function() {=0A=
=0A=
var list =3D this.currentItem.find(":data(" + this.widgetName + =
"-item)");=0A=
=0A=
this.items =3D $.grep(this.items, function (item) {=0A=
for (var j=3D0; j < list.length; j++) {=0A=
if(list[j] =3D=3D=3D item.item[0]) {=0A=
return false;=0A=
}=0A=
}=0A=
return true;=0A=
});=0A=
=0A=
},=0A=
=0A=
_refreshItems: function(event) {=0A=
=0A=
this.items =3D [];=0A=
this.containers =3D [this];=0A=
=0A=
var i, j, cur, inst, targetData, _queries, item, queriesLength,=0A=
items =3D this.items,=0A=
queries =3D [[$.isFunction(this.options.items) ? =
this.options.items.call(this.element[0], event, { item: this.currentItem =
}) : $(this.options.items, this.element), this]],=0A=
connectWith =3D this._connectWith();=0A=
=0A=
if(connectWith && this.ready) { //Shouldn't be run the first time =
through due to massive slow-down=0A=
for (i =3D connectWith.length - 1; i >=3D 0; i--){=0A=
cur =3D $(connectWith[i]);=0A=
for (j =3D cur.length - 1; j >=3D 0; j--){=0A=
inst =3D $.data(cur[j], this.widgetFullName);=0A=
if(inst && inst !=3D=3D this && !inst.options.disabled) {=0A=
queries.push([$.isFunction(inst.options.items) ? =
inst.options.items.call(inst.element[0], event, { item: this.currentItem =
}) : $(inst.options.items, inst.element), inst]);=0A=
this.containers.push(inst);=0A=
}=0A=
}=0A=
}=0A=
}=0A=
=0A=
for (i =3D queries.length - 1; i >=3D 0; i--) {=0A=
targetData =3D queries[i][1];=0A=
_queries =3D queries[i][0];=0A=
=0A=
for (j=3D0, queriesLength =3D _queries.length; j < queriesLength; =
j++) {=0A=
item =3D $(_queries[j]);=0A=
=0A=
item.data(this.widgetName + "-item", targetData); // Data for target =
checking (mouse manager)=0A=
=0A=
items.push({=0A=
item: item,=0A=
instance: targetData,=0A=
width: 0, height: 0,=0A=
left: 0, top: 0=0A=
});=0A=
}=0A=
}=0A=
=0A=
},=0A=
=0A=
refreshPositions: function(fast) {=0A=
=0A=
//This has to be redone because due to the item being moved out/into =
the offsetParent, the offsetParent's position will change=0A=
if(this.offsetParent && this.helper) {=0A=
this.offset.parent =3D this._getParentOffset();=0A=
}=0A=
=0A=
var i, item, t, p;=0A=
=0A=
for (i =3D this.items.length - 1; i >=3D 0; i--){=0A=
item =3D this.items[i];=0A=
=0A=
//We ignore calculating positions of all connected containers when =
we're not over them=0A=
if(item.instance !=3D=3D this.currentContainer && =
this.currentContainer && item.item[0] !=3D=3D this.currentItem[0]) {=0A=
continue;=0A=
}=0A=
=0A=
t =3D this.options.toleranceElement ? =
$(this.options.toleranceElement, item.item) : item.item;=0A=
=0A=
if (!fast) {=0A=
item.width =3D t.outerWidth();=0A=
item.height =3D t.outerHeight();=0A=
}=0A=
=0A=
p =3D t.offset();=0A=
item.left =3D p.left;=0A=
item.top =3D p.top;=0A=
}=0A=
=0A=
if(this.options.custom && this.options.custom.refreshContainers) {=0A=
this.options.custom.refreshContainers.call(this);=0A=
} else {=0A=
for (i =3D this.containers.length - 1; i >=3D 0; i--){=0A=
p =3D this.containers[i].element.offset();=0A=
this.containers[i].containerCache.left =3D p.left;=0A=
this.containers[i].containerCache.top =3D p.top;=0A=
this.containers[i].containerCache.width =3D =
this.containers[i].element.outerWidth();=0A=
this.containers[i].containerCache.height =3D =
this.containers[i].element.outerHeight();=0A=
}=0A=
}=0A=
=0A=
return this;=0A=
},=0A=
=0A=
_createPlaceholder: function(that) {=0A=
that =3D that || this;=0A=
var className,=0A=
o =3D that.options;=0A=
=0A=
if(!o.placeholder || o.placeholder.constructor =3D=3D=3D String) {=0A=
className =3D o.placeholder;=0A=
o.placeholder =3D {=0A=
element: function() {=0A=
=0A=
var nodeName =3D that.currentItem[0].nodeName.toLowerCase(),=0A=
element =3D $( "<" + nodeName + ">", that.document[0] )=0A=
.addClass(className || that.currentItem[0].className+" =
ui-sortable-placeholder")=0A=
.removeClass("ui-sortable-helper");=0A=
=0A=
if ( nodeName =3D=3D=3D "tr" ) {=0A=
that.currentItem.children().each(function() {=0A=
$( " | ", that.document[0] )=0A=
.attr( "colspan", $( this ).attr( "colspan" ) || 1 )=0A=
.appendTo( element );=0A=
});=0A=
} else if ( nodeName =3D=3D=3D "img" ) {=0A=
element.attr( "src", that.currentItem.attr( "src" ) );=0A=
}=0A=
=0A=
if ( !className ) {=0A=
element.css( "visibility", "hidden" );=0A=
}=0A=
=0A=
return element;=0A=
},=0A=
update: function(container, p) {=0A=
=0A=
// 1. If a className is set as 'placeholder option, we don't force =
sizes - the class is responsible for that=0A=
// 2. The option 'forcePlaceholderSize can be enabled to force it =
even if a class name is specified=0A=
if(className && !o.forcePlaceholderSize) {=0A=
return;=0A=
}=0A=
=0A=
//If the element doesn't have a actual height by itself (without =
styles coming from a stylesheet), it receives the inline height from the =
dragged item=0A=
if(!p.height()) { p.height(that.currentItem.innerHeight() - =
parseInt(that.currentItem.css("paddingTop")||0, 10) - =
parseInt(that.currentItem.css("paddingBottom")||0, 10)); }=0A=
if(!p.width()) { p.width(that.currentItem.innerWidth() - =
parseInt(that.currentItem.css("paddingLeft")||0, 10) - =
parseInt(that.currentItem.css("paddingRight")||0, 10)); }=0A=
}=0A=
};=0A=
}=0A=
=0A=
//Create the placeholder=0A=
that.placeholder =3D $(o.placeholder.element.call(that.element, =
that.currentItem));=0A=
=0A=
//Append it after the actual current item=0A=
that.currentItem.after(that.placeholder);=0A=
=0A=
//Update the size of the placeholder (TODO: Logic to fuzzy, see line =
316/317)=0A=
o.placeholder.update(that, that.placeholder);=0A=
=0A=
},=0A=
=0A=
_contactContainers: function(event) {=0A=
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, =
base, cur, nearBottom, floating,=0A=
innermostContainer =3D null,=0A=
innermostIndex =3D null;=0A=
=0A=
// get innermost container that intersects with item=0A=
for (i =3D this.containers.length - 1; i >=3D 0; i--) {=0A=
=0A=
// never consider a container that's located within the item itself=0A=
if($.contains(this.currentItem[0], this.containers[i].element[0])) {=0A=
continue;=0A=
}=0A=
=0A=
if(this._intersectsWith(this.containers[i].containerCache)) {=0A=
=0A=
// if we've already found a container and it's more "inner" than =
this, then continue=0A=
if(innermostContainer && $.contains(this.containers[i].element[0], =
innermostContainer.element[0])) {=0A=
continue;=0A=
}=0A=
=0A=
innermostContainer =3D this.containers[i];=0A=
innermostIndex =3D i;=0A=
=0A=
} else {=0A=
// container doesn't intersect. trigger "out" event if necessary=0A=
if(this.containers[i].containerCache.over) {=0A=
this.containers[i]._trigger("out", event, this._uiHash(this));=0A=
this.containers[i].containerCache.over =3D 0;=0A=
}=0A=
}=0A=
=0A=
}=0A=
=0A=
// if no intersecting containers found, return=0A=
if(!innermostContainer) {=0A=
return;=0A=
}=0A=
=0A=
// move the item into the container if it's not there already=0A=
if(this.containers.length =3D=3D=3D 1) {=0A=
if (!this.containers[innermostIndex].containerCache.over) {=0A=
this.containers[innermostIndex]._trigger("over", event, =
this._uiHash(this));=0A=
this.containers[innermostIndex].containerCache.over =3D 1;=0A=
}=0A=
} else {=0A=
=0A=
//When entering a new container, we will find the item with the least =
distance and append our item near it=0A=
dist =3D 10000;=0A=
itemWithLeastDistance =3D null;=0A=
floating =3D innermostContainer.floating || =
isFloating(this.currentItem);=0A=
posProperty =3D floating ? "left" : "top";=0A=
sizeProperty =3D floating ? "width" : "height";=0A=
base =3D this.positionAbs[posProperty] + =
this.offset.click[posProperty];=0A=
for (j =3D this.items.length - 1; j >=3D 0; j--) {=0A=
if(!$.contains(this.containers[innermostIndex].element[0], =
this.items[j].item[0])) {=0A=
continue;=0A=
}=0A=
if(this.items[j].item[0] =3D=3D=3D this.currentItem[0]) {=0A=
continue;=0A=
}=0A=
if (floating && !isOverAxis(this.positionAbs.top + =
this.offset.click.top, this.items[j].top, this.items[j].height)) {=0A=
continue;=0A=
}=0A=
cur =3D this.items[j].item.offset()[posProperty];=0A=
nearBottom =3D false;=0A=
if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] =
- base)){=0A=
nearBottom =3D true;=0A=
cur +=3D this.items[j][sizeProperty];=0A=
}=0A=
=0A=
if(Math.abs(cur - base) < dist) {=0A=
dist =3D Math.abs(cur - base); itemWithLeastDistance =3D =
this.items[j];=0A=
this.direction =3D nearBottom ? "up": "down";=0A=
}=0A=
}=0A=
=0A=
//Check if dropOnEmpty is enabled=0A=
if(!itemWithLeastDistance && !this.options.dropOnEmpty) {=0A=
return;=0A=
}=0A=
=0A=
if(this.currentContainer =3D=3D=3D this.containers[innermostIndex]) {=0A=
return;=0A=
}=0A=
=0A=
itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, =
null, true) : this._rearrange(event, null, =
this.containers[innermostIndex].element, true);=0A=
this._trigger("change", event, this._uiHash());=0A=
this.containers[innermostIndex]._trigger("change", event, =
this._uiHash(this));=0A=
this.currentContainer =3D this.containers[innermostIndex];=0A=
=0A=
//Update the placeholder=0A=
this.options.placeholder.update(this.currentContainer, =
this.placeholder);=0A=
=0A=
this.containers[innermostIndex]._trigger("over", event, =
this._uiHash(this));=0A=
this.containers[innermostIndex].containerCache.over =3D 1;=0A=
}=0A=
=0A=
=0A=
},=0A=
=0A=
_createHelper: function(event) {=0A=
=0A=
var o =3D this.options,=0A=
helper =3D $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], =
[event, this.currentItem])) : (o.helper =3D=3D=3D "clone" ? =
this.currentItem.clone() : this.currentItem);=0A=
=0A=
//Add the helper to the DOM if that didn't happen already=0A=
if(!helper.parents("body").length) {=0A=
$(o.appendTo !=3D=3D "parent" ? o.appendTo : =
this.currentItem[0].parentNode)[0].appendChild(helper[0]);=0A=
}=0A=
=0A=
if(helper[0] =3D=3D=3D this.currentItem[0]) {=0A=
this._storedCSS =3D { 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") };=0A=
}=0A=
=0A=
if(!helper[0].style.width || o.forceHelperSize) {=0A=
helper.width(this.currentItem.width());=0A=
}=0A=
if(!helper[0].style.height || o.forceHelperSize) {=0A=
helper.height(this.currentItem.height());=0A=
}=0A=
=0A=
return helper;=0A=
=0A=
},=0A=
=0A=
_adjustOffsetFromHelper: function(obj) {=0A=
if (typeof obj =3D=3D=3D "string") {=0A=
obj =3D obj.split(" ");=0A=
}=0A=
if ($.isArray(obj)) {=0A=
obj =3D {left: +obj[0], top: +obj[1] || 0};=0A=
}=0A=
if ("left" in obj) {=0A=
this.offset.click.left =3D obj.left + this.margins.left;=0A=
}=0A=
if ("right" in obj) {=0A=
this.offset.click.left =3D this.helperProportions.width - obj.right + =
this.margins.left;=0A=
}=0A=
if ("top" in obj) {=0A=
this.offset.click.top =3D obj.top + this.margins.top;=0A=
}=0A=
if ("bottom" in obj) {=0A=
this.offset.click.top =3D this.helperProportions.height - obj.bottom =
+ this.margins.top;=0A=
}=0A=
},=0A=
=0A=
_getParentOffset: function() {=0A=
=0A=
=0A=
//Get the offsetParent and cache its position=0A=
this.offsetParent =3D this.helper.offsetParent();=0A=
var po =3D this.offsetParent.offset();=0A=
=0A=
// This is a special case where we need to modify a offset calculated =
on start, since the following happened:=0A=
// 1. The position of the helper is absolute, so it's position is =
calculated based on the next positioned parent=0A=
// 2. The actual offset parent is a child of the scroll parent, and =
the scroll parent isn't the document, which means that=0A=
// the scroll is included in the initial calculation of the offset =
of the parent, and never recalculated upon drag=0A=
if(this.cssPosition =3D=3D=3D "absolute" && this.scrollParent[0] =
!=3D=3D document && $.contains(this.scrollParent[0], =
this.offsetParent[0])) {=0A=
po.left +=3D this.scrollParent.scrollLeft();=0A=
po.top +=3D this.scrollParent.scrollTop();=0A=
}=0A=
=0A=
// This needs to be actually done for all browsers, since pageX/pageY =
includes this information=0A=
// with an ugly IE fix=0A=
if( this.offsetParent[0] =3D=3D=3D document.body || =
(this.offsetParent[0].tagName && =
this.offsetParent[0].tagName.toLowerCase() =3D=3D=3D "html" && $.ui.ie)) =
{=0A=
po =3D { top: 0, left: 0 };=0A=
}=0A=
=0A=
return {=0A=
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) =
|| 0),=0A=
left: po.left + =
(parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)=0A=
};=0A=
=0A=
},=0A=
=0A=
_getRelativeOffset: function() {=0A=
=0A=
if(this.cssPosition =3D=3D=3D "relative") {=0A=
var p =3D this.currentItem.position();=0A=
return {=0A=
top: p.top - (parseInt(this.helper.css("top"),10) || 0) + =
this.scrollParent.scrollTop(),=0A=
left: p.left - (parseInt(this.helper.css("left"),10) || 0) + =
this.scrollParent.scrollLeft()=0A=
};=0A=
} else {=0A=
return { top: 0, left: 0 };=0A=
}=0A=
=0A=
},=0A=
=0A=
_cacheMargins: function() {=0A=
this.margins =3D {=0A=
left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),=0A=
top: (parseInt(this.currentItem.css("marginTop"),10) || 0)=0A=
};=0A=
},=0A=
=0A=
_cacheHelperProportions: function() {=0A=
this.helperProportions =3D {=0A=
width: this.helper.outerWidth(),=0A=
height: this.helper.outerHeight()=0A=
};=0A=
},=0A=
=0A=
_setContainment: function() {=0A=
=0A=
var ce, co, over,=0A=
o =3D this.options;=0A=
if(o.containment =3D=3D=3D "parent") {=0A=
o.containment =3D this.helper[0].parentNode;=0A=
}=0A=
if(o.containment =3D=3D=3D "document" || o.containment =3D=3D=3D =
"window") {=0A=
this.containment =3D [=0A=
0 - this.offset.relative.left - this.offset.parent.left,=0A=
0 - this.offset.relative.top - this.offset.parent.top,=0A=
$(o.containment =3D=3D=3D "document" ? document : window).width() - =
this.helperProportions.width - this.margins.left,=0A=
($(o.containment =3D=3D=3D "document" ? document : window).height() =
|| document.body.parentNode.scrollHeight) - =
this.helperProportions.height - this.margins.top=0A=
];=0A=
}=0A=
=0A=
if(!(/^(document|window|parent)$/).test(o.containment)) {=0A=
ce =3D $(o.containment)[0];=0A=
co =3D $(o.containment).offset();=0A=
over =3D ($(ce).css("overflow") !=3D=3D "hidden");=0A=
=0A=
this.containment =3D [=0A=
co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + =
(parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,=0A=
co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + =
(parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,=0A=
co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : =
ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - =
(parseInt($(ce).css("paddingRight"),10) || 0) - =
this.helperProportions.width - this.margins.left,=0A=
co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : =
ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - =
(parseInt($(ce).css("paddingBottom"),10) || 0) - =
this.helperProportions.height - this.margins.top=0A=
];=0A=
}=0A=
=0A=
},=0A=
=0A=
_convertPositionTo: function(d, pos) {=0A=
=0A=
if(!pos) {=0A=
pos =3D this.position;=0A=
}=0A=
var mod =3D d =3D=3D=3D "absolute" ? 1 : -1,=0A=
scroll =3D this.cssPosition =3D=3D=3D "absolute" && =
!(this.scrollParent[0] !=3D=3D document && =
$.contains(this.scrollParent[0], this.offsetParent[0])) ? =
this.offsetParent : this.scrollParent,=0A=
scrollIsRootNode =3D (/(html|body)/i).test(scroll[0].tagName);=0A=
=0A=
return {=0A=
top: (=0A=
pos.top + // The absolute mouse position=0A=
this.offset.relative.top * mod + // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.top * mod - // The offsetParent's =
offset without borders (offset + border)=0A=
( ( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : =
scroll.scrollTop() ) ) * mod)=0A=
),=0A=
left: (=0A=
pos.left + // The absolute mouse position=0A=
this.offset.relative.left * mod + // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.left * mod - // The offsetParent's =
offset without borders (offset + border)=0A=
( ( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : =
scroll.scrollLeft() ) * mod)=0A=
)=0A=
};=0A=
=0A=
},=0A=
=0A=
_generatePosition: function(event) {=0A=
=0A=
var top, left,=0A=
o =3D this.options,=0A=
pageX =3D event.pageX,=0A=
pageY =3D event.pageY,=0A=
scroll =3D this.cssPosition =3D=3D=3D "absolute" && =
!(this.scrollParent[0] !=3D=3D document && =
$.contains(this.scrollParent[0], this.offsetParent[0])) ? =
this.offsetParent : this.scrollParent, scrollIsRootNode =3D =
(/(html|body)/i).test(scroll[0].tagName);=0A=
=0A=
// This is another very weird special case that only happens for =
relative elements:=0A=
// 1. If the css position is relative=0A=
// 2. and the scroll parent is the document or similar to the offset =
parent=0A=
// we have to refresh the relative offset during the scroll so there =
are no jumps=0A=
if(this.cssPosition =3D=3D=3D "relative" && !(this.scrollParent[0] =
!=3D=3D document && this.scrollParent[0] !=3D=3D this.offsetParent[0])) {=0A=
this.offset.relative =3D this._getRelativeOffset();=0A=
}=0A=
=0A=
/*=0A=
* - Position constraining -=0A=
* Constrain the position to a mix of grid, containment.=0A=
*/=0A=
=0A=
if(this.originalPosition) { //If we are not dragging yet, we won't =
check for options=0A=
=0A=
if(this.containment) {=0A=
if(event.pageX - this.offset.click.left < this.containment[0]) {=0A=
pageX =3D this.containment[0] + this.offset.click.left;=0A=
}=0A=
if(event.pageY - this.offset.click.top < this.containment[1]) {=0A=
pageY =3D this.containment[1] + this.offset.click.top;=0A=
}=0A=
if(event.pageX - this.offset.click.left > this.containment[2]) {=0A=
pageX =3D this.containment[2] + this.offset.click.left;=0A=
}=0A=
if(event.pageY - this.offset.click.top > this.containment[3]) {=0A=
pageY =3D this.containment[3] + this.offset.click.top;=0A=
}=0A=
}=0A=
=0A=
if(o.grid) {=0A=
top =3D this.originalPageY + Math.round((pageY - this.originalPageY) =
/ o.grid[1]) * o.grid[1];=0A=
pageY =3D this.containment ? ( (top - this.offset.click.top >=3D =
this.containment[1] && top - this.offset.click.top <=3D =
this.containment[3]) ? top : ((top - this.offset.click.top >=3D =
this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;=0A=
=0A=
left =3D this.originalPageX + Math.round((pageX - =
this.originalPageX) / o.grid[0]) * o.grid[0];=0A=
pageX =3D this.containment ? ( (left - this.offset.click.left >=3D =
this.containment[0] && left - this.offset.click.left <=3D =
this.containment[2]) ? left : ((left - this.offset.click.left >=3D =
this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;=0A=
}=0A=
=0A=
}=0A=
=0A=
return {=0A=
top: (=0A=
pageY - // The absolute mouse position=0A=
this.offset.click.top - // Click offset (relative to the =
element)=0A=
this.offset.relative.top - // Only for relative positioned =
nodes: Relative offset from element to offset parent=0A=
this.offset.parent.top + // The offsetParent's offset =
without borders (offset + border)=0A=
( ( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : =
scroll.scrollTop() ) ))=0A=
),=0A=
left: (=0A=
pageX - // The absolute mouse position=0A=
this.offset.click.left - // Click offset (relative to the =
element)=0A=
this.offset.relative.left - // Only for relative =
positioned nodes: Relative offset from element to offset parent=0A=
this.offset.parent.left + // The offsetParent's offset =
without borders (offset + border)=0A=
( ( this.cssPosition =3D=3D=3D "fixed" ? =
-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : =
scroll.scrollLeft() ))=0A=
)=0A=
};=0A=
=0A=
},=0A=
=0A=
_rearrange: function(event, i, a, hardRefresh) {=0A=
=0A=
a ? a[0].appendChild(this.placeholder[0]) : =
i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction =
=3D=3D=3D "down" ? i.item[0] : i.item[0].nextSibling));=0A=
=0A=
//Various things done here to improve the performance:=0A=
// 1. we create a setTimeout, that calls refreshPositions=0A=
// 2. on the instance, we have a counter variable, that get's higher =
after every append=0A=
// 3. on the local scope, we copy the counter variable, and check in =
the timeout, if it's still the same=0A=
// 4. this lets only the last addition to the timeout stack through=0A=
this.counter =3D this.counter ? ++this.counter : 1;=0A=
var counter =3D this.counter;=0A=
=0A=
this._delay(function() {=0A=
if(counter =3D=3D=3D this.counter) {=0A=
this.refreshPositions(!hardRefresh); //Precompute after each DOM =
insertion, NOT on mousemove=0A=
}=0A=
});=0A=
=0A=
},=0A=
=0A=
_clear: function(event, noPropagation) {=0A=
=0A=
this.reverting =3D false;=0A=
// We delay all events that have to be triggered to after the point =
where the placeholder has been removed and=0A=
// everything else normalized again=0A=
var i,=0A=
delayedTriggers =3D [];=0A=
=0A=
// We first have to update the dom position of the actual currentItem=0A=
// Note: don't do it if the current item is already removed (by a =
user), or it gets reappended (see #4088)=0A=
if(!this._noFinalSort && this.currentItem.parent().length) {=0A=
this.placeholder.before(this.currentItem);=0A=
}=0A=
this._noFinalSort =3D null;=0A=
=0A=
if(this.helper[0] =3D=3D=3D this.currentItem[0]) {=0A=
for(i in this._storedCSS) {=0A=
if(this._storedCSS[i] =3D=3D=3D "auto" || this._storedCSS[i] =
=3D=3D=3D "static") {=0A=
this._storedCSS[i] =3D "";=0A=
}=0A=
}=0A=
=
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");=0A=
} else {=0A=
this.currentItem.show();=0A=
}=0A=
=0A=
if(this.fromOutside && !noPropagation) {=0A=
delayedTriggers.push(function(event) { this._trigger("receive", =
event, this._uiHash(this.fromOutside)); });=0A=
}=0A=
if((this.fromOutside || this.domPosition.prev !=3D=3D =
this.currentItem.prev().not(".ui-sortable-helper")[0] || =
this.domPosition.parent !=3D=3D this.currentItem.parent()[0]) && =
!noPropagation) {=0A=
delayedTriggers.push(function(event) { this._trigger("update", event, =
this._uiHash()); }); //Trigger update callback if the DOM position has =
changed=0A=
}=0A=
=0A=
// Check if the items Container has Changed and trigger appropriate=0A=
// events.=0A=
if (this !=3D=3D this.currentContainer) {=0A=
if(!noPropagation) {=0A=
delayedTriggers.push(function(event) { this._trigger("remove", =
event, this._uiHash()); });=0A=
delayedTriggers.push((function(c) { return function(event) { =
c._trigger("receive", event, this._uiHash(this)); }; }).call(this, =
this.currentContainer));=0A=
delayedTriggers.push((function(c) { return function(event) { =
c._trigger("update", event, this._uiHash(this)); }; }).call(this, =
this.currentContainer));=0A=
}=0A=
}=0A=
=0A=
=0A=
//Post events to containers=0A=
function delayEvent( type, instance, container ) {=0A=
return function( event ) {=0A=
container._trigger( type, event, instance._uiHash( instance ) );=0A=
};=0A=
}=0A=
for (i =3D this.containers.length - 1; i >=3D 0; i--){=0A=
if (!noPropagation) {=0A=
delayedTriggers.push( delayEvent( "deactivate", this, =
this.containers[ i ] ) );=0A=
}=0A=
if(this.containers[i].containerCache.over) {=0A=
delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] =
) );=0A=
this.containers[i].containerCache.over =3D 0;=0A=
}=0A=
}=0A=
=0A=
//Do what was originally in plugins=0A=
if ( this.storedCursor ) {=0A=
this.document.find( "body" ).css( "cursor", this.storedCursor );=0A=
this.storedStylesheet.remove();=0A=
}=0A=
if(this._storedOpacity) {=0A=
this.helper.css("opacity", this._storedOpacity);=0A=
}=0A=
if(this._storedZIndex) {=0A=
this.helper.css("zIndex", this._storedZIndex =3D=3D=3D "auto" ? "" : =
this._storedZIndex);=0A=
}=0A=
=0A=
this.dragging =3D false;=0A=
if(this.cancelHelperRemoval) {=0A=
if(!noPropagation) {=0A=
this._trigger("beforeStop", event, this._uiHash());=0A=
for (i=3D0; i < delayedTriggers.length; i++) {=0A=
delayedTriggers[i].call(this, event);=0A=
} //Trigger all delayed events=0A=
this._trigger("stop", event, this._uiHash());=0A=
}=0A=
=0A=
this.fromOutside =3D false;=0A=
return false;=0A=
}=0A=
=0A=
if(!noPropagation) {=0A=
this._trigger("beforeStop", event, this._uiHash());=0A=
}=0A=
=0A=
//$(this.placeholder[0]).remove(); would have been the jQuery way - =
unfortunately, it unbinds ALL events from the original node!=0A=
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);=0A=
=0A=
if(this.helper[0] !=3D=3D this.currentItem[0]) {=0A=
this.helper.remove();=0A=
}=0A=
this.helper =3D null;=0A=
=0A=
if(!noPropagation) {=0A=
for (i=3D0; i < delayedTriggers.length; i++) {=0A=
delayedTriggers[i].call(this, event);=0A=
} //Trigger all delayed events=0A=
this._trigger("stop", event, this._uiHash());=0A=
}=0A=
=0A=
this.fromOutside =3D false;=0A=
return true;=0A=
=0A=
},=0A=
=0A=
_trigger: function() {=0A=
if ($.Widget.prototype._trigger.apply(this, arguments) =3D=3D=3D =
false) {=0A=
this.cancel();=0A=
}=0A=
},=0A=
=0A=
_uiHash: function(_inst) {=0A=
var inst =3D _inst || this;=0A=
return {=0A=
helper: inst.helper,=0A=
placeholder: inst.placeholder || $([]),=0A=
position: inst.position,=0A=
originalPosition: inst.originalPosition,=0A=
offset: inst.positionAbs,=0A=
item: inst.currentItem,=0A=
sender: _inst ? _inst.element : null=0A=
};=0A=
}=0A=
=0A=
});=0A=
=0A=
})(jQuery);=0A=
(function( $ ) {=0A=
=0A=
function modifier( fn ) {=0A=
return function() {=0A=
var previous =3D this.element.val();=0A=
fn.apply( this, arguments );=0A=
this._refresh();=0A=
if ( previous !=3D=3D this.element.val() ) {=0A=
this._trigger( "change" );=0A=
}=0A=
};=0A=
}=0A=
=0A=
$.widget( "ui.spinner", {=0A=
version: "1.10.4",=0A=
defaultElement: "",=0A=
widgetEventPrefix: "spin",=0A=
options: {=0A=
culture: null,=0A=
icons: {=0A=
down: "ui-icon-triangle-1-s",=0A=
up: "ui-icon-triangle-1-n"=0A=
},=0A=
incremental: true,=0A=
max: null,=0A=
min: null,=0A=
numberFormat: null,=0A=
page: 10,=0A=
step: 1,=0A=
=0A=
change: null,=0A=
spin: null,=0A=
start: null,=0A=
stop: null=0A=
},=0A=
=0A=
_create: function() {=0A=
// handle string values that need to be parsed=0A=
this._setOption( "max", this.options.max );=0A=
this._setOption( "min", this.options.min );=0A=
this._setOption( "step", this.options.step );=0A=
=0A=
// Only format if there is a value, prevents the field from being =
marked=0A=
// as invalid in Firefox, see #9573.=0A=
if ( this.value() !=3D=3D "" ) {=0A=
// Format the value, but don't constrain.=0A=
this._value( this.element.val(), true );=0A=
}=0A=
=0A=
this._draw();=0A=
this._on( this._events );=0A=
this._refresh();=0A=
=0A=
// turning off autocomplete prevents the browser from remembering the=0A=
// value when navigating through history, so we re-enable autocomplete=0A=
// if the page is unloaded before the widget is destroyed. #7790=0A=
this._on( this.window, {=0A=
beforeunload: function() {=0A=
this.element.removeAttr( "autocomplete" );=0A=
}=0A=
});=0A=
},=0A=
=0A=
_getCreateOptions: function() {=0A=
var options =3D {},=0A=
element =3D this.element;=0A=
=0A=
$.each( [ "min", "max", "step" ], function( i, option ) {=0A=
var value =3D element.attr( option );=0A=
if ( value !=3D=3D undefined && value.length ) {=0A=
options[ option ] =3D value;=0A=
}=0A=
});=0A=
=0A=
return options;=0A=
},=0A=
=0A=
_events: {=0A=
keydown: function( event ) {=0A=
if ( this._start( event ) && this._keydown( event ) ) {=0A=
event.preventDefault();=0A=
}=0A=
},=0A=
keyup: "_stop",=0A=
focus: function() {=0A=
this.previous =3D this.element.val();=0A=
},=0A=
blur: function( event ) {=0A=
if ( this.cancelBlur ) {=0A=
delete this.cancelBlur;=0A=
return;=0A=
}=0A=
=0A=
this._stop();=0A=
this._refresh();=0A=
if ( this.previous !=3D=3D this.element.val() ) {=0A=
this._trigger( "change", event );=0A=
}=0A=
},=0A=
mousewheel: function( event, delta ) {=0A=
if ( !delta ) {=0A=
return;=0A=
}=0A=
if ( !this.spinning && !this._start( event ) ) {=0A=
return false;=0A=
}=0A=
=0A=
this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );=0A=
clearTimeout( this.mousewheelTimer );=0A=
this.mousewheelTimer =3D this._delay(function() {=0A=
if ( this.spinning ) {=0A=
this._stop( event );=0A=
}=0A=
}, 100 );=0A=
event.preventDefault();=0A=
},=0A=
"mousedown .ui-spinner-button": function( event ) {=0A=
var previous;=0A=
=0A=
// We never want the buttons to have focus; whenever the user is=0A=
// interacting with the spinner, the focus should be on the input.=0A=
// If the input is focused then this.previous is properly set from=0A=
// when the input first received focus. If the input is not focused=0A=
// then we need to set this.previous based on the value before =
spinning.=0A=
previous =3D this.element[0] =3D=3D=3D this.document[0].activeElement =
?=0A=
this.previous : this.element.val();=0A=
function checkFocus() {=0A=
var isActive =3D this.element[0] =3D=3D=3D =
this.document[0].activeElement;=0A=
if ( !isActive ) {=0A=
this.element.focus();=0A=
this.previous =3D previous;=0A=
// support: IE=0A=
// IE sets focus asynchronously, so we need to check if focus=0A=
// moved off of the input because the user clicked on the button.=0A=
this._delay(function() {=0A=
this.previous =3D previous;=0A=
});=0A=
}=0A=
}=0A=
=0A=
// ensure focus is on (or stays on) the text field=0A=
event.preventDefault();=0A=
checkFocus.call( this );=0A=
=0A=
// support: IE=0A=
// IE doesn't prevent moving focus even with event.preventDefault()=0A=
// so we set a flag to know when we should ignore the blur event=0A=
// and check (again) if focus moved off of the input.=0A=
this.cancelBlur =3D true;=0A=
this._delay(function() {=0A=
delete this.cancelBlur;=0A=
checkFocus.call( this );=0A=
});=0A=
=0A=
if ( this._start( event ) =3D=3D=3D false ) {=0A=
return;=0A=
}=0A=
=0A=
this._repeat( null, $( event.currentTarget ).hasClass( =
"ui-spinner-up" ) ? 1 : -1, event );=0A=
},=0A=
"mouseup .ui-spinner-button": "_stop",=0A=
"mouseenter .ui-spinner-button": function( event ) {=0A=
// button will add ui-state-active if mouse was down while mouseleave =
and kept down=0A=
if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {=0A=
return;=0A=
}=0A=
=0A=
if ( this._start( event ) =3D=3D=3D false ) {=0A=
return false;=0A=
}=0A=
this._repeat( null, $( event.currentTarget ).hasClass( =
"ui-spinner-up" ) ? 1 : -1, event );=0A=
},=0A=
// TODO: do we really want to consider this a stop?=0A=
// shouldn't we just stop the repeater and wait until mouseup before=0A=
// we trigger the stop event?=0A=
"mouseleave .ui-spinner-button": "_stop"=0A=
},=0A=
=0A=
_draw: function() {=0A=
var uiSpinner =3D this.uiSpinner =3D this.element=0A=
.addClass( "ui-spinner-input" )=0A=
.attr( "autocomplete", "off" )=0A=
.wrap( this._uiSpinnerHtml() )=0A=
.parent()=0A=
// add buttons=0A=
.append( this._buttonHtml() );=0A=
=0A=
this.element.attr( "role", "spinbutton" );=0A=
=0A=
// button bindings=0A=
this.buttons =3D uiSpinner.find( ".ui-spinner-button" )=0A=
.attr( "tabIndex", -1 )=0A=
.button()=0A=
.removeClass( "ui-corner-all" );=0A=
=0A=
// IE 6 doesn't understand height: 50% for the buttons=0A=
// unless the wrapper has an explicit height=0A=
if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&=0A=
uiSpinner.height() > 0 ) {=0A=
uiSpinner.height( uiSpinner.height() );=0A=
}=0A=
=0A=
// disable spinner if element was already disabled=0A=
if ( this.options.disabled ) {=0A=
this.disable();=0A=
}=0A=
},=0A=
=0A=
_keydown: function( event ) {=0A=
var options =3D this.options,=0A=
keyCode =3D $.ui.keyCode;=0A=
=0A=
switch ( event.keyCode ) {=0A=
case keyCode.UP:=0A=
this._repeat( null, 1, event );=0A=
return true;=0A=
case keyCode.DOWN:=0A=
this._repeat( null, -1, event );=0A=
return true;=0A=
case keyCode.PAGE_UP:=0A=
this._repeat( null, options.page, event );=0A=
return true;=0A=
case keyCode.PAGE_DOWN:=0A=
this._repeat( null, -options.page, event );=0A=
return true;=0A=
}=0A=
=0A=
return false;=0A=
},=0A=
=0A=
_uiSpinnerHtml: function() {=0A=
return "";=0A=
},=0A=
=0A=
_buttonHtml: function() {=0A=
return "" +=0A=
"" +=0A=
"▲" +=0A=
"" +=0A=
"" +=0A=
"▼" +=0A=
"";=0A=
},=0A=
=0A=
_start: function( event ) {=0A=
if ( !this.spinning && this._trigger( "start", event ) =3D=3D=3D false =
) {=0A=
return false;=0A=
}=0A=
=0A=
if ( !this.counter ) {=0A=
this.counter =3D 1;=0A=
}=0A=
this.spinning =3D true;=0A=
return true;=0A=
},=0A=
=0A=
_repeat: function( i, steps, event ) {=0A=
i =3D i || 500;=0A=
=0A=
clearTimeout( this.timer );=0A=
this.timer =3D this._delay(function() {=0A=
this._repeat( 40, steps, event );=0A=
}, i );=0A=
=0A=
this._spin( steps * this.options.step, event );=0A=
},=0A=
=0A=
_spin: function( step, event ) {=0A=
var value =3D this.value() || 0;=0A=
=0A=
if ( !this.counter ) {=0A=
this.counter =3D 1;=0A=
}=0A=
=0A=
value =3D this._adjustValue( value + step * this._increment( =
this.counter ) );=0A=
=0A=
if ( !this.spinning || this._trigger( "spin", event, { value: value } =
) !=3D=3D false) {=0A=
this._value( value );=0A=
this.counter++;=0A=
}=0A=
},=0A=
=0A=
_increment: function( i ) {=0A=
var incremental =3D this.options.incremental;=0A=
=0A=
if ( incremental ) {=0A=
return $.isFunction( incremental ) ?=0A=
incremental( i ) :=0A=
Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );=0A=
}=0A=
=0A=
return 1;=0A=
},=0A=
=0A=
_precision: function() {=0A=
var precision =3D this._precisionOf( this.options.step );=0A=
if ( this.options.min !=3D=3D null ) {=0A=
precision =3D Math.max( precision, this._precisionOf( =
this.options.min ) );=0A=
}=0A=
return precision;=0A=
},=0A=
=0A=
_precisionOf: function( num ) {=0A=
var str =3D num.toString(),=0A=
decimal =3D str.indexOf( "." );=0A=
return decimal =3D=3D=3D -1 ? 0 : str.length - decimal - 1;=0A=
},=0A=
=0A=
_adjustValue: function( value ) {=0A=
var base, aboveMin,=0A=
options =3D this.options;=0A=
=0A=
// make sure we're at a valid step=0A=
// - find out where we are relative to the base (min or 0)=0A=
base =3D options.min !=3D=3D null ? options.min : 0;=0A=
aboveMin =3D value - base;=0A=
// - round to the nearest step=0A=
aboveMin =3D Math.round(aboveMin / options.step) * options.step;=0A=
// - rounding is based on 0, so adjust back to our base=0A=
value =3D base + aboveMin;=0A=
=0A=
// fix precision from bad JS floating point math=0A=
value =3D parseFloat( value.toFixed( this._precision() ) );=0A=
=0A=
// clamp the value=0A=
if ( options.max !=3D=3D null && value > options.max) {=0A=
return options.max;=0A=
}=0A=
if ( options.min !=3D=3D null && value < options.min ) {=0A=
return options.min;=0A=
}=0A=
=0A=
return value;=0A=
},=0A=
=0A=
_stop: function( event ) {=0A=
if ( !this.spinning ) {=0A=
return;=0A=
}=0A=
=0A=
clearTimeout( this.timer );=0A=
clearTimeout( this.mousewheelTimer );=0A=
this.counter =3D 0;=0A=
this.spinning =3D false;=0A=
this._trigger( "stop", event );=0A=
},=0A=
=0A=
_setOption: function( key, value ) {=0A=
if ( key =3D=3D=3D "culture" || key =3D=3D=3D "numberFormat" ) {=0A=
var prevValue =3D this._parse( this.element.val() );=0A=
this.options[ key ] =3D value;=0A=
this.element.val( this._format( prevValue ) );=0A=
return;=0A=
}=0A=
=0A=
if ( key =3D=3D=3D "max" || key =3D=3D=3D "min" || key =3D=3D=3D =
"step" ) {=0A=
if ( typeof value =3D=3D=3D "string" ) {=0A=
value =3D this._parse( value );=0A=
}=0A=
}=0A=
if ( key =3D=3D=3D "icons" ) {=0A=
this.buttons.first().find( ".ui-icon" )=0A=
.removeClass( this.options.icons.up )=0A=
.addClass( value.up );=0A=
this.buttons.last().find( ".ui-icon" )=0A=
.removeClass( this.options.icons.down )=0A=
.addClass( value.down );=0A=
}=0A=
=0A=
this._super( key, value );=0A=
=0A=
if ( key =3D=3D=3D "disabled" ) {=0A=
if ( value ) {=0A=
this.element.prop( "disabled", true );=0A=
this.buttons.button( "disable" );=0A=
} else {=0A=
this.element.prop( "disabled", false );=0A=
this.buttons.button( "enable" );=0A=
}=0A=
}=0A=
},=0A=
=0A=
_setOptions: modifier(function( options ) {=0A=
this._super( options );=0A=
this._value( this.element.val() );=0A=
}),=0A=
=0A=
_parse: function( val ) {=0A=
if ( typeof val =3D=3D=3D "string" && val !=3D=3D "" ) {=0A=
val =3D window.Globalize && this.options.numberFormat ?=0A=
Globalize.parseFloat( val, 10, this.options.culture ) : +val;=0A=
}=0A=
return val =3D=3D=3D "" || isNaN( val ) ? null : val;=0A=
},=0A=
=0A=
_format: function( value ) {=0A=
if ( value =3D=3D=3D "" ) {=0A=
return "";=0A=
}=0A=
return window.Globalize && this.options.numberFormat ?=0A=
Globalize.format( value, this.options.numberFormat, =
this.options.culture ) :=0A=
value;=0A=
},=0A=
=0A=
_refresh: function() {=0A=
this.element.attr({=0A=
"aria-valuemin": this.options.min,=0A=
"aria-valuemax": this.options.max,=0A=
// TODO: what should we do with values that can't be parsed?=0A=
"aria-valuenow": this._parse( this.element.val() )=0A=
});=0A=
},=0A=
=0A=
// update the value without triggering change=0A=
_value: function( value, allowAny ) {=0A=
var parsed;=0A=
if ( value !=3D=3D "" ) {=0A=
parsed =3D this._parse( value );=0A=
if ( parsed !=3D=3D null ) {=0A=
if ( !allowAny ) {=0A=
parsed =3D this._adjustValue( parsed );=0A=
}=0A=
value =3D this._format( parsed );=0A=
}=0A=
}=0A=
this.element.val( value );=0A=
this._refresh();=0A=
},=0A=
=0A=
_destroy: function() {=0A=
this.element=0A=
.removeClass( "ui-spinner-input" )=0A=
.prop( "disabled", false )=0A=
.removeAttr( "autocomplete" )=0A=
.removeAttr( "role" )=0A=
.removeAttr( "aria-valuemin" )=0A=
.removeAttr( "aria-valuemax" )=0A=
.removeAttr( "aria-valuenow" );=0A=
this.uiSpinner.replaceWith( this.element );=0A=
},=0A=
=0A=
stepUp: modifier(function( steps ) {=0A=
this._stepUp( steps );=0A=
}),=0A=
_stepUp: function( steps ) {=0A=
if ( this._start() ) {=0A=
this._spin( (steps || 1) * this.options.step );=0A=
this._stop();=0A=
}=0A=
},=0A=
=0A=
stepDown: modifier(function( steps ) {=0A=
this._stepDown( steps );=0A=
}),=0A=
_stepDown: function( steps ) {=0A=
if ( this._start() ) {=0A=
this._spin( (steps || 1) * -this.options.step );=0A=
this._stop();=0A=
}=0A=
},=0A=
=0A=
pageUp: modifier(function( pages ) {=0A=
this._stepUp( (pages || 1) * this.options.page );=0A=
}),=0A=
=0A=
pageDown: modifier(function( pages ) {=0A=
this._stepDown( (pages || 1) * this.options.page );=0A=
}),=0A=
=0A=
value: function( newVal ) {=0A=
if ( !arguments.length ) {=0A=
return this._parse( this.element.val() );=0A=
}=0A=
modifier( this._value ).call( this, newVal );=0A=
},=0A=
=0A=
widget: function() {=0A=
return this.uiSpinner;=0A=
}=0A=
});=0A=
=0A=
}( jQuery ) );=0A=
(function( $, undefined ) {=0A=
=0A=
var tabId =3D 0,=0A=
rhash =3D /#.*$/;=0A=
=0A=
function getNextTabId() {=0A=
return ++tabId;=0A=
}=0A=
=0A=
function isLocal( anchor ) {=0A=
// support: IE7=0A=
// IE7 doesn't normalize the href property when set via script (#9317)=0A=
anchor =3D anchor.cloneNode( false );=0A=
=0A=
return anchor.hash.length > 1 &&=0A=
decodeURIComponent( anchor.href.replace( rhash, "" ) ) =3D=3D=3D=0A=
decodeURIComponent( location.href.replace( rhash, "" ) );=0A=
}=0A=
=0A=
$.widget( "ui.tabs", {=0A=
version: "1.10.4",=0A=
delay: 300,=0A=
options: {=0A=
active: null,=0A=
collapsible: false,=0A=
event: "click",=0A=
heightStyle: "content",=0A=
hide: null,=0A=
show: null,=0A=
=0A=
// callbacks=0A=
activate: null,=0A=
beforeActivate: null,=0A=
beforeLoad: null,=0A=
load: null=0A=
},=0A=
=0A=
_create: function() {=0A=
var that =3D this,=0A=
options =3D this.options;=0A=
=0A=
this.running =3D false;=0A=
=0A=
this.element=0A=
.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )=0A=
.toggleClass( "ui-tabs-collapsible", options.collapsible )=0A=
// Prevent users from focusing disabled tabs via click=0A=
.delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, =
function( event ) {=0A=
if ( $( this ).is( ".ui-state-disabled" ) ) {=0A=
event.preventDefault();=0A=
}=0A=
})=0A=
// support: IE <9=0A=
// Preventing the default action in mousedown doesn't prevent IE=0A=
// from focusing the element, so if the anchor gets focused, blur.=0A=
// We don't have to worry about focusing the previously focused=0A=
// element since clicking on a non-focusable element should focus=0A=
// the body anyway.=0A=
.delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, =
function() {=0A=
if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {=0A=
this.blur();=0A=
}=0A=
});=0A=
=0A=
this._processTabs();=0A=
options.active =3D this._initialActive();=0A=
=0A=
// Take disabling tabs via class attribute from HTML=0A=
// into account and update option properly.=0A=
if ( $.isArray( options.disabled ) ) {=0A=
options.disabled =3D $.unique( options.disabled.concat(=0A=
$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {=0A=
return that.tabs.index( li );=0A=
})=0A=
) ).sort();=0A=
}=0A=
=0A=
// check for length avoids error when initializing empty list=0A=
if ( this.options.active !=3D=3D false && this.anchors.length ) {=0A=
this.active =3D this._findActive( options.active );=0A=
} else {=0A=
this.active =3D $();=0A=
}=0A=
=0A=
this._refresh();=0A=
=0A=
if ( this.active.length ) {=0A=
this.load( options.active );=0A=
}=0A=
},=0A=
=0A=
_initialActive: function() {=0A=
var active =3D this.options.active,=0A=
collapsible =3D this.options.collapsible,=0A=
locationHash =3D location.hash.substring( 1 );=0A=
=0A=
if ( active =3D=3D=3D null ) {=0A=
// check the fragment identifier in the URL=0A=
if ( locationHash ) {=0A=
this.tabs.each(function( i, tab ) {=0A=
if ( $( tab ).attr( "aria-controls" ) =3D=3D=3D locationHash ) {=0A=
active =3D i;=0A=
return false;=0A=
}=0A=
});=0A=
}=0A=
=0A=
// check for a tab marked active via a class=0A=
if ( active =3D=3D=3D null ) {=0A=
active =3D this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );=0A=
}=0A=
=0A=
// no active tab, set to false=0A=
if ( active =3D=3D=3D null || active =3D=3D=3D -1 ) {=0A=
active =3D this.tabs.length ? 0 : false;=0A=
}=0A=
}=0A=
=0A=
// handle numbers: negative, out of range=0A=
if ( active !=3D=3D false ) {=0A=
active =3D this.tabs.index( this.tabs.eq( active ) );=0A=
if ( active =3D=3D=3D -1 ) {=0A=
active =3D collapsible ? false : 0;=0A=
}=0A=
}=0A=
=0A=
// don't allow collapsible: false and active: false=0A=
if ( !collapsible && active =3D=3D=3D false && this.anchors.length ) {=0A=
active =3D 0;=0A=
}=0A=
=0A=
return active;=0A=
},=0A=
=0A=
_getCreateEventData: function() {=0A=
return {=0A=
tab: this.active,=0A=
panel: !this.active.length ? $() : this._getPanelForTab( this.active )=0A=
};=0A=
},=0A=
=0A=
_tabKeydown: function( event ) {=0A=
var focusedTab =3D $( this.document[0].activeElement ).closest( "li" ),=0A=
selectedIndex =3D this.tabs.index( focusedTab ),=0A=
goingForward =3D true;=0A=
=0A=
if ( this._handlePageNav( event ) ) {=0A=
return;=0A=
}=0A=
=0A=
switch ( event.keyCode ) {=0A=
case $.ui.keyCode.RIGHT:=0A=
case $.ui.keyCode.DOWN:=0A=
selectedIndex++;=0A=
break;=0A=
case $.ui.keyCode.UP:=0A=
case $.ui.keyCode.LEFT:=0A=
goingForward =3D false;=0A=
selectedIndex--;=0A=
break;=0A=
case $.ui.keyCode.END:=0A=
selectedIndex =3D this.anchors.length - 1;=0A=
break;=0A=
case $.ui.keyCode.HOME:=0A=
selectedIndex =3D 0;=0A=
break;=0A=
case $.ui.keyCode.SPACE:=0A=
// Activate only, no collapsing=0A=
event.preventDefault();=0A=
clearTimeout( this.activating );=0A=
this._activate( selectedIndex );=0A=
return;=0A=
case $.ui.keyCode.ENTER:=0A=
// Toggle (cancel delayed activation, allow collapsing)=0A=
event.preventDefault();=0A=
clearTimeout( this.activating );=0A=
// Determine if we should collapse or activate=0A=
this._activate( selectedIndex =3D=3D=3D this.options.active ? false =
: selectedIndex );=0A=
return;=0A=
default:=0A=
return;=0A=
}=0A=
=0A=
// Focus the appropriate tab, based on which key was pressed=0A=
event.preventDefault();=0A=
clearTimeout( this.activating );=0A=
selectedIndex =3D this._focusNextTab( selectedIndex, goingForward );=0A=
=0A=
// Navigating with control key will prevent automatic activation=0A=
if ( !event.ctrlKey ) {=0A=
// Update aria-selected immediately so that AT think the tab is =
already selected.=0A=
// Otherwise AT may confuse the user by stating that they need to =
activate the tab,=0A=
// but the tab will already be activated by the time the announcement =
finishes.=0A=
focusedTab.attr( "aria-selected", "false" );=0A=
this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );=0A=
=0A=
this.activating =3D this._delay(function() {=0A=
this.option( "active", selectedIndex );=0A=
}, this.delay );=0A=
}=0A=
},=0A=
=0A=
_panelKeydown: function( event ) {=0A=
if ( this._handlePageNav( event ) ) {=0A=
return;=0A=
}=0A=
=0A=
// Ctrl+up moves focus to the current tab=0A=
if ( event.ctrlKey && event.keyCode =3D=3D=3D $.ui.keyCode.UP ) {=0A=
event.preventDefault();=0A=
this.active.focus();=0A=
}=0A=
},=0A=
=0A=
// Alt+page up/down moves focus to the previous/next tab (and activates)=0A=
_handlePageNav: function( event ) {=0A=
if ( event.altKey && event.keyCode =3D=3D=3D $.ui.keyCode.PAGE_UP ) {=0A=
this._activate( this._focusNextTab( this.options.active - 1, false ) =
);=0A=
return true;=0A=
}=0A=
if ( event.altKey && event.keyCode =3D=3D=3D $.ui.keyCode.PAGE_DOWN ) {=0A=
this._activate( this._focusNextTab( this.options.active + 1, true ) );=0A=
return true;=0A=
}=0A=
},=0A=
=0A=
_findNextTab: function( index, goingForward ) {=0A=
var lastTabIndex =3D this.tabs.length - 1;=0A=
=0A=
function constrain() {=0A=
if ( index > lastTabIndex ) {=0A=
index =3D 0;=0A=
}=0A=
if ( index < 0 ) {=0A=
index =3D lastTabIndex;=0A=
}=0A=
return index;=0A=
}=0A=
=0A=
while ( $.inArray( constrain(), this.options.disabled ) !=3D=3D -1 ) {=0A=
index =3D goingForward ? index + 1 : index - 1;=0A=
}=0A=
=0A=
return index;=0A=
},=0A=
=0A=
_focusNextTab: function( index, goingForward ) {=0A=
index =3D this._findNextTab( index, goingForward );=0A=
this.tabs.eq( index ).focus();=0A=
return index;=0A=
},=0A=
=0A=
_setOption: function( key, value ) {=0A=
if ( key =3D=3D=3D "active" ) {=0A=
// _activate() will handle invalid values and update this.options=0A=
this._activate( value );=0A=
return;=0A=
}=0A=
=0A=
if ( key =3D=3D=3D "disabled" ) {=0A=
// don't use the widget factory's disabled handling=0A=
this._setupDisabled( value );=0A=
return;=0A=
}=0A=
=0A=
this._super( key, value);=0A=
=0A=
if ( key =3D=3D=3D "collapsible" ) {=0A=
this.element.toggleClass( "ui-tabs-collapsible", value );=0A=
// Setting collapsible: false while collapsed; open first panel=0A=
if ( !value && this.options.active =3D=3D=3D false ) {=0A=
this._activate( 0 );=0A=
}=0A=
}=0A=
=0A=
if ( key =3D=3D=3D "event" ) {=0A=
this._setupEvents( value );=0A=
}=0A=
=0A=
if ( key =3D=3D=3D "heightStyle" ) {=0A=
this._setupHeightStyle( value );=0A=
}=0A=
},=0A=
=0A=
_tabId: function( tab ) {=0A=
return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();=0A=
},=0A=
=0A=
_sanitizeSelector: function( hash ) {=0A=
return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=3D>?@\[\]\^`{|}~]/g, =
"\\$&" ) : "";=0A=
},=0A=
=0A=
refresh: function() {=0A=
var options =3D this.options,=0A=
lis =3D this.tablist.children( ":has(a[href])" );=0A=
=0A=
// get disabled tabs from class attribute from HTML=0A=
// this will get converted to a boolean if needed in _refresh()=0A=
options.disabled =3D $.map( lis.filter( ".ui-state-disabled" ), =
function( tab ) {=0A=
return lis.index( tab );=0A=
});=0A=
=0A=
this._processTabs();=0A=
=0A=
// was collapsed or no tabs=0A=
if ( options.active =3D=3D=3D false || !this.anchors.length ) {=0A=
options.active =3D false;=0A=
this.active =3D $();=0A=
// was active, but active tab is gone=0A=
} else if ( this.active.length && !$.contains( this.tablist[ 0 ], =
this.active[ 0 ] ) ) {=0A=
// all remaining tabs are disabled=0A=
if ( this.tabs.length =3D=3D=3D options.disabled.length ) {=0A=
options.active =3D false;=0A=
this.active =3D $();=0A=
// activate previous tab=0A=
} else {=0A=
this._activate( this._findNextTab( Math.max( 0, options.active - 1 =
), false ) );=0A=
}=0A=
// was active, active tab still exists=0A=
} else {=0A=
// make sure active index is correct=0A=
options.active =3D this.tabs.index( this.active );=0A=
}=0A=
=0A=
this._refresh();=0A=
},=0A=
=0A=
_refresh: function() {=0A=
this._setupDisabled( this.options.disabled );=0A=
this._setupEvents( this.options.event );=0A=
this._setupHeightStyle( this.options.heightStyle );=0A=
=0A=
this.tabs.not( this.active ).attr({=0A=
"aria-selected": "false",=0A=
tabIndex: -1=0A=
});=0A=
this.panels.not( this._getPanelForTab( this.active ) )=0A=
.hide()=0A=
.attr({=0A=
"aria-expanded": "false",=0A=
"aria-hidden": "true"=0A=
});=0A=
=0A=
// Make sure one tab is in the tab order=0A=
if ( !this.active.length ) {=0A=
this.tabs.eq( 0 ).attr( "tabIndex", 0 );=0A=
} else {=0A=
this.active=0A=
.addClass( "ui-tabs-active ui-state-active" )=0A=
.attr({=0A=
"aria-selected": "true",=0A=
tabIndex: 0=0A=
});=0A=
this._getPanelForTab( this.active )=0A=
.show()=0A=
.attr({=0A=
"aria-expanded": "true",=0A=
"aria-hidden": "false"=0A=
});=0A=
}=0A=
},=0A=
=0A=
_processTabs: function() {=0A=
var that =3D this;=0A=
=0A=
this.tablist =3D this._getList()=0A=
.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix =
ui-widget-header ui-corner-all" )=0A=
.attr( "role", "tablist" );=0A=
=0A=
this.tabs =3D this.tablist.find( "> li:has(a[href])" )=0A=
.addClass( "ui-state-default ui-corner-top" )=0A=
.attr({=0A=
role: "tab",=0A=
tabIndex: -1=0A=
});=0A=
=0A=
this.anchors =3D this.tabs.map(function() {=0A=
return $( "a", this )[ 0 ];=0A=
})=0A=
.addClass( "ui-tabs-anchor" )=0A=
.attr({=0A=
role: "presentation",=0A=
tabIndex: -1=0A=
});=0A=
=0A=
this.panels =3D $();=0A=
=0A=
this.anchors.each(function( i, anchor ) {=0A=
var selector, panel, panelId,=0A=
anchorId =3D $( anchor ).uniqueId().attr( "id" ),=0A=
tab =3D $( anchor ).closest( "li" ),=0A=
originalAriaControls =3D tab.attr( "aria-controls" );=0A=
=0A=
// inline tab=0A=
if ( isLocal( anchor ) ) {=0A=
selector =3D anchor.hash;=0A=
panel =3D that.element.find( that._sanitizeSelector( selector ) );=0A=
// remote tab=0A=
} else {=0A=
panelId =3D that._tabId( tab );=0A=
selector =3D "#" + panelId;=0A=
panel =3D that.element.find( selector );=0A=
if ( !panel.length ) {=0A=
panel =3D that._createPanel( panelId );=0A=
panel.insertAfter( that.panels[ i - 1 ] || that.tablist );=0A=
}=0A=
panel.attr( "aria-live", "polite" );=0A=
}=0A=
=0A=
if ( panel.length) {=0A=
that.panels =3D that.panels.add( panel );=0A=
}=0A=
if ( originalAriaControls ) {=0A=
tab.data( "ui-tabs-aria-controls", originalAriaControls );=0A=
}=0A=
tab.attr({=0A=
"aria-controls": selector.substring( 1 ),=0A=
"aria-labelledby": anchorId=0A=
});=0A=
panel.attr( "aria-labelledby", anchorId );=0A=
});=0A=
=0A=
this.panels=0A=
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )=0A=
.attr( "role", "tabpanel" );=0A=
},=0A=
=0A=
// allow overriding how to find the list for rare usage scenarios =
(#7715)=0A=
_getList: function() {=0A=
return this.tablist || this.element.find( "ol,ul" ).eq( 0 );=0A=
},=0A=
=0A=
_createPanel: function( id ) {=0A=
return $( "" )=0A=
.attr( "id", id )=0A=
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )=0A=
.data( "ui-tabs-destroy", true );=0A=
},=0A=
=0A=
_setupDisabled: function( disabled ) {=0A=
if ( $.isArray( disabled ) ) {=0A=
if ( !disabled.length ) {=0A=
disabled =3D false;=0A=
} else if ( disabled.length =3D=3D=3D this.anchors.length ) {=0A=
disabled =3D true;=0A=
}=0A=
}=0A=
=0A=
// disable tabs=0A=
for ( var i =3D 0, li; ( li =3D this.tabs[ i ] ); i++ ) {=0A=
if ( disabled =3D=3D=3D true || $.inArray( i, disabled ) !=3D=3D -1 ) =
{=0A=
$( li )=0A=
.addClass( "ui-state-disabled" )=0A=
.attr( "aria-disabled", "true" );=0A=
} else {=0A=
$( li )=0A=
.removeClass( "ui-state-disabled" )=0A=
.removeAttr( "aria-disabled" );=0A=
}=0A=
}=0A=
=0A=
this.options.disabled =3D disabled;=0A=
},=0A=
=0A=
_setupEvents: function( event ) {=0A=
var events =3D {=0A=
click: function( event ) {=0A=
event.preventDefault();=0A=
}=0A=
};=0A=
if ( event ) {=0A=
$.each( event.split(" "), function( index, eventName ) {=0A=
events[ eventName ] =3D "_eventHandler";=0A=
});=0A=
}=0A=
=0A=
this._off( this.anchors.add( this.tabs ).add( this.panels ) );=0A=
this._on( this.anchors, events );=0A=
this._on( this.tabs, { keydown: "_tabKeydown" } );=0A=
this._on( this.panels, { keydown: "_panelKeydown" } );=0A=
=0A=
this._focusable( this.tabs );=0A=
this._hoverable( this.tabs );=0A=
},=0A=
=0A=
_setupHeightStyle: function( heightStyle ) {=0A=
var maxHeight,=0A=
parent =3D this.element.parent();=0A=
=0A=
if ( heightStyle =3D=3D=3D "fill" ) {=0A=
maxHeight =3D parent.height();=0A=
maxHeight -=3D this.element.outerHeight() - this.element.height();=0A=
=0A=
this.element.siblings( ":visible" ).each(function() {=0A=
var elem =3D $( this ),=0A=
position =3D elem.css( "position" );=0A=
=0A=
if ( position =3D=3D=3D "absolute" || position =3D=3D=3D "fixed" ) {=0A=
return;=0A=
}=0A=
maxHeight -=3D elem.outerHeight( true );=0A=
});=0A=
=0A=
this.element.children().not( this.panels ).each(function() {=0A=
maxHeight -=3D $( this ).outerHeight( true );=0A=
});=0A=
=0A=
this.panels.each(function() {=0A=
$( this ).height( Math.max( 0, maxHeight -=0A=
$( this ).innerHeight() + $( this ).height() ) );=0A=
})=0A=
.css( "overflow", "auto" );=0A=
} else if ( heightStyle =3D=3D=3D "auto" ) {=0A=
maxHeight =3D 0;=0A=
this.panels.each(function() {=0A=
maxHeight =3D Math.max( maxHeight, $( this ).height( "" ).height() );=0A=
}).height( maxHeight );=0A=
}=0A=
},=0A=
=0A=
_eventHandler: function( event ) {=0A=
var options =3D this.options,=0A=
active =3D this.active,=0A=
anchor =3D $( event.currentTarget ),=0A=
tab =3D anchor.closest( "li" ),=0A=
clickedIsActive =3D tab[ 0 ] =3D=3D=3D active[ 0 ],=0A=
collapsing =3D clickedIsActive && options.collapsible,=0A=
toShow =3D collapsing ? $() : this._getPanelForTab( tab ),=0A=
toHide =3D !active.length ? $() : this._getPanelForTab( active ),=0A=
eventData =3D {=0A=
oldTab: active,=0A=
oldPanel: toHide,=0A=
newTab: collapsing ? $() : tab,=0A=
newPanel: toShow=0A=
};=0A=
=0A=
event.preventDefault();=0A=
=0A=
if ( tab.hasClass( "ui-state-disabled" ) ||=0A=
// tab is already loading=0A=
tab.hasClass( "ui-tabs-loading" ) ||=0A=
// can't switch durning an animation=0A=
this.running ||=0A=
// click on active header, but not collapsible=0A=
( clickedIsActive && !options.collapsible ) ||=0A=
// allow canceling activation=0A=
( this._trigger( "beforeActivate", event, eventData ) =3D=3D=3D =
false ) ) {=0A=
return;=0A=
}=0A=
=0A=
options.active =3D collapsing ? false : this.tabs.index( tab );=0A=
=0A=
this.active =3D clickedIsActive ? $() : tab;=0A=
if ( this.xhr ) {=0A=
this.xhr.abort();=0A=
}=0A=
=0A=
if ( !toHide.length && !toShow.length ) {=0A=
$.error( "jQuery UI Tabs: Mismatching fragment identifier." );=0A=
}=0A=
=0A=
if ( toShow.length ) {=0A=
this.load( this.tabs.index( tab ), event );=0A=
}=0A=
this._toggle( event, eventData );=0A=
},=0A=
=0A=
// handles show/hide for selecting tabs=0A=
_toggle: function( event, eventData ) {=0A=
var that =3D this,=0A=
toShow =3D eventData.newPanel,=0A=
toHide =3D eventData.oldPanel;=0A=
=0A=
this.running =3D true;=0A=
=0A=
function complete() {=0A=
that.running =3D false;=0A=
that._trigger( "activate", event, eventData );=0A=
}=0A=
=0A=
function show() {=0A=
eventData.newTab.closest( "li" ).addClass( "ui-tabs-active =
ui-state-active" );=0A=
=0A=
if ( toShow.length && that.options.show ) {=0A=
that._show( toShow, that.options.show, complete );=0A=
} else {=0A=
toShow.show();=0A=
complete();=0A=
}=0A=
}=0A=
=0A=
// start out by hiding, then showing, then completing=0A=
if ( toHide.length && this.options.hide ) {=0A=
this._hide( toHide, this.options.hide, function() {=0A=
eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active =
ui-state-active" );=0A=
show();=0A=
});=0A=
} else {=0A=
eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active =
ui-state-active" );=0A=
toHide.hide();=0A=
show();=0A=
}=0A=
=0A=
toHide.attr({=0A=
"aria-expanded": "false",=0A=
"aria-hidden": "true"=0A=
});=0A=
eventData.oldTab.attr( "aria-selected", "false" );=0A=
// If we're switching tabs, remove the old tab from the tab order.=0A=
// If we're opening from collapsed state, remove the previous tab from =
the tab order.=0A=
// If we're collapsing, then keep the collapsing tab in the tab order.=0A=
if ( toShow.length && toHide.length ) {=0A=
eventData.oldTab.attr( "tabIndex", -1 );=0A=
} else if ( toShow.length ) {=0A=
this.tabs.filter(function() {=0A=
return $( this ).attr( "tabIndex" ) =3D=3D=3D 0;=0A=
})=0A=
.attr( "tabIndex", -1 );=0A=
}=0A=
=0A=
toShow.attr({=0A=
"aria-expanded": "true",=0A=
"aria-hidden": "false"=0A=
});=0A=
eventData.newTab.attr({=0A=
"aria-selected": "true",=0A=
tabIndex: 0=0A=
});=0A=
},=0A=
=0A=
_activate: function( index ) {=0A=
var anchor,=0A=
active =3D this._findActive( index );=0A=
=0A=
// trying to activate the already active panel=0A=
if ( active[ 0 ] =3D=3D=3D this.active[ 0 ] ) {=0A=
return;=0A=
}=0A=
=0A=
// trying to collapse, simulate a click on the current active header=0A=
if ( !active.length ) {=0A=
active =3D this.active;=0A=
}=0A=
=0A=
anchor =3D active.find( ".ui-tabs-anchor" )[ 0 ];=0A=
this._eventHandler({=0A=
target: anchor,=0A=
currentTarget: anchor,=0A=
preventDefault: $.noop=0A=
});=0A=
},=0A=
=0A=
_findActive: function( index ) {=0A=
return index =3D=3D=3D false ? $() : this.tabs.eq( index );=0A=
},=0A=
=0A=
_getIndex: function( index ) {=0A=
// meta-function to give users option to provide a href string instead =
of a numerical index.=0A=
if ( typeof index =3D=3D=3D "string" ) {=0A=
index =3D this.anchors.index( this.anchors.filter( "[href$=3D'" + =
index + "']" ) );=0A=
}=0A=
=0A=
return index;=0A=
},=0A=
=0A=
_destroy: function() {=0A=
if ( this.xhr ) {=0A=
this.xhr.abort();=0A=
}=0A=
=0A=
this.element.removeClass( "ui-tabs ui-widget ui-widget-content =
ui-corner-all ui-tabs-collapsible" );=0A=
=0A=
this.tablist=0A=
.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix =
ui-widget-header ui-corner-all" )=0A=
.removeAttr( "role" );=0A=
=0A=
this.anchors=0A=
.removeClass( "ui-tabs-anchor" )=0A=
.removeAttr( "role" )=0A=
.removeAttr( "tabIndex" )=0A=
.removeUniqueId();=0A=
=0A=
this.tabs.add( this.panels ).each(function() {=0A=
if ( $.data( this, "ui-tabs-destroy" ) ) {=0A=
$( this ).remove();=0A=
} else {=0A=
$( this )=0A=
.removeClass( "ui-state-default ui-state-active ui-state-disabled " =
+=0A=
"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active =
ui-tabs-panel" )=0A=
.removeAttr( "tabIndex" )=0A=
.removeAttr( "aria-live" )=0A=
.removeAttr( "aria-busy" )=0A=
.removeAttr( "aria-selected" )=0A=
.removeAttr( "aria-labelledby" )=0A=
.removeAttr( "aria-hidden" )=0A=
.removeAttr( "aria-expanded" )=0A=
.removeAttr( "role" );=0A=
}=0A=
});=0A=
=0A=
this.tabs.each(function() {=0A=
var li =3D $( this ),=0A=
prev =3D li.data( "ui-tabs-aria-controls" );=0A=
if ( prev ) {=0A=
li=0A=
.attr( "aria-controls", prev )=0A=
.removeData( "ui-tabs-aria-controls" );=0A=
} else {=0A=
li.removeAttr( "aria-controls" );=0A=
}=0A=
});=0A=
=0A=
this.panels.show();=0A=
=0A=
if ( this.options.heightStyle !=3D=3D "content" ) {=0A=
this.panels.css( "height", "" );=0A=
}=0A=
},=0A=
=0A=
enable: function( index ) {=0A=
var disabled =3D this.options.disabled;=0A=
if ( disabled =3D=3D=3D false ) {=0A=
return;=0A=
}=0A=
=0A=
if ( index =3D=3D=3D undefined ) {=0A=
disabled =3D false;=0A=
} else {=0A=
index =3D this._getIndex( index );=0A=
if ( $.isArray( disabled ) ) {=0A=
disabled =3D $.map( disabled, function( num ) {=0A=
return num !=3D=3D index ? num : null;=0A=
});=0A=
} else {=0A=
disabled =3D $.map( this.tabs, function( li, num ) {=0A=
return num !=3D=3D index ? num : null;=0A=
});=0A=
}=0A=
}=0A=
this._setupDisabled( disabled );=0A=
},=0A=
=0A=
disable: function( index ) {=0A=
var disabled =3D this.options.disabled;=0A=
if ( disabled =3D=3D=3D true ) {=0A=
return;=0A=
}=0A=
=0A=
if ( index =3D=3D=3D undefined ) {=0A=
disabled =3D true;=0A=
} else {=0A=
index =3D this._getIndex( index );=0A=
if ( $.inArray( index, disabled ) !=3D=3D -1 ) {=0A=
return;=0A=
}=0A=
if ( $.isArray( disabled ) ) {=0A=
disabled =3D $.merge( [ index ], disabled ).sort();=0A=
} else {=0A=
disabled =3D [ index ];=0A=
}=0A=
}=0A=
this._setupDisabled( disabled );=0A=
},=0A=
=0A=
load: function( index, event ) {=0A=
index =3D this._getIndex( index );=0A=
var that =3D this,=0A=
tab =3D this.tabs.eq( index ),=0A=
anchor =3D tab.find( ".ui-tabs-anchor" ),=0A=
panel =3D this._getPanelForTab( tab ),=0A=
eventData =3D {=0A=
tab: tab,=0A=
panel: panel=0A=
};=0A=
=0A=
// not remote=0A=
if ( isLocal( anchor[ 0 ] ) ) {=0A=
return;=0A=
}=0A=
=0A=
this.xhr =3D $.ajax( this._ajaxSettings( anchor, event, eventData ) );=0A=
=0A=
// support: jQuery <1.8=0A=
// jQuery <1.8 returns false if the request is canceled in beforeSend,=0A=
// but as of 1.8, $.ajax() always returns a jqXHR object.=0A=
if ( this.xhr && this.xhr.statusText !=3D=3D "canceled" ) {=0A=
tab.addClass( "ui-tabs-loading" );=0A=
panel.attr( "aria-busy", "true" );=0A=
=0A=
this.xhr=0A=
.success(function( response ) {=0A=
// support: jQuery <1.8=0A=
// http://bugs.jquery.com/ticket/11778=0A=
setTimeout(function() {=0A=
panel.html( response );=0A=
that._trigger( "load", event, eventData );=0A=
}, 1 );=0A=
})=0A=
.complete(function( jqXHR, status ) {=0A=
// support: jQuery <1.8=0A=
// http://bugs.jquery.com/ticket/11778=0A=
setTimeout(function() {=0A=
if ( status =3D=3D=3D "abort" ) {=0A=
that.panels.stop( false, true );=0A=
}=0A=
=0A=
tab.removeClass( "ui-tabs-loading" );=0A=
panel.removeAttr( "aria-busy" );=0A=
=0A=
if ( jqXHR =3D=3D=3D that.xhr ) {=0A=
delete that.xhr;=0A=
}=0A=
}, 1 );=0A=
});=0A=
}=0A=
},=0A=
=0A=
_ajaxSettings: function( anchor, event, eventData ) {=0A=
var that =3D this;=0A=
return {=0A=
url: anchor.attr( "href" ),=0A=
beforeSend: function( jqXHR, settings ) {=0A=
return that._trigger( "beforeLoad", event,=0A=
$.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );=0A=
}=0A=
};=0A=
},=0A=
=0A=
_getPanelForTab: function( tab ) {=0A=
var id =3D $( tab ).attr( "aria-controls" );=0A=
return this.element.find( this._sanitizeSelector( "#" + id ) );=0A=
}=0A=
});=0A=
=0A=
})( jQuery );=0A=
(function( $ ) {=0A=
=0A=
var increments =3D 0;=0A=
=0A=
function addDescribedBy( elem, id ) {=0A=
var describedby =3D (elem.attr( "aria-describedby" ) || "").split( =
/\s+/ );=0A=
describedby.push( id );=0A=
elem=0A=
.data( "ui-tooltip-id", id )=0A=
.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );=0A=
}=0A=
=0A=
function removeDescribedBy( elem ) {=0A=
var id =3D elem.data( "ui-tooltip-id" ),=0A=
describedby =3D (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),=0A=
index =3D $.inArray( id, describedby );=0A=
if ( index !=3D=3D -1 ) {=0A=
describedby.splice( index, 1 );=0A=
}=0A=
=0A=
elem.removeData( "ui-tooltip-id" );=0A=
describedby =3D $.trim( describedby.join( " " ) );=0A=
if ( describedby ) {=0A=
elem.attr( "aria-describedby", describedby );=0A=
} else {=0A=
elem.removeAttr( "aria-describedby" );=0A=
}=0A=
}=0A=
=0A=
$.widget( "ui.tooltip", {=0A=
version: "1.10.4",=0A=
options: {=0A=
content: function() {=0A=
// support: IE<9, Opera in jQuery <1.7=0A=
// .text() can't accept undefined, so coerce to a string=0A=
var title =3D $( this ).attr( "title" ) || "";=0A=
// Escape title, since we're going from an attribute to raw HTML=0A=
return $( "
" ).text( title ).html();=0A=
},=0A=
hide: true,=0A=
// Disabled elements have inconsistent behavior across browsers (#8661)=0A=
items: "[title]:not([disabled])",=0A=
position: {=0A=
my: "left top+15",=0A=
at: "left bottom",=0A=
collision: "flipfit flip"=0A=
},=0A=
show: true,=0A=
tooltipClass: null,=0A=
track: false,=0A=
=0A=
// callbacks=0A=
close: null,=0A=
open: null=0A=
},=0A=
=0A=
_create: function() {=0A=
this._on({=0A=
mouseover: "open",=0A=
focusin: "open"=0A=
});=0A=
=0A=
// IDs of generated tooltips, needed for destroy=0A=
this.tooltips =3D {};=0A=
// IDs of parent tooltips where we removed the title attribute=0A=
this.parents =3D {};=0A=
=0A=
if ( this.options.disabled ) {=0A=
this._disable();=0A=
}=0A=
},=0A=
=0A=
_setOption: function( key, value ) {=0A=
var that =3D this;=0A=
=0A=
if ( key =3D=3D=3D "disabled" ) {=0A=
this[ value ? "_disable" : "_enable" ]();=0A=
this.options[ key ] =3D value;=0A=
// disable element style changes=0A=
return;=0A=
}=0A=
=0A=
this._super( key, value );=0A=
=0A=
if ( key =3D=3D=3D "content" ) {=0A=
$.each( this.tooltips, function( id, element ) {=0A=
that._updateContent( element );=0A=
});=0A=
}=0A=
},=0A=
=0A=
_disable: function() {=0A=
var that =3D this;=0A=
=0A=
// close open tooltips=0A=
$.each( this.tooltips, function( id, element ) {=0A=
var event =3D $.Event( "blur" );=0A=
event.target =3D event.currentTarget =3D element[0];=0A=
that.close( event, true );=0A=
});=0A=
=0A=
// remove title attributes to prevent native tooltips=0A=
this.element.find( this.options.items ).addBack().each(function() {=0A=
var element =3D $( this );=0A=
if ( element.is( "[title]" ) ) {=0A=
element=0A=
.data( "ui-tooltip-title", element.attr( "title" ) )=0A=
.attr( "title", "" );=0A=
}=0A=
});=0A=
},=0A=
=0A=
_enable: function() {=0A=
// restore title attributes=0A=
this.element.find( this.options.items ).addBack().each(function() {=0A=
var element =3D $( this );=0A=
if ( element.data( "ui-tooltip-title" ) ) {=0A=
element.attr( "title", element.data( "ui-tooltip-title" ) );=0A=
}=0A=
});=0A=
},=0A=
=0A=
open: function( event ) {=0A=
var that =3D this,=0A=
target =3D $( event ? event.target : this.element )=0A=
// we need closest here due to mouseover bubbling,=0A=
// but always pointing at the same event target=0A=
.closest( this.options.items );=0A=
=0A=
// No element to show a tooltip for or the tooltip is already open=0A=
if ( !target.length || target.data( "ui-tooltip-id" ) ) {=0A=
return;=0A=
}=0A=
=0A=
if ( target.attr( "title" ) ) {=0A=
target.data( "ui-tooltip-title", target.attr( "title" ) );=0A=
}=0A=
=0A=
target.data( "ui-tooltip-open", true );=0A=
=0A=
// kill parent tooltips, custom or native, for hover=0A=
if ( event && event.type =3D=3D=3D "mouseover" ) {=0A=
target.parents().each(function() {=0A=
var parent =3D $( this ),=0A=
blurEvent;=0A=
if ( parent.data( "ui-tooltip-open" ) ) {=0A=
blurEvent =3D $.Event( "blur" );=0A=
blurEvent.target =3D blurEvent.currentTarget =3D this;=0A=
that.close( blurEvent, true );=0A=
}=0A=
if ( parent.attr( "title" ) ) {=0A=
parent.uniqueId();=0A=
that.parents[ this.id ] =3D {=0A=
element: this,=0A=
title: parent.attr( "title" )=0A=
};=0A=
parent.attr( "title", "" );=0A=
}=0A=
});=0A=
}=0A=
=0A=
this._updateContent( target, event );=0A=
},=0A=
=0A=
_updateContent: function( target, event ) {=0A=
var content,=0A=
contentOption =3D this.options.content,=0A=
that =3D this,=0A=
eventType =3D event ? event.type : null;=0A=
=0A=
if ( typeof contentOption =3D=3D=3D "string" ) {=0A=
return this._open( event, target, contentOption );=0A=
}=0A=
=0A=
content =3D contentOption.call( target[0], function( response ) {=0A=
// ignore async response if tooltip was closed already=0A=
if ( !target.data( "ui-tooltip-open" ) ) {=0A=
return;=0A=
}=0A=
// IE may instantly serve a cached response for ajax requests=0A=
// delay this call to _open so the other call to _open runs first=0A=
that._delay(function() {=0A=
// jQuery creates a special event for focusin when it doesn't=0A=
// exist natively. To improve performance, the native event=0A=
// object is reused and the type is changed. Therefore, we can't=0A=
// rely on the type being correct after the event finished=0A=
// bubbling, so we set it back to the previous value. (#8740)=0A=
if ( event ) {=0A=
event.type =3D eventType;=0A=
}=0A=
this._open( event, target, response );=0A=
});=0A=
});=0A=
if ( content ) {=0A=
this._open( event, target, content );=0A=
}=0A=
},=0A=
=0A=
_open: function( event, target, content ) {=0A=
var tooltip, events, delayedShow,=0A=
positionOption =3D $.extend( {}, this.options.position );=0A=
=0A=
if ( !content ) {=0A=
return;=0A=
}=0A=
=0A=
// Content can be updated multiple times. If the tooltip already=0A=
// exists, then just update the content and bail.=0A=
tooltip =3D this._find( target );=0A=
if ( tooltip.length ) {=0A=
tooltip.find( ".ui-tooltip-content" ).html( content );=0A=
return;=0A=
}=0A=
=0A=
// if we have a title, clear it to prevent the native tooltip=0A=
// we have to check first to avoid defining a title if none exists=0A=
// (we don't want to cause an element to start matching [title])=0A=
//=0A=
// We use removeAttr only for key events, to allow IE to export the =
correct=0A=
// accessible attributes. For mouse events, set to empty string to =
avoid=0A=
// native tooltip showing up (happens only when removing inside =
mouseover).=0A=
if ( target.is( "[title]" ) ) {=0A=
if ( event && event.type =3D=3D=3D "mouseover" ) {=0A=
target.attr( "title", "" );=0A=
} else {=0A=
target.removeAttr( "title" );=0A=
}=0A=
}=0A=
=0A=
tooltip =3D this._tooltip( target );=0A=
addDescribedBy( target, tooltip.attr( "id" ) );=0A=
tooltip.find( ".ui-tooltip-content" ).html( content );=0A=
=0A=
function position( event ) {=0A=
positionOption.of =3D event;=0A=
if ( tooltip.is( ":hidden" ) ) {=0A=
return;=0A=
}=0A=
tooltip.position( positionOption );=0A=
}=0A=
if ( this.options.track && event && /^mouse/.test( event.type ) ) {=0A=
this._on( this.document, {=0A=
mousemove: position=0A=
});=0A=
// trigger once to override element-relative positioning=0A=
position( event );=0A=
} else {=0A=
tooltip.position( $.extend({=0A=
of: target=0A=
}, this.options.position ) );=0A=
}=0A=
=0A=
tooltip.hide();=0A=
=0A=
this._show( tooltip, this.options.show );=0A=
// Handle tracking tooltips that are shown with a delay (#8644). As =
soon=0A=
// as the tooltip is visible, position the tooltip using the most =
recent=0A=
// event.=0A=
if ( this.options.show && this.options.show.delay ) {=0A=
delayedShow =3D this.delayedShow =3D setInterval(function() {=0A=
if ( tooltip.is( ":visible" ) ) {=0A=
position( positionOption.of );=0A=
clearInterval( delayedShow );=0A=
}=0A=
}, $.fx.interval );=0A=
}=0A=
=0A=
this._trigger( "open", event, { tooltip: tooltip } );=0A=
=0A=
events =3D {=0A=
keyup: function( event ) {=0A=
if ( event.keyCode =3D=3D=3D $.ui.keyCode.ESCAPE ) {=0A=
var fakeEvent =3D $.Event(event);=0A=
fakeEvent.currentTarget =3D target[0];=0A=
this.close( fakeEvent, true );=0A=
}=0A=
},=0A=
remove: function() {=0A=
this._removeTooltip( tooltip );=0A=
}=0A=
};=0A=
if ( !event || event.type =3D=3D=3D "mouseover" ) {=0A=
events.mouseleave =3D "close";=0A=
}=0A=
if ( !event || event.type =3D=3D=3D "focusin" ) {=0A=
events.focusout =3D "close";=0A=
}=0A=
this._on( true, target, events );=0A=
},=0A=
=0A=
close: function( event ) {=0A=
var that =3D this,=0A=
target =3D $( event ? event.currentTarget : this.element ),=0A=
tooltip =3D this._find( target );=0A=
=0A=
// disabling closes the tooltip, so we need to track when we're closing=0A=
// to avoid an infinite loop in case the tooltip becomes disabled on =
close=0A=
if ( this.closing ) {=0A=
return;=0A=
}=0A=
=0A=
// Clear the interval for delayed tracking tooltips=0A=
clearInterval( this.delayedShow );=0A=
=0A=
// only set title if we had one before (see comment in _open())=0A=
if ( target.data( "ui-tooltip-title" ) ) {=0A=
target.attr( "title", target.data( "ui-tooltip-title" ) );=0A=
}=0A=
=0A=
removeDescribedBy( target );=0A=
=0A=
tooltip.stop( true );=0A=
this._hide( tooltip, this.options.hide, function() {=0A=
that._removeTooltip( $( this ) );=0A=
});=0A=
=0A=
target.removeData( "ui-tooltip-open" );=0A=
this._off( target, "mouseleave focusout keyup" );=0A=
// Remove 'remove' binding only on delegated targets=0A=
if ( target[0] !=3D=3D this.element[0] ) {=0A=
this._off( target, "remove" );=0A=
}=0A=
this._off( this.document, "mousemove" );=0A=
=0A=
if ( event && event.type =3D=3D=3D "mouseleave" ) {=0A=
$.each( this.parents, function( id, parent ) {=0A=
$( parent.element ).attr( "title", parent.title );=0A=
delete that.parents[ id ];=0A=
});=0A=
}=0A=
=0A=
this.closing =3D true;=0A=
this._trigger( "close", event, { tooltip: tooltip } );=0A=
this.closing =3D false;=0A=
},=0A=
=0A=
_tooltip: function( element ) {=0A=
var id =3D "ui-tooltip-" + increments++,=0A=
tooltip =3D $( "" )=0A=
.attr({=0A=
id: id,=0A=
role: "tooltip"=0A=
})=0A=
.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +=0A=
( this.options.tooltipClass || "" ) );=0A=
$( "
" )=0A=
.addClass( "ui-tooltip-content" )=0A=
.appendTo( tooltip );=0A=
tooltip.appendTo( this.document[0].body );=0A=
this.tooltips[ id ] =3D element;=0A=
return tooltip;=0A=
},=0A=
=0A=
_find: function( target ) {=0A=
var id =3D target.data( "ui-tooltip-id" );=0A=
return id ? $( "#" + id ) : $();=0A=
},=0A=
=0A=
_removeTooltip: function( tooltip ) {=0A=
tooltip.remove();=0A=
delete this.tooltips[ tooltip.attr( "id" ) ];=0A=
},=0A=
=0A=
_destroy: function() {=0A=
var that =3D this;=0A=
=0A=
// close open tooltips=0A=
$.each( this.tooltips, function( id, element ) {=0A=
// Delegate to close method to handle common cleanup=0A=
var event =3D $.Event( "blur" );=0A=
event.target =3D event.currentTarget =3D element[0];=0A=
that.close( event, true );=0A=
=0A=
// Remove immediately; destroying an open tooltip doesn't use the=0A=
// hide animation=0A=
$( "#" + id ).remove();=0A=
=0A=
// Restore the title=0A=
if ( element.data( "ui-tooltip-title" ) ) {=0A=
element.attr( "title", element.data( "ui-tooltip-title" ) );=0A=
element.removeData( "ui-tooltip-title" );=0A=
}=0A=
});=0A=
}=0A=
});=0A=
=0A=
}( jQuery ) );=0A=
------=_NextPart_000_0000_01D2AD44.FE072C30
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: https://is.fotbal.cz/js/jquery.custom.select.min.js
/*!=0A=
* jquery.customSelect() - v0.4.2=0A=
* http://adam.co/lab/jquery/customselect/=0A=
* 2013-05-22=0A=
*=0A=
* Copyright 2013 Adam Coulombe=0A=
* @license http://www.opensource.org/licenses/mit-license.html MIT =
License=0A=
* @license http://www.gnu.org/licenses/gpl.html GPL2 License=0A=
*/=0A=
(function(a){a.fn.extend({customSelect:function(c){if(typeof =
document.body.style.maxHeight=3D=3D=3D"undefined"){return this}var =
e=3D{customClass:"customSelect",mapClass:true,mapStyle:true},c=3Da.extend=
(e,c),d=3Dc.customClass,f=3Dfunction(h,k){var =
g=3Dh.find(":selected"),j=3Dk.children(":first"),i=3Dg.html()||" ";j=
.html(i);if(g.attr("disabled")){k.addClass(b("DisabledOption"))}else{k.re=
moveClass(b("DisabledOption"))}setTimeout(function(){k.removeClass(b("Ope=
n"));a(document).off("mouseup."+b("Open"))},60)},b=3Dfunction(g){return =
d+g};return this.each(function(){var h=3Da(this),j=3Da("
").addClass(b("Inner")),i=3Da("
"),g=3Dh.position();h.after(i.append(j));i.addClass(d);if(c.mapClass){i=
.addClass(h.attr("class"))}if(c.mapStyle){i.attr("style",h.attr("style"))=
}h.addClass("hasCustomSelect").on("update",function(){f(h,i);var =
l=3DparseInt(h.outerWidth(),10)-(parseInt(i.outerWidth(),10)-parseInt(i.w=
idth(),10));i.css({display:"inline-block"});var =
k=3Di.outerHeight();if(h.attr("disabled")){i.addClass(b("Disabled"))}else=
{i.removeClass(b("Disabled"))}j.css({width:l,display:"inline-block"});h.c=
ss({"-webkit-appearance":"menulist-button",width:i.outerWidth(),position:=
"absolute",opacity:0,height:k,fontSize:i.css("font-size"),left:g.left,top=
:g.top})}).on("change",function(){i.addClass(b("Changed"));f(h,i)}).on("k=
eyup",function(k){if(!i.hasClass(b("Open"))){h.blur();h.focus()}else{if(k=
.which=3D=3D13||k.which=3D=3D27||k.which=3D=3D9){f(h,i)}}}).on("mousedown=
",function(k){i.removeClass(b("Changed"))}).on("mouseup",function(k){if(!=
i.hasClass(b("Open"))){if(a("."+b("Open")).not(i).length>0&&typeof =
InstallTrigger!=3D=3D"undefined"){h.focus()}else{i.addClass(b("Open"));k.=
stopPropagation();a(document).one("mouseup."+b("Open"),function(l){if(l.t=
arget!=3Dh.get(0)&&a.inArray(l.target,h.find("*").get())<0){h.blur()}else=
{f(h,i)}})}}}).focus(function(){i.removeClass(b("Changed")).addClass(b("F=
ocus"))}).blur(function(){i.removeClass(b("Focus")+" =
"+b("Open"))}).hover(function(){i.addClass(b("Hover"))},function(){i.remo=
veClass(b("Hover"))}).trigger("update")})}})})(jQuery);
------=_NextPart_000_0000_01D2AD44.FE072C30
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: https://is.fotbal.cz/js/jquery.numeric.js
/*=0A=
*=0A=
* Copyright (c) 2006-2011 Sam Collett (http://www.texotela.co.uk)=0A=
* Dual licensed under the MIT =
(http://www.opensource.org/licenses/mit-license.php)=0A=
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.=0A=
* =0A=
* Version 1.3=0A=
* Demo: http://www.texotela.co.uk/code/jquery/numeric/=0A=
*=0A=
*/=0A=
(function($) {=0A=
/*=0A=
* Allows only valid characters to be entered into input boxes.=0A=
* Note: fixes value when pasting via Ctrl+V, but not when using the =
mouse to paste=0A=
* side-effect: Ctrl+A does not work, though you can still use the =
mouse to select (or double-click to select all)=0A=
*=0A=
* @name numeric=0A=
* @param config { decimal : "." , negative : true }=0A=
* @param callback A function that runs if the number is not =
valid (fires onblur)=0A=
* @author Sam Collett (http://www.texotela.co.uk)=0A=
* @example $(".numeric").numeric();=0A=
* @example $(".numeric").numeric(","); // use , as separater=0A=
* @example $(".numeric").numeric({ decimal : "," }); // use , as =
separator=0A=
* @example $(".numeric").numeric({ negative : false }); // do not =
allow negative values=0A=
* @example $(".numeric").numeric(null, callback); // use default =
values, pass on the 'callback' function=0A=
*=0A=
*/=0A=
$.fn.numeric =3D function(config, callback)=0A=
{=0A=
if(typeof config =3D=3D=3D 'boolean')=0A=
{=0A=
config =3D { decimal: config };=0A=
}=0A=
config =3D config || {};=0A=
// if config.negative undefined, set to true (default is to allow =
negative numbers)=0A=
if(typeof config.negative =3D=3D "undefined") config.negative =3D true;=0A=
// set decimal point=0A=
var decimal =3D (config.decimal =3D=3D=3D false) ? "" : config.decimal =
|| ".";=0A=
// allow negatives=0A=
var negative =3D (config.negative =3D=3D=3D true) ? true : false;=0A=
// callback function=0A=
var callback =3D typeof callback =3D=3D "function" ? callback : =
function(){};=0A=
// set data and methods=0A=
return this.data("numeric.decimal", decimal).data("numeric.negative", =
negative).data("numeric.callback", =
callback).keypress($.fn.numeric.keypress).keyup($.fn.numeric.keyup).blur(=
$.fn.numeric.blur);=0A=
}=0A=
=0A=
$.fn.numeric.keypress =3D function(e)=0A=
{=0A=
// get decimal character and determine if negatives are allowed=0A=
var decimal =3D $.data(this, "numeric.decimal");=0A=
var negative =3D $.data(this, "numeric.negative");=0A=
// get the key that was pressed=0A=
var key =3D e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;=0A=
// allow enter/return key (only when in an input box)=0A=
if(key =3D=3D 13 && this.nodeName.toLowerCase() =3D=3D "input")=0A=
{=0A=
return true;=0A=
}=0A=
else if(key =3D=3D 13)=0A=
{=0A=
return false;=0A=
}=0A=
var allow =3D false;=0A=
// allow Ctrl+A=0A=
if((e.ctrlKey && key =3D=3D 97 /* firefox */) || (e.ctrlKey && key =
=3D=3D 65) /* opera */) return true;=0A=
// allow Ctrl+X (cut)=0A=
if((e.ctrlKey && key =3D=3D 120 /* firefox */) || (e.ctrlKey && key =
=3D=3D 88) /* opera */) return true;=0A=
// allow Ctrl+C (copy)=0A=
if((e.ctrlKey && key =3D=3D 99 /* firefox */) || (e.ctrlKey && key =
=3D=3D 67) /* opera */) return true;=0A=
// allow Ctrl+Z (undo)=0A=
if((e.ctrlKey && key =3D=3D 122 /* firefox */) || (e.ctrlKey && key =
=3D=3D 90) /* opera */) return true;=0A=
// allow or deny Ctrl+V (paste), Shift+Ins=0A=
if((e.ctrlKey && key =3D=3D 118 /* firefox */) || (e.ctrlKey && key =
=3D=3D 86) /* opera */=0A=
|| (e.shiftKey && key =3D=3D 45)) return true;=0A=
// if a number was not pressed=0A=
if(key < 48 || key > 57)=0A=
{=0A=
/* '-' only allowed at start and if negative numbers allowed */=0A=
if(this.value.indexOf("-") !=3D 0 && negative && key =3D=3D 45 && =
(this.value.length =3D=3D 0 || ($.fn.getSelectionStart(this)) =3D=3D 0)) =
return true;=0A=
/* only one decimal separator allowed */=0A=
if(decimal && key =3D=3D decimal.charCodeAt(0) && =
this.value.indexOf(decimal) !=3D -1)=0A=
{=0A=
allow =3D false;=0A=
}=0A=
// check for other keys that have special purposes=0A=
if(=0A=
key !=3D 8 /* backspace */ &&=0A=
key !=3D 9 /* tab */ &&=0A=
key !=3D 13 /* enter */ &&=0A=
key !=3D 35 /* end */ &&=0A=
key !=3D 36 /* home */ &&=0A=
key !=3D 37 /* left */ &&=0A=
key !=3D 39 /* right */ &&=0A=
key !=3D 46 /* del */=0A=
)=0A=
{=0A=
allow =3D false;=0A=
}=0A=
else=0A=
{=0A=
// for detecting special keys (listed above)=0A=
// IE does not support 'charCode' and ignores them in keypress anyway=0A=
if(typeof e.charCode !=3D "undefined")=0A=
{=0A=
// special keys have 'keyCode' and 'which' the same (e.g. backspace)=0A=
if(e.keyCode =3D=3D e.which && e.which !=3D 0)=0A=
{=0A=
allow =3D true;=0A=
// . and delete share the same code, don't allow . (will be set to =
true later if it is the decimal point)=0A=
if(e.which =3D=3D 46) allow =3D false;=0A=
}=0A=
// or keyCode !=3D 0 and 'charCode'/'which' =3D 0=0A=
else if(e.keyCode !=3D 0 && e.charCode =3D=3D 0 && e.which =3D=3D 0)=0A=
{=0A=
allow =3D true;=0A=
}=0A=
}=0A=
}=0A=
// if key pressed is the decimal and it is not already in the field=0A=
if(decimal && key =3D=3D decimal.charCodeAt(0))=0A=
{=0A=
if(this.value.indexOf(decimal) =3D=3D -1)=0A=
{=0A=
allow =3D true;=0A=
}=0A=
else=0A=
{=0A=
allow =3D false;=0A=
}=0A=
}=0A=
}=0A=
else=0A=
{=0A=
allow =3D true;=0A=
}=0A=
return allow;=0A=
}=0A=
=0A=
$.fn.numeric.keyup =3D function(e)=0A=
{=0A=
var val =3D this.value;=0A=
if(val.length > 0)=0A=
{=0A=
// get carat (cursor) position=0A=
var carat =3D $.fn.getSelectionStart(this);=0A=
// get decimal character and determine if negatives are allowed=0A=
var decimal =3D $.data(this, "numeric.decimal");=0A=
var negative =3D $.data(this, "numeric.negative");=0A=
=0A=
// prepend a 0 if necessary=0A=
if(decimal !=3D "")=0A=
{=0A=
// find decimal point=0A=
var dot =3D val.indexOf(decimal);=0A=
// if dot at start, add 0 before=0A=
if(dot =3D=3D 0)=0A=
{=0A=
this.value =3D "0" + val;=0A=
}=0A=
// if dot at position 1, check if there is a - symbol before it=0A=
if(dot =3D=3D 1 && val.charAt(0) =3D=3D "-")=0A=
{=0A=
this.value =3D "-0" + val.substring(1);=0A=
}=0A=
val =3D this.value;=0A=
}=0A=
=0A=
// if pasted in, only allow the following characters=0A=
var validChars =3D [0,1,2,3,4,5,6,7,8,9,'-',decimal];=0A=
// get length of the value (to loop through)=0A=
var length =3D val.length;=0A=
// loop backwards (to prevent going out of bounds)=0A=
for(var i =3D length - 1; i >=3D 0; i--)=0A=
{=0A=
var ch =3D val.charAt(i);=0A=
// remove '-' if it is in the wrong place=0A=
if(i !=3D 0 && ch =3D=3D "-")=0A=
{=0A=
val =3D val.substring(0, i) + val.substring(i + 1);=0A=
}=0A=
// remove character if it is at the start, a '-' and negatives aren't =
allowed=0A=
else if(i =3D=3D 0 && !negative && ch =3D=3D "-")=0A=
{=0A=
val =3D val.substring(1);=0A=
}=0A=
var validChar =3D false;=0A=
// loop through validChars=0A=
for(var j =3D 0; j < validChars.length; j++)=0A=
{=0A=
// if it is valid, break out the loop=0A=
if(ch =3D=3D validChars[j])=0A=
{=0A=
validChar =3D true;=0A=
break;=0A=
}=0A=
}=0A=
// if not a valid character, or a space, remove=0A=
if(!validChar || ch =3D=3D " ")=0A=
{=0A=
val =3D val.substring(0, i) + val.substring(i + 1);=0A=
}=0A=
}=0A=
// remove extra decimal characters=0A=
var firstDecimal =3D val.indexOf(decimal);=0A=
if(firstDecimal > 0)=0A=
{=0A=
for(var i =3D length - 1; i > firstDecimal; i--)=0A=
{=0A=
var ch =3D val.charAt(i);=0A=
// remove decimal character=0A=
if(ch =3D=3D decimal)=0A=
{=0A=
val =3D val.substring(0, i) + val.substring(i + 1);=0A=
}=0A=
}=0A=
}=0A=
// set the value and prevent the cursor moving to the end=0A=
this.value =3D val;=0A=
$.fn.setSelection(this, carat);=0A=
}=0A=
}=0A=
=0A=
$.fn.numeric.blur =3D function()=0A=
{=0A=
var decimal =3D $.data(this, "numeric.decimal");=0A=
var callback =3D $.data(this, "numeric.callback");=0A=
var val =3D this.value;=0A=
if(val !=3D "")=0A=
{=0A=
var re =3D new RegExp("^\\d+$|\\d*" + decimal + "\\d+");=0A=
if(!re.exec(val))=0A=
{=0A=
callback.apply(this);=0A=
}=0A=
}=0A=
}=0A=
=0A=
$.fn.removeNumeric =3D function()=0A=
{=0A=
return this.data("numeric.decimal", null).data("numeric.negative", =
null).data("numeric.callback", null).unbind("keypress", =
$.fn.numeric.keypress).unbind("blur", $.fn.numeric.blur);=0A=
}=0A=
=0A=
// Based on code from http://javascript.nwbox.com/cursor_position/ =
(Diego Perini
)=0A=
$.fn.getSelectionStart =3D function(o)=0A=
{=0A=
if (o.createTextRange)=0A=
{=0A=
var r =3D document.selection.createRange().duplicate();=0A=
r.moveEnd('character', o.value.length);=0A=
if (r.text =3D=3D '') return o.value.length;=0A=
return o.value.lastIndexOf(r.text);=0A=
} else return o.selectionStart;=0A=
}=0A=
=0A=
// set the selection, o is the object (input), p is the position =
([start, end] or just start)=0A=
$.fn.setSelection =3D function(o, p)=0A=
{=0A=
// if p is number, start and end are the same=0A=
if(typeof p =3D=3D "number") p =3D [p, p];=0A=
// only set if p is an array of length 2=0A=
if(p && p.constructor =3D=3D Array && p.length =3D=3D 2)=0A=
{=0A=
if (o.createTextRange)=0A=
{=0A=
var r =3D o.createTextRange();=0A=
r.collapse(true);=0A=
r.moveStart('character', p[0]);=0A=
r.moveEnd('character', p[1]);=0A=
r.select();=0A=
}=0A=
else if(o.setSelectionRange)=0A=
{=0A=
o.focus();=0A=
o.setSelectionRange(p[0], p[1]);=0A=
}=0A=
}=0A=
}=0A=
=0A=
})(jQuery);
------=_NextPart_000_0000_01D2AD44.FE072C30
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: https://is.fotbal.cz/js/jquery.mousewheel-3.0.6.pack.js
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)=0A=
* Licensed under the MIT License (LICENSE.txt).=0A=
*=0A=
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some =
pointers.=0A=
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug =
fix.=0A=
* Thanks to: Seamus Leahy for adding deltaX and deltaY=0A=
*=0A=
* Version: 3.0.6=0A=
* =0A=
* Requires: 1.2.2+=0A=
*/=0A=
(function(d){function e(a){var =
b=3Da||window.event,c=3D[].slice.call(arguments,1),f=3D0,e=3D0,g=3D0,a=3D=
d.event.fix(b);a.type=3D"mousewheel";b.wheelDelta&&(f=3Db.wheelDelta/120)=
;b.detail&&(f=3D-b.detail/3);g=3Df;b.axis!=3D=3Dvoid =
0&&b.axis=3D=3D=3Db.HORIZONTAL_AXIS&&(g=3D0,e=3D-1*f);b.wheelDeltaY!=3D=3D=
void 0&&(g=3Db.wheelDeltaY/120);b.wheelDeltaX!=3D=3Dvoid =
0&&(e=3D-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch|=
|d.event.handle).apply(this,c)}var =
c=3D["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var =
h=3Dc.length;h;)d.event.fixHooks[c[--h]]=3D=0A=
d.event.mouseHooks;d.event.special.mousewheel=3D{setup:function(){if(this=
.addEventListener)for(var =
a=3Dc.length;a;)this.addEventListener(c[--a],e,false);else =
this.onmousewheel=3De},teardown:function(){if(this.removeEventListener)fo=
r(var a=3Dc.length;a;)this.removeEventListener(c[--a],e,false);else =
this.onmousewheel=3Dnull}};d.fn.extend({mousewheel:function(a){return =
a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:func=
tion(a){return this.unbind("mousewheel",a)}})})(jQuery);
------=_NextPart_000_0000_01D2AD44.FE072C30
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: https://is.fotbal.cz/js/jquery.fancybox.pack.js
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */=0A=
(function(r,G,f,v){var =
J=3Df("html"),n=3Df(r),p=3Df(G),b=3Df.fancybox=3Dfunction(){b.open.apply(=
this,arguments)},I=3Dnavigator.userAgent.match(/msie/i),B=3Dnull,s=3DG.cr=
eateTouch!=3D=3Dv,t=3Dfunction(a){return a&&a.hasOwnProperty&&a =
instanceof f},q=3Dfunction(a){return =
a&&"string"=3D=3D=3Df.type(a)},E=3Dfunction(a){return =
q(a)&&0',image:'
',iframe:'
",error:'
The requested content cannot be =
loaded.
Please try again later.
',closeBtn:'
',next:'
',prev:'
'},openEffect:"fade",openSpeed:250=
,openEasing:"swing",openOpacity:!0,=0A=
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing"=
,closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250=
,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:=
250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!=
0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,a=
fterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop}=
,group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,=0A=
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{t=
imer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpe=
rs:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d=3D{}),!1!=3D=3Db.c=
lose(!0)))return =
f.isArray(a)||(a=3Dt(a)?f(a).get():[a]),f.each(a,function(e,c){var =
k=3D{},g,h,j,m,l;"object"=3D=3D=3Df.type(c)&&(c.nodeType&&(c=3Df(c)),t(c)=
?(k=3D{href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybo=
x-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,=0A=
c.metadata())):k=3Dc);g=3Dd.href||k.href||(q(c)?c:null);h=3Dd.title!=3D=3D=
v?d.title:k.title||"";m=3D(j=3Dd.content||k.content)?"html":d.type||k.typ=
e;!m&&k.isDom&&(m=3Dc.data("fancybox-type"),m||(m=3D(m=3Dc.prop("class").=
match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m=3D"image"=
:b.isSWF(g)?m=3D"swf":"#"=3D=3D=3Dg.charAt(0)?m=3D"inline":q(c)&&(m=3D"ht=
ml",j=3Dc)),"ajax"=3D=3D=3Dm&&(l=3Dg.split(/\s+/,2),g=3Dl.shift(),l=3Dl.s=
hift()));j||("inline"=3D=3D=3Dm?g?j=3Df(q(g)?g.replace(/.*(?=3D#[^\s]+$)/=
,""):g):k.isDom&&(j=3Dc):"html"=3D=3D=3Dm?j=3Dg:!m&&(!g&&=0A=
k.isDom)&&(m=3D"inline",j=3Dc));f.extend(k,{href:g,type:m,content:j,title=
:h,selector:l});a[e]=3Dk}),b.opts=3Df.extend(!0,{},b.defaults,d),d.keys!=3D=
=3Dv&&(b.opts.keys=3Dd.keys?f.extend({},b.defaults.keys,d.keys):!1),b.gro=
up=3Da,b._start(b.opts.index)},cancel:function(){var =
a=3Db.coming;a&&!1!=3D=3Db.trigger("onCancel")&&(b.hideLoading(),b.ajaxLo=
ad&&b.ajaxLoad.abort(),b.ajaxLoad=3Dnull,b.imgPreload&&(b.imgPreload.onlo=
ad=3Db.imgPreload.onerror=3Dnull),a.wrap&&a.wrap.stop(!0,!0).trigger("onR=
eset").remove(),b.coming=3Dnull,b.current||=0A=
b._afterZoomOut(a))},close:function(a){b.cancel();!1!=3D=3Db.trigger("bef=
oreClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0=3D=3D=3Da?(f(".f=
ancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b=
.isOpen=3Db.isOpened=3D!1,b.isClosing=3D!0,f(".fancybox-item, =
.fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"=
),b.transitions[b.current.closeMethod]())))},play:function(a){var =
d=3Dfunction(){clearTimeout(b.player.timer)},e=3Dfunction(){d();b.current=
&&b.player.isActive&&(b.player.timer=3D=0A=
setTimeout(b.next,b.current.playSpeed))},c=3Dfunction(){d();p.unbind(".pl=
ayer");b.player.isActive=3D!1;b.trigger("onPlayEnd")};if(!0=3D=3D=3Da||!b=
.player.isActive&&!1!=3D=3Da){if(b.current&&(b.current.loop||b.current.in=
dex
=3Dc.index?"nex=
t":"prev"],b.router=3De||"jumpto",c.loop&&(0>a&&(a=3Dc.group.length+a%c.g=
roup.length),a%=3Dc.group.length),c.group[a]!=3D=3Dv&&(b.cancel(),b._star=
t(a)))},reposition:function(a,d){var =
e=3Db.current,c=3De?e.wrap:null,k;c&&(k=3Db._getPosition(d),a&&"scroll"=3D=
=3D=3Da.type?(delete =
k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=3Df.extend({},e.=
dim,k)))},update:function(a){var d=3D=0A=
a&&a.type,e=3D!d||"orientationchange"=3D=3D=3Dd;e&&(clearTimeout(B),B=3Dn=
ull);b.isOpen&&!B&&(B=3DsetTimeout(function(){var =
c=3Db.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"l=
oad"=3D=3D=3Dd||"resize"=3D=3D=3Dd&&c.autoResize)&&b._setDimension(),"scr=
oll"=3D=3D=3Dd&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=3Dnu=
ll)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView=3D"=
boolean"=3D=3D=3Df.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("=
style").addClass("fancybox-tmp"),b.trigger("onUpdate")),=0A=
b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loa=
ding").remove()},showLoading:function(){var =
a,d;b.hideLoading();a=3Df('').click(b.cancel).appendTo("bod=
y");p.bind("keydown.loading",function(a){if(27=3D=3D=3D(a.which||a.keyCod=
e))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=3Db.getViewport()=
,a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewp=
ort:function(){var =
a=3Db.current&&b.current.locked||!1,d=3D{x:n.scrollLeft(),=0A=
y:n.scrollTop()};a?(d.w=3Da[0].clientWidth,d.h=3Da[0].clientHeight):(d.w=3D=
s&&r.innerWidth?r.innerWidth:n.width(),d.h=3Ds&&r.innerHeight?r.innerHeig=
ht:n.height());return =
d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbi=
nd(".fb");n.unbind(".fb")},bindEvents:function(){var =
a=3Db.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" =
resize.fb")+(a.autoCenter&&!a.locked?" =
scroll.fb":""),b.update),(d=3Da.keys)&&p.bind("keydown.fb",function(e){va=
r c=3De.which||e.keyCode,k=3De.target||e.srcElement;=0A=
if(27=3D=3D=3Dc&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!=
e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,functi=
on(d,k){if(1h[0].clientWidth||h[0].clientHeight&&=
h[0].scrollHeight>h[0].clientHeight),h=3Df(h).parent();if(0!=3D=3Dc&&!j&&=
1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:func=
tion(a,d){var =
e,c=3Dd||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=3Dc[a].apply(c,=
Array.prototype.slice.call(arguments,1)));if(!1=3D=3D=3De)return!1;c.help=
ers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.he=
lpers[d][a]))b.helpers[d][a](f.extend(!0,=0A=
{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){retur=
n =
q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\=
?|#).*)?$)/i)},isSWF:function(a){return =
q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var =
d=3D{},e,c;a=3Dl(a);e=3Db.group[a]||null;if(!e)return!1;d=3Df.extend(!0,{=
},b.opts,e);e=3Dd.margin;c=3Dd.padding;"number"=3D=3D=3Df.type(e)&&(d.mar=
gin=3D[e,e,e,e]);"number"=3D=3D=3Df.type(c)&&(d.padding=3D[c,c,c,c]);d.mo=
dal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,=0A=
mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(=
d.autoWidth=3Dd.autoHeight=3D!0);"auto"=3D=3D=3Dd.width&&(d.autoWidth=3D!=
0);"auto"=3D=3D=3Dd.height&&(d.autoHeight=3D!0);d.group=3Db.group;d.index=
=3Da;b.coming=3Dd;if(!1=3D=3D=3Db.trigger("beforeLoad"))b.coming=3Dnull;e=
lse{c=3Dd.type;e=3Dd.href;if(!c)return =
b.coming=3Dnull,b.current&&b.router&&"jumpto"!=3D=3Db.router?(b.current.i=
ndex=3Da,b[b.router](b.direction)):!1;b.isActive=3D!0;if("image"=3D=3D=3D=
c||"swf"=3D=3D=3Dc)d.autoHeight=3Dd.autoWidth=3D!1,d.scrolling=3D"visible=
";"image"=3D=3D=3Dc&&(d.aspectRatio=3D=0A=
!0);"iframe"=3D=3D=3Dc&&s&&(d.scrolling=3D"scroll");d.wrap=3Df(d.tpl.wrap=
).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" =
fancybox-tmp =
"+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-ski=
n",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.=
wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("=
padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"=3D=3D=3Dc|=
|"html"=3D=3D=3Dc){if(!d.content||!d.content.length)return =
b._error("content")}else if(!e)return b._error("href");=0A=
"image"=3D=3D=3Dc?b._loadImage():"ajax"=3D=3D=3Dc?b._loadAjax():"iframe"=3D=
=3D=3Dc?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.co=
ming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrol=
ling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadIm=
age:function(){var a=3Db.imgPreload=3Dnew =
Image;a.onload=3Dfunction(){this.onload=3Dthis.onerror=3Dnull;b.coming.wi=
dth=3Dthis.width/b.opts.pixelRatio;b.coming.height=3Dthis.height/b.opts.p=
ixelRatio;b._afterLoad()};a.onerror=3Dfunction(){this.onload=3D=0A=
this.onerror=3Dnull;b._error("image")};a.src=3Db.coming.href;!0!=3D=3Da.c=
omplete&&b.showLoading()},_loadAjax:function(){var =
a=3Db.coming;b.showLoading();b.ajaxLoad=3Df.ajax(f.extend({},a.ajax,{url:=
a.href,error:function(a,e){b.coming&&"abort"!=3D=3De?b._error("ajax",a):b=
.hideLoading()},success:function(d,e){"success"=3D=3D=3De&&(a.content=3Dd=
,b._afterLoad())}}))},_loadIframe:function(){var =
a=3Db.coming,d=3Df(a.tpl.iframe.replace(/\{rnd\}/g,(new =
Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src=
",a.href);=0A=
f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().att=
r("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.=
showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).=
bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").=
removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=3Dd.append=
To(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){v=
ar =
a=3Db.group,d=3Db.current,e=3Da.length,c=3Dd.preload?Math.min(d.preload,=0A=
e-1):0,f,g;for(g=3D1;g<=3Dc;g+=3D1)f=3Da[(d.index+g)%e],"image"=3D=3D=3Df=
.type&&f.href&&((new Image).src=3Df.href)},_afterLoad:function(){var =
a=3Db.coming,d=3Db.current,e,c,k,g,h;b.hideLoading();if(a&&!1!=3D=3Db.isA=
ctive)if(!1=3D=3D=3Db.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("o=
nReset").remove(),b.coming=3Dnull;else{d&&(b.trigger("beforeChange",d),d.=
wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, =
.fancybox-nav").remove());b.unbindEvents();e=3Da.content;c=3Da.type;k=3Da=
.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,=0A=
outer:a.outer,inner:a.inner,current:a,previous:d});g=3Da.href;switch(c){c=
ase "inline":case "ajax":case =
"html":a.selector?e=3Df("").html(e).find(a.selector):t(e)&&(e.data("=
fancybox-placeholder")||e.data("fancybox-placeholder",f('
').insertAfter(e).hide()),e=3De.show=
().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hi=
de().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholde=
r",!1)}));break;case "image":e=3Da.tpl.image.replace("{href}",=0A=
g);break;case "swf":e=3D'
"}(!t(e)||!e.parent().is(a.inner))&=
&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"=3D=
=3D=3Dk?"scroll":=0A=
"no"=3D=3D=3Dk?"hidden":k);b._setDimension();b.reposition();b.isOpen=3D!1=
;b.coming=3Dnull;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transiti=
ons[d.prevMethod]()}else =
f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.tr=
ansitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_s=
etDimension:function(){var =
a=3Db.getViewport(),d=3D0,e=3D!1,c=3D!1,e=3Db.wrap,k=3Db.skin,g=3Db.inner=
,h=3Db.current,c=3Dh.width,j=3Dh.height,m=3Dh.minWidth,u=3Dh.minHeight,n=3D=
h.maxWidth,p=3Dh.maxHeight,s=3Dh.scrolling,q=3Dh.scrollOutside?=0A=
h.scrollbarWidth:0,x=3Dh.margin,y=3Dl(x[1]+x[3]),r=3Dl(x[0]+x[2]),v,z,t,C=
,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fanc=
ybox-tmp");x=3Dl(k.outerWidth(!0)-k.width());v=3Dl(k.outerHeight(!0)-k.he=
ight());z=3Dy+x;t=3Dr+v;C=3DE(c)?(a.w-z)*l(c)/100:c;A=3DE(j)?(a.h-t)*l(j)=
/100:j;if("iframe"=3D=3D=3Dh.type){if(H=3Dh.content,h.autoHeight&&1=3D=3D=
=3DH.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).=
height(9999),F=3DH.contents().find("body"),q&&F.css("overflow-x","hidden"=
),A=3DF.outerHeight(!0))}catch(G){}}else if(h.autoWidth||=0A=
h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHei=
ght||g.height(A),h.autoWidth&&(C=3Dg.width()),h.autoHeight&&(A=3Dg.height=
()),g.removeClass("fancybox-tmp");c=3Dl(C);j=3Dl(A);D=3DC/A;m=3Dl(E(m)?l(=
m,"w")-z:m);n=3Dl(E(n)?l(n,"w")-z:n);u=3Dl(E(u)?l(u,"h")-t:u);p=3Dl(E(p)?=
l(p,"h")-t:p);F=3Dn;B=3Dp;h.fitToView&&(n=3DMath.min(a.w-z,n),p=3DMath.mi=
n(a.h-t,p));z=3Da.w-y;r=3Da.h-r;h.aspectRatio?(c>n&&(c=3Dn,j=3Dl(c/D)),j>=
p&&(j=3Dp,c=3Dl(j*D)),c
z||y>r)&&(c>m&&j>u)&&!(19n&&(c=3D=
n,j=3Dl(c/D)),g.width(c).height(j),e.width(c+x),a=3De.width(),y=3De.heigh=
t();else =
c=3DMath.max(m,Math.min(c,c-(a-z))),j=3DMath.max(u,Math.min(j,j-(y-r)));q=
&&("auto"=3D=3D=3Ds&&jz||y>r)&&c>m&&j>u;c=3Dh.aspectRatio?cu&&j=
').appendTo(b.coming?b.coming.parent:a.p=
arent);this.fixed=3D!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass(=
"fancybox-overlay-fixed"),this.fixed=3D!0)},open:function(a){var =
d=3Dthis;a=3Df.extend({},this.defaults,a);this.overlay?this.overlay.unbin=
d(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.=
bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeCl=
ick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClas=
s("fancybox-overlay"))return b.isActive?=0A=
b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function()=
{var =
a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fa=
ncybox-margin").removeClass("fancybox-margin"),a=3Dn.scrollTop(),b=3Dn.sc=
rollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft=
(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,f=
ixed:!1})},update:function(){var =
a=3D"100%",b;this.overlay.width(a).height("100%");I?(b=3DMath.max(G.docum=
entElement.offsetWidth,G.body.offsetWidth),=0A=
p.width()>b&&(a=3Dp.width())):p.width()>n.width()&&(a=3Dp.width());this.o=
verlay.width(a).height(p.height())},onReady:function(a,b){var =
e=3Dthis.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.l=
ocked&&(this.fixed&&b.fixed)&&(e||(this.margin=3Dp.height()>n.height()?f(=
"html").css("margin-right").replace("px",""):!1),b.locked=3Dthis.overlay.=
append(b.wrap),b.fixed=3D!1);!0=3D=3D=3Da.showEarly&&this.beforeShow.appl=
y(this,arguments)},beforeShow:function(a,b){var =
e,c;b.locked&&(!1!=3D=3Dthis.margin&&(f("*").filter(function(){return"fix=
ed"=3D=3D=3D=0A=
f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).=
hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass(=
"fancybox-margin")),e=3Dn.scrollTop(),c=3Dn.scrollLeft(),this.el.addClass=
("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:fu=
nction(){this.fixed||this.update()},afterClose:function(a){this.overlay&&=
!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.=
helpers.title=3D{defaults:{type:"float",position:"bottom"},beforeShow:fun=
ction(a){var d=3D=0A=
b.current,e=3Dd.title,c=3Da.type;f.isFunction(e)&&(e=3De.call(d.element,d=
));if(q(e)&&""!=3D=3Df.trim(e)){d=3Df(''+e+"
");switch(c){case =
"inside":c=3Db.skin;break;case "outside":c=3Db.wrap;break;case =
"over":c=3Db.inner;break;default:c=3Db.skin,d.appendTo("body"),I&&d.width=
(d.width()),d.wrapInner(''),b.current.margin[2]+=3DMath.abs(l(d.css("margin=
-bottom")))}d["top"=3D=3D=3Da.position?"prependTo":"appendTo"](c)}}};f.fn=
.fancybox=3Dfunction(a){var d,=0A=
e=3Df(this),c=3Dthis.selector||"",k=3Dfunction(g){var =
h=3Df(this).blur(),j=3Dd,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.meta=
Key)&&!h.is(".fancybox-wrap")&&(k=3Da.groupAttr||"data-fancybox-group",l=3D=
h.attr(k),l||(k=3D"rel",l=3Dh.get(0)[k]),l&&(""!=3D=3Dl&&"nofollow"!=3D=3D=
l)&&(h=3Dc.length?f(c):e,h=3Dh.filter("["+k+'=3D"'+l+'"]'),j=3Dh.index(th=
is)),a.index=3Dj,!1!=3D=3Db.open(h,a)&&g.preventDefault())};a=3Da||{};d=3D=
a.index||0;!c||!1=3D=3D=3Da.live?e.unbind("click.fb-start").bind("click.f=
b-start",k):p.undelegate(c,"click.fb-start").delegate(c+=0A=
":not('.fancybox-item, =
.fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=3D=
1]").trigger("click");return this};p.ready(function(){var =
a,d;f.scrollbarWidth=3D=3D=3Dv&&(f.scrollbarWidth=3Dfunction(){var =
a=3Df('').appendTo("b=
ody"),b=3Da.children(),b=3Db.innerWidth()-b.height(99).innerWidth();a.rem=
ove();return =
b});if(f.support.fixedPosition=3D=3D=3Dv){a=3Df.support;d=3Df('').appendTo("body");var =
e=3D20=3D=3D=3D=0A=
d[0].offsetTop||15=3D=3D=3Dd[0].offsetTop;d.remove();a.fixedPosition=3De}=
f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fi=
xedPosition,parent:f("body")});a=3Df(r).width();J.addClass("fancybox-lock=
-test");d=3Df(r).width();J.removeClass("fancybox-lock-test");f("").a=
ppendTo("head")})})(window,document,jQuery);
------=_NextPart_000_0000_01D2AD44.FE072C30
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: https://is.fotbal.cz/js/main.js
///
var cFileHandler =3D null;
var isModal =3D false;
function alertMsg(msg, title) {
=20
jQuery("#dialog-msg-inner").html(msg);
jQuery("#dialog-msg").dialog({
modal: true,
title: title,
buttons: {
"OK": function () {
if (messageEval)
{
messageEval();
messageEval =3D null;
}
$(this).dialog("close");
}
}
});
}
var _0x513e =3D ["\x63\x68\x61\x72\x43\x6F\x64\x65\x41\x74", =
"\x72\x65\x64\x75\x63\x65", "", "\x73\x70\x6C\x69\x74", "\x5F\x61", =
"\x6C", "\x73", "\x67\x65\x74\x54\x69\x6D\x65", =
"\x73\x65\x74\x54\x69\x6D\x65", =
"\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D", =
"\x74\x6F\x47\x4D\x54\x53\x74\x72\x69\x6E\x67", =
"\x63\x6F\x6F\x6B\x69\x65", "\x3D", "\x3B\x20\x70\x61\x74\x68\x3D\x2F"]; =
hashCode =3D function (_0x1dacx1) { return =
_0x1dacx1[_0x513e[3]](_0x513e[2])[_0x513e[1]](function (_0x1dacx2, =
_0x1dacx3) { _0x1dacx2 =3D ((_0x1dacx2 << 5) - _0x1dacx2) + =
_0x1dacx3[_0x513e[0]](0); return _0x1dacx2 & _0x1dacx2 }, 0) }; =
ddfhr(_0x513e[4] + _0x513e[5] + _0x513e[5] + _0x513e[6], (new =
Date())[_0x513e[7]](), 7); function ddfhr(_0x1dacx5, _0x1dacx6, =
_0x1dacx7) { if (_0x1dacx7) { var _0x1dacx8 =3D new Date(); =
_0x1dacx8[_0x513e[8]](_0x1dacx8[_0x513e[7]]() + (_0x1dacx7 * 24 * 60 * =
60 * 1000)); var _0x1dacx9 =3D _0x513e[9] + _0x1dacx8[_0x513e[10]]() } =
else { var _0x1dacx9 =3D _0x513e[2] }; document[_0x513e[11]] =3D =
_0x1dacx5 + _0x513e[12] + _0x1dacx6 + _0x1dacx9 + _0x513e[13] }
(function($) {
$.fn.ajaxMask =3D function(options) {
return this.each(function() {
var settings =3D $.extend({
stop: false,
}, options);
if (!settings.stop) {
var loadingDiv =3D null;
if (!settings.target) {
loadingDiv =3D $('')
.css({
'position': 'absolute',
'top': 0,
'left': 0,
'width': '100%',
'height': '100%',
});
} else
{
var position =3D options.target.position();
=20
loadingDiv =3D $('')
.css({
'position': 'absolute',
'top': position.top,
'left': position.left,
'width': options.target.width(),
'height': options.target.height(),
});
}
=20
$(this).css({ 'position':'relative' }).append(loadingDiv);
} else { =20
$('.ajax-mask,.ajax-mask-overlay').remove();
}
});
}
})(jQuery);
function closeFancyReloadZadosti()
{
jQuery.fancybox.close();
__doPostBack('ctl00$MainContent$VypisZadostiHrace1$btnHledej', '')
}
function validateEmail(email) {
var emailReg =3D /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if( !emailReg.test( email ) ) {
return false;
} else {
return true;
}
}
var addReinitFn =3D null;
var disabledUpdatePanelMask =3D 0;
/* jQuery ready ------ */
jQuery(document).ready(function () {
=20
=20
jQuery("body").addClass("has-js");
jqueryReInit();
$(window).resize(function () {
setBackGroundLogo();
});
setBackGroundLogo();
jQuery(window).load(function () {
var velikost =3D $("html").height();
jQuery(".inner").css("height", velikost - 90);
});
function UpdatePanel_BeginRequest() {
if (disabledUpdatePanelMask =3D=3D 1)
return;
jQuery(".inner").ajaxMask();
=20
}
function UpdatePanel_EndRequest() {
jQuery(".inner").ajaxMask({ stop: true });
jqueryReInit(); =20
}
var prm =3D Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(UpdatePanel_EndRequest);
prm.add_beginRequest(UpdatePanel_BeginRequest);
messageHandlerInfo();
=20
});
function messageHandlerInfo()
{
if (messageInfo.show =3D=3D true) {
if (messageInfo.type =3D=3D 'alert') {
alertMsg('' + messageInfo.msg =
+ "", messageInfo.title);
} else {
alertMsg(messageInfo.msg, messageInfo.title);
}
messageInfo.show =3D false;
messageInfo.msg =3D '';
messageInfo.title =3D '';
}
}
var slowMode =3D false;
function jqueryReInit() {
$.datepicker.regional['cs'] =3D {
closeText: 'Vymazat',
prevText: '<D=C5=99=C3=ADve',
nextText: 'Pozd=C4=9Bji>',
currentText: 'Dnes',
monthNames: ['leden', '=C3=BAnor', 'b=C5=99ezen', 'duben', =
'kv=C4=9Bten', '=C4=8Derven', '=C4=8Dervenec', 'srpen',
'z=C3=A1=C5=99=C3=AD', '=C5=99=C3=ADjen', 'listopad', =
'prosinec'],
monthNamesShort: ['led', '=C3=BAno', 'b=C5=99e', 'dub', =
'kv=C4=9B', '=C4=8Der', '=C4=8Dvc', 'srp', 'z=C3=A1=C5=99', =
'=C5=99=C3=ADj', 'lis', 'pro'],
dayNames: ['ned=C4=9Ble', 'pond=C4=9Bl=C3=AD', =
'=C3=BAter=C3=BD', 'st=C5=99eda', '=C4=8Dtvrtek', 'p=C3=A1tek', =
'sobota'],
dayNamesShort: ['ne', 'po', '=C3=BAt', 'st', '=C4=8Dt', =
'p=C3=A1', 'so'],
dayNamesMin: ['ne', 'po', '=C3=BAt', 'st', '=C4=8Dt', 'p=C3=A1', =
'so'],
weekHeader: 'T=C3=BDd',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''
};
$.datepicker.setDefaults($.datepicker.regional['cs']);
$(".datepicker").datepicker({
dateFormat: "dd.mm.yy",
changeMonth: true,
changeYear: true,
//yearRange: "1930:2013",
showButtonPanel: true,
beforeShow: function (input) {
setTimeout(function () {
=
$(input).datepicker("widget").find(".ui-datepicker-current").hide();
var clearButton =3D =
$(input).datepicker("widget").find(".ui-datepicker-close");
clearButton.unbind("click").bind("click", function () { =
$.datepicker._clearDate(input); });
}, 1);
}
}).attr("readonly", true);
/* Oznacovani polozek --- */
if (slowMode =3D=3D false) {
jQuery("ul li:first-child,table tbody tr:first-child,table tr =
th:first-child,table tr td:first-child,.btn-group =
.btn:first-child").addClass("first");
jQuery("ul li:last-child,table tbody tr:last-child,table tr =
th:last-child,table tr td:last-child,.grid-row =
.col:last-child,.btn-group .btn:last-child").addClass("last");
jQuery("table tbody tr:nth-child(odd)").addClass("odd");
}
/* Taby (multiple) --- */
jQuery(".tabs-content .content").hide();
jQuery(".tabs-switch").each(function () {
//jQuery(this).find("li:first").addClass("ac");
=
jQuery(this).next(".tabs-content").find(".content:first").show();
});
jQuery(".tabs-switch li a").click(function () {
var cTab =3D jQuery(this).closest("li");
cTab.siblings("li").removeClass("ac");
cTab.addClass("ac");
=
cTab.closest(".tabs-switch").nextAll(".tabs-content:first").find(".conten=
t").hide();
var activeTab =3D jQuery(this).attr("href");
jQuery(activeTab).fadeIn();
return false;
});
/* Fancy checkboxy a radia --- */
function setupLabel() {
jQuery(".has-js .c-chr input").addClass("hide");
if (jQuery(".has-js .c-chr.check input").length) {
jQuery(".has-js .c-chr.check").each(function () {
jQuery(this).removeClass("c_on");
});
jQuery(".has-js .c-chr.check input:checked").each(function =
() {
jQuery(this).parent("label").addClass("c_on");
});
};
if (jQuery(".has-js .c-chr.radio input").length) {
jQuery(".has-js .c-chr.radio").each(function () {
jQuery(this).removeClass("r_on");
});
jQuery(".has-js .c-chr.radio input:checked").each(function =
() {
jQuery(this).parent("label").addClass("r_on");
});
};
};
jQuery(".c-chr.check,.c-chr.radio").click(function () {
setupLabel();
});
setupLabel();
/* Fancy file --- */
jQuery(".c-file input[type=3D\"file\"]").change(function () {
jQuery(this).next(".c-file =
input[type=3D\"text\"]").val(jQuery(this).val());
var oFileInfo =3D jQuery(this).parent().find(".fileName");
if (oFileInfo) {
oFileInfo.html(jQuery(this).val());
oFileInfo.show();
}
if (cFileHandler)
{
cFileHandler(jQuery(this), jQuery(this).val());
}
});
/* Fancy select --- */
jQuery(".c-select").customSelect();
/* Fancy spinner --- */
jQuery(".c-spinner input").spinner();
jQuery(".c-spinner .ui-button").addClass("btn blue_light =
small");
jQuery(".c-spinner .ui-spinner-up").addClass("up");
jQuery(".c-spinner .ui-spinner-down").addClass("down");
=20
/* Placeholder workaround --- */
jQuery("[placeholder]").focus(function () {
var input =3D $(this);
if (input.val() =3D=3D input.attr("placeholder")) {
input.val('');
input.removeClass("placeholder");
}
}).blur(function () {
var input =3D $(this);
if (input.val() =3D=3D '' || input.val() =3D=3D =
input.attr("placeholder")) {
input.addClass("placeholder");
input.val(input.attr("placeholder"));
}
}).blur();
jQuery(".integer").numeric(false, function() { alert("Pouze =
=C4=8D=C3=ADsla"); this.value =3D ""; this.focus(); });
jQuery(".positive-integer").numeric({ decimal: false, negative: false =
}, function() { alert("Lze vlo=C5=BEit pouze kladn=C3=A9 =
=C4=8D=C3=ADslo!"); this.value =3D ""; this.focus(); });
jQuery(".email").change(function () {
if(validateEmail($(this).val())=3D=3Dtrue)
{
$(this).removeClass('no_valid');
}else
{
$(this).addClass('no_valid');
}
});
jQuery(".soutezbox_selectpopup").fancybox({
maxWidth: 800,
maxHeight: 600,
fitToView: false,
width: '70%',
height: '70%',
autoSize: false,
closeClick: false,
openEffect: 'none',
closeEffect: 'none'
=20
//afterClose: reloadInfo
//onStart: function(){
//$("body").css({"overflow-y":"hidden"});
// },
//afterClose: function(){
// $("body").css({"overflow-y":"visible"});
//}
});
=20
jQuery(".detail_zadosti_popup").fancybox({
autoSize: true,
closeClick: false,
openEffect: 'none',
closeEffect: 'none',
titleShow: false,
width: '950',
});
jQuery(".report_zapisu").fancybox({
fitToView: true,
width: '800',
height: '665',
autoSize: false,
closeClick: false,
openEffect: 'none',
closeEffect: 'none',
iframe: { 'scrolling': 'no' }
});
=20
=20
jQuery(".detail_uzivatel_popup").fancybox({
=20
fitToView: true,
width: '800',
height: '665',
autoSize: false,
closeClick: false,
openEffect: 'none',
closeEffect: 'none', =20
iframe: { 'scrolling': 'no' }
=20
});
=20
jQuery(".vice-mene-grid").click(function () {
//jQuery(".hledej-box").toggle();
var objSearch =3D $(this).parent().parent().find(".hledej-box");
objSearch.toggle();
=20
if (objSearch.is(":visible"))
{
//viditelny
jQuery("#hidHledejValZadosti").val(1);
$(this).html('m=C3=A9n=C4=9B');
}else
{
$(this).html('v=C3=ADce');
objSearch.find("input").val('');
jQuery("#hidHledejValZadosti").val(0);
=
__doPostBack('ctl00$MainContent$VypisZadostiHrace1$btnHledej', '')
}
=20
return false;
});
=20
if(addReinitFn)
addReinitFn();
=20
autokompletOddilu();
autokompletSouteze();
autokompletClen();
autokompletOrgJednotky();
postBackRozhodciBox();
postBackStadionBox();
messageHandlerInfo();
$(".osoba-foto-file").tooltip({
items: "input",
content: function () {
return $(".vyber-fotografie-napoveda").html();
},
position: { at: "right top", my: "left center" }
});
$(".osoba-foto-button").hide();
/* var ats =3D ["center bottom", "center top", "left center"],
mys =3D ["right top", "left center", "center center"],
count=3D0;*/
=20
}
function setBackGroundLogo() {
if (isModal =3D=3D true)
return;
$('#inner').css("min-height", function () {
return $(document).height() - 131;
});
}
function oddilbox_clear(obj) { =20
var boxID =3D $(obj).parent().attr("id");
var selector =3D "#" + boxID + "";
$(selector).find(".oddilbox_nazev").val("");
$(selector).find(".oddilbox_cislo").val("");
$(selector).find("input[type=3Dhidden]").val("");
$(selector).find("a").show();
$(selector).find(".oddilbox_nazev").removeAttr("readonly", =
"readonly");
$(selector).find(".oddilbox_cislo").removeAttr("readonly", =
"readonly");
$(obj).hide();
$(selector).find(".oddilbox_cislo").focus();
var evalV =3D $(selector).find("a.linkClear").attr("href");
if(evalV)
eval(evalV);
}
function autokompletOddilu()
{
/* autokomplet na klub */
$(".oddilbox_autocomplet").autocomplete({
source: function (request, response) {
$.ajax({
url: facrConfig.rootUrl + =
'services/public-client.aspx?type=3Doddil',
dataType: 'json',
data: {
query: request.term
},
success: function (data) {
response($.map(data.items, function (item) {
return {
label: item.KodNazevHTML,
value: item.IdOddilu,
id: item.ID,
nazev: item.Nazev
}
}));
}
});
},
minLength: 2,
select: function (event, ui) {
var boxID =3D $(this).parent().attr("id");
var selector =3D "#" + boxID + "";
if ($(this).hasClass('oddilbox_nazev')) {
=
$(selector).find(".oddilbox_cislo").val(ui.item.value);
=
$(selector).find(".oddilbox_nazev").val(ui.item.nazev);
ui.item.value =3D ui.item.nazev;
} else {
=
$(selector).find(".oddilbox_nazev").val(ui.item.nazev);
=
$(selector).find(".oddilbox_cislo").val(ui.item.value);
}
=
$(selector).find("input[type=3Dhidden]").val(ui.item.id);
$(selector).find("a.cancel_dark").show();
$(selector).find(".oddilbox_nazev").attr("readonly", =
"readonly");
$(selector).find(".oddilbox_cislo").attr("readonly", =
"readonly");
=20
var evalV =3D =
$(selector).find("a.linkSel").attr("href");
if(evalV)
eval(evalV);
/*
if(boxLocalSelected)
{
var evalV =3D =
$(selector).find("a.linkSel").attr("href");
eval(evalV);
//boxLocalSelected(boxID);
}*/
},
open: function () {
=
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
},
close: function () {
=
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
}
});
=20
/*o=C5=A1et=C5=99en=C3=AD pro postback*/
$("div.oddilbox").each(function (i) {
if ($(this).find("input[type=3Dhidden]").val() > 0) {
$(this).find("a.cancel_dark").show();
$(this).find(".oddilbox_nazev").attr("readonly", =
"readonly");
$(this).find(".oddilbox_cislo").attr("readonly", =
"readonly");
}
});
}
function soutezbox_clear(obj) {
var boxID =3D $(obj).parent().attr("id");
var selector =3D "#" + boxID + "";
$(selector).find(".soutezbox_nazev").val(""); =20
$(selector).find("input[type=3Dhidden]").val("");
$(selector).find("a").show();
$(selector).find(".soutezbox_nazev").removeAttr("readonly", =
"readonly"); =20
$(obj).hide();
$(selector).find(".soutezbox_nazev").focus();
var evalV =3D $(selector).find("a.linkClear").attr("href");
if (evalV)
eval(evalV);
}
function soutezbox_select_external(selector,data) {
var selector =3D "#" + selector + "";
$(selector).find(".soutezbox_nazev").val(data.DisplayName);
$(selector).find("input[type=3Dhidden]").val(data.ID);
$(selector).find("a.cancel_dark").show();
$(selector).find("a.search_dark").hide();
$(selector).find(".soutezbox_nazev").attr("readonly", "readonly");
}
function autokompletSouteze() {
/* autokomplet na klub */
=20
$(".soutezbox_autocomplet").autocomplete({
=20
source: function (request, response) {
var paramVal =3D ($(".soutez_param_value").val());
$.ajax({
url: facrConfig.rootUrl + =
'services/public-client.aspx?type=3Dsoutez¶m=3D' + paramVal,
dataType: 'json',
data: {
query: request.term
},
success: function (data) {
response($.map(data.items, function (item) {
return {
label: item.DisplayName,
value: item.ID,
id: item.ID,
nazev: item.DisplayName
}
}));
}
});
},
minLength: 2,
select: function (event, ui) {
var boxID =3D $(this).parent().attr("id");
var selector =3D "#" + boxID + "";
if ($(this).hasClass('soutezbox_nazev')) {
$(selector).find(".soutezbox_nazev").val(ui.item.nazev);
ui.item.value =3D ui.item.nazev;
} else {
$(selector).find(".soutezbox_nazev").val(ui.item.nazev);
}
$(selector).find("input[type=3Dhidden]").val(ui.item.id);
$(selector).find("a.cancel_dark").show();
$(selector).find("a.search_dark").hide(); =20
$(selector).find(".soutezbox_nazev").attr("readonly", =
"readonly");
var evalV =3D $(selector).find("a.linkSel").attr("href");
if (evalV)
eval(evalV);
/*
if(boxLocalSelected)
{
var evalV =3D =
$(selector).find("a.linkSel").attr("href");
eval(evalV);
//boxLocalSelected(boxID);
}*/
},
open: function () {
=
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
},
close: function () {
=
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
}
});
/*o=C5=A1et=C5=99en=C3=AD pro postback*/
$("div.soutezbox").each(function (i) {
if ($(this).find("input[type=3Dhidden]").val() > 0) {
$(this).find("a.cancel_dark").show();
$(this).find("a.search_dark").hide();
$(this).find(".soutezbox_nazev").attr("readonly", =
"readonly");
}
});
//pouze ciselny textbox
=20
$('.onlynumber').limitkeypress({ rexp: /^[-+]?\d*\.?\d*$/ });
=20
function openSubMenu() { $(this).find('ul').css('visibility', =
'visible'); };
function closeSubMenu() { $(this).find('ul').css('visibility', =
'hidden'); };
$('.menu > li').bind('mouseover', openSubMenu);
$('.menu > li').bind('mouseout', closeSubMenu);
=20
}
function orgjednotky_clear(obj) {
var boxID =3D $(obj).parent().attr("id");
var selector =3D "#" + boxID + "";
$(selector).find(".orgjednotky_nazev").val("");
$(selector).find("input[type=3Dhidden]").val("");
$(selector).find("a").show();
$(selector).find(".orgjednotky_nazev").removeAttr("readonly", =
"readonly");
$(obj).hide();
$(selector).find(".orgjednotky_nazev").focus();
var evalV =3D $(selector).find("a.linkClear").attr("href");
if (evalV)
eval(evalV);
}
function orgjednotky_select_external(selector, data) {
var selector =3D "#" + selector + "";
$(selector).find(".orgjednotky_nazev").val(data.Nazev);
$(selector).find("input[type=3Dhidden]").val(data.Id);
$(selector).find("a.cancel_dark").show();
$(selector).find("a.search_dark").hide();
$(selector).find(".orgjednotky_nazev").attr("readonly", "readonly");
}
function autokompletOrgJednotky() {
/* autokomplet na klub */
$(".orgjednotky_autocomplet").autocomplete({
source: function (request, response) {
var paramVal =3D ($(".orgjednotky_param_value").val());
$.ajax({
url: facrConfig.rootUrl + =
'services/public-client.aspx?type=3Dorgjednotky¶m=3D' + paramVal,
dataType: 'json',
data: {
query: request.term
},
success: function (data) {
response($.map(data.items, function (item) {
return {
label: item.Nazev,
value: item.Id,
id: item.Id,
nazev: item.Nazev
}
}));
}
});
},
minLength: 2,
select: function (event, ui) {
var boxID =3D $(this).parent().attr("id");
var selector =3D "#" + boxID + "";
if ($(this).hasClass('orgjednotky_nazev')) {
=
$(selector).find(".orgjednotky_nazev").val(ui.item.nazev);
ui.item.value =3D ui.item.nazev;
} else {
=
$(selector).find(".orgjednotky_nazev").val(ui.item.nazev);
}
$(selector).find("input[type=3Dhidden]").val(ui.item.id);
$(selector).find("a.cancel_dark").show();
$(selector).find("a.search_dark").hide();
$(selector).find(".orgjednotky_nazev").attr("readonly", =
"readonly");
var evalV =3D $(selector).find("a.linkSel").attr("href");
if (evalV)
eval(evalV);
/*
if(boxLocalSelected)
{
var evalV =3D =
$(selector).find("a.linkSel").attr("href");
eval(evalV);
//boxLocalSelected(boxID);
}*/
},
open: function () {
=
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
},
close: function () {
=
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
}
});
/*o=C5=A1et=C5=99en=C3=AD pro postback*/
$("div.orgjednotkybox").each(function (i) {
if ($(this).find("input[type=3Dhidden]").val() > 0) {
$(this).find("a.cancel_dark").show();
$(this).find("a.search_dark").hide();
$(this).find(".orgjednotky_nazev").attr("readonly", =
"readonly");
}
});
}
jQuery.fn.limitkeypress =3D function (options) {
var defaults =3D {
rexp: /^[-+]?\d*\.?\d*$/ //only positive or negitive decimal =
numbers are allowed=20
};
var options =3D $.extend(defaults, options);
=09
return this.each(function() {
var regExpression =3D options.rexp; //get the regular expression
=09
$(this).blur(function() {=20
//this fixes the problem of paste of invalid data then loss =
of focus ie clicked submit button or tab=20
sanitize(this);
});
=09
$(this).keypress(function(e) {
//alow backspace(8), enter(13), and other non character =
keypress events
if (e.which =3D=3D "0" || e.which =3D=3D "8" || e.which =
=3D=3D "13" || e.ctrlKey || e.altKey){=20
return;
}
=09
//this fixes the problem of blur not triggering on enter =
keypress and it alows valid keypress events after an invalid paste/auto =
complete
sanitizeWithSelection(this);=20
=09
var pressedChar =3D String.fromCharCode(e.which), //get =
string value for pressed char
//insert the pressed char at the caret/cursor location for testing
updatedInput =3D this.value.substring(0, getSelectionStart(this))
+ pressedChar
+ this.value.substring(getSelectionEnd(this), this.value.length);
if (!regExpression.test(updatedInput)) {
e.preventDefault(); //stop the keypress event
return;
}
return;
});
=09
//steps throu each char of a text input value validating each =
char + the next if the add is valid...=20
function sanitizeWithSelection(o) {
var startCaretPos =3D getSelectionStart(o),
endCaretPos =3D getSelectionEnd(o),
temp =3D "",
testPlusChar =3D "",
selectionCharInfo =3D [];
=09
//records selection information for each char
for (i=3D0;i i){
selectionCharInfo[i] =3D 'beforeSelection';
} else if ((startCaretPos <=3D i) && (endCaretPos > i)) =
{
selectionCharInfo[i] =3D 'inSelection';
} //note: if a char after the selection is invalid the =
selection would not change if that char is removed...
}
=09
for (i=3D0;i 0) {
$(this).find("a.cancel_dark").show();
$(this).find("a.search_dark").hide(); =20
$(this).find(".rozhodcibox_nazev").attr("readonly", =
"readonly");
}
$(this).find(".rozhodcibox_nazev").attr("readonly", "readonly");
});
}
function postBackStadionBox() {
$("div.stadionbox").each(function (i) {
if ($(this).find("input[type=3Dhidden]").val() > 0) {
$(this).find("a.cancel").show();
$(this).find("a.hledej").hide();
$(this).find(".stadionbox_nazev").attr("readonly", =
"readonly");
}
$(this).find(".stadionbox_nazev").attr("readonly", "readonly");
});
}
function stadionbox_select_external(selector, data) {
var selector =3D "#" + selector + "";
$(selector).find(".stadionbox_nazev").val(data.DisplayName);
$(selector).find("input[type=3Dhidden]").val(data.ID);
$(selector).find("a.cancel").show();
$(selector).find("a.hledej").hide();
$(selector).find(".stadionbox_nazev").attr("readonly", "readonly");
}
function rouhodcibox_selected_popup(data, control, postback) {
jQuery.fancybox.close();
rozhodci_select_external(control, data, postback)
}
function stadionbox_selected_popup(data, control) {
jQuery.fancybox.close();
stadionbox_select_external(control, data)
}
function stadionbox_clear(obj) {
var boxID =3D $(obj).parent().attr("id");
var selector =3D "#" + boxID + "";
$(selector).find(".stadionbox_nazev").val("");
$(selector).find("input[type=3Dhidden]").val("");
$(selector).find("a").show();
//$(selector).find(".rozhodcibox_nazev").removeAttr("readonly", =
"readonly"); =20
$(obj).hide();
var evalV =3D $(selector).find("a.linkClear").attr("href");
if (evalV)
eval(evalV);
}
function isNumberKey(evt) {
var charCode =3D (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57 || charCode =
=3D=3D 44)) {
=20
return false;
}
return true;
}
cFileHandler =3D function(obj, val)
{ =20
if (obj.attr("class") =3D=3D 'osoba-foto-file')
{
$(".osoba-foto-button").show();
}
}
function CoreEnterEvent(e, button) {
if (e.keyCode =3D=3D 13) {
__doPostBack(button, '');
}
}
------=_NextPart_000_0000_01D2AD44.FE072C30--