1 /*! jQuery UI - v1.10.4 - 2014-05-17
3 * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js
4 * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
6 (function(t
,e
){function n(e
,n
){var r
,s
,o
,a
=e
.nodeName
.toLowerCase();return"area"===a?
(r
=e
.parentNode
,s
=r
.name
,e
.href
&&s
&&"map"===r
.nodeName
.toLowerCase()?
(o
=t("img[usemap=#"+s
+"]")[0],!!o
&&i(o
)):!1):(/input|select|textarea|button|object
/.test(a
)?
!e
.disabled
:"a"===a?e
.href||n
:n
)&&i(e
)}function i(e
){return t
.expr
.filters
.visible(e
)&&!t(e
).parents().addBack().filter(function(){return"hidden"===t
.css(this,"visibility")}).length
}var r
=0,s
=/^ui
-id
-\d
+$
/;t
.ui
=t
.ui||
{},t
.extend(t
.ui
,{version
:"1.10.4",keyCode
:{BACKSPACE
:8,COMMA
:188,DELETE
:46,DOWN
:40,END
:35,ENTER
:13,ESCAPE
:27,HOME
:36,LEFT
:37,NUMPAD_ADD
:107,NUMPAD_DECIMAL
:110,NUMPAD_DIVIDE
:111,NUMPAD_ENTER
:108,NUMPAD_MULTIPLY
:106,NUMPAD_SUBTRACT
:109,PAGE_DOWN
:34,PAGE_UP
:33,PERIOD
:190,RIGHT
:39,SPACE
:32,TAB
:9,UP
:38}}),t
.fn
.extend({focus
:function(e
){return function(n
,i
){return"number"==typeof n?
this.each(function(){var e
=this;setTimeout(function(){t(e
).focus(),i
&&i
.call(e
)},n
)}):e
.apply(this,arguments
)}}(t
.fn
.focus
),scrollParent
:function(){var e
;return e
=t
.ui
.ie
&&/(static|relative
)/.test(this.css("position"))||
/absolute
/.test(this.css("position"))?
this.parents().filter(function(){return/(relative|absolute|fixed
)/.test(t
.css(this,"position"))&&/(auto|scroll
)/.test(t
.css(this,"overflow")+t
.css(this,"overflow-y")+t
.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll
)/.test(t
.css(this,"overflow")+t
.css(this,"overflow-y")+t
.css(this,"overflow-x"))}).eq(0),/fixed
/.test(this.css("position"))||
!e
.length?
t(document
):e
},zIndex
:function(n
){if(n
!==e
)return this.css("zIndex",n
);if(this.length
)for(var i
,r
,s
=t(this[0]);s
.length
&&s
[0]!==document
;){if(i
=s
.css("position"),("absolute"===i||
"relative"===i||
"fixed"===i
)&&(r
=parseInt(s
.css("zIndex"),10),!isNaN(r
)&&0!==r
))return r
;s
=s
.parent()}return 0},uniqueId
:function(){return this.each(function(){this.id||
(this.id
="ui-id-"+ ++r
)})},removeUniqueId
:function(){return this.each(function(){s
.test(this.id
)&&t(this).removeAttr("id")})}}),t
.extend(t
.expr
[":"],{data
:t
.expr
.createPseudo?t
.expr
.createPseudo(function(e
){return function(n
){return!!t
.data(n
,e
)}}):function(e
,n
,i
){return!!t
.data(e
,i
[3])},focusable
:function(e
){return n(e
,!isNaN(t
.attr(e
,"tabindex")))},tabbable
:function(e
){var i
=t
.attr(e
,"tabindex"),r
=isNaN(i
);return(r||i
>=0)&&n(e
,!r
)}}),t("<a>").outerWidth(1).jquery||t
.each(["Width","Height"],function(n
,i
){function r(e
,n
,i
,r
){return t
.each(s
,function(){n
-=parseFloat(t
.css(e
,"padding"+this))||
0,i
&&(n
-=parseFloat(t
.css(e
,"border"+this+"Width"))||
0),r
&&(n
-=parseFloat(t
.css(e
,"margin"+this))||
0)}),n
}var s
="Width"===i?
["Left","Right"]:["Top","Bottom"],o
=i
.toLowerCase(),a
={innerWidth
:t
.fn
.innerWidth
,innerHeight
:t
.fn
.innerHeight
,outerWidth
:t
.fn
.outerWidth
,outerHeight
:t
.fn
.outerHeight
};t
.fn
["inner"+i
]=function(n
){return n
===e?a
["inner"+i
].call(this):this.each(function(){t(this).css(o
,r(this,n
)+"px")})},t
.fn
["outer"+i
]=function(e
,n
){return"number"!=typeof e?a
["outer"+i
].call(this,e
):this.each(function(){t(this).css(o
,r(this,e
,!0,n
)+"px")})}}),t
.fn
.addBack||
(t
.fn
.addBack
=function(t
){return this.add(null==t?
this.prevObject
:this.prevObject
.filter(t
))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t
.fn
.removeData
=function(e
){return function(n
){return arguments
.length?e
.call(this,t
.camelCase(n
)):e
.call(this)}}(t
.fn
.removeData
)),t
.ui
.ie
=!!/msie
[\w
.]+/.exec(navigator
.userAgent
.toLowerCase()),t
.support
.selectstart
="onselectstart"in document
.createElement("div"),t
.fn
.extend({disableSelection
:function(){return this.bind((t
.support
.selectstart?
"selectstart":"mousedown")+".ui-disableSelection",function(t
){t
.preventDefault()})},enableSelection
:function(){return this.unbind(".ui-disableSelection")}}),t
.extend(t
.ui
,{plugin
:{add
:function(e
,n
,i
){var r
,s
=t
.ui
[e].prototype;for(r
in i
)s
.plugins
[r]=s
.plugins
[r]||
[],s
.plugins
[r].push([n
,i
[r]])},call
:function(t
,e
,n
){var i
,r
=t
.plugins
[e];if(r
&&t
.element
[0].parentNode
&&11!==t
.element
[0].parentNode
.nodeType
)for(i
=0;r
.length
>i
;i
++)t
.options
[r
[i][0]]&&r
[i][1].apply(t
.element
,n
)}},hasScroll
:function(e
,n
){if("hidden"===t(e
).css("overflow"))return!1;var i
=n
&&"left"===n?
"scrollLeft":"scrollTop",r
=!1;return e
[i]>0?
!0:(e
[i]=1,r
=e
[i]>0,e
[i]=0,r
)}})})(jQuery
);(function(t
,e
){var i
=0,s
=Array
.prototype.slice
,n
=t
.cleanData
;t
.cleanData
=function(e
){for(var i
,s
=0;null!=(i
=e
[s]);s
++)try{t(i
).triggerHandler("remove")}catch(o
){}n(e
)},t
.widget
=function(i
,s
,n
){var o
,r
,h
,a
,l
={},c
=i
.split(".")[0];i
=i
.split(".")[1],o
=c
+"-"+i
,n||
(n
=s
,s
=t
.Widget
),t
.expr
[":"][o
.toLowerCase()]=function(e
){return!!t
.data(e
,o
)},t
[c]=t
[c]||
{},r
=t
[c][i],h
=t
[c][i]=function(t
,i
){return this._createWidget?
(arguments
.length
&&this._createWidget(t
,i
),e
):new h(t
,i
)},t
.extend(h
,r
,{version
:n
.version
,_proto
:t
.extend({},n
),_childConstructors
:[]}),a
=new s
,a
.options
=t
.widget
.extend({},a
.options
),t
.each(n
,function(i
,n
){return t
.isFunction(n
)?
(l
[i]=function(){var t
=function(){return s
.prototype[i].apply(this,arguments
)},e
=function(t
){return s
.prototype[i].apply(this,t
)};return function(){var i
,s
=this._super
,o
=this._superApply
;return this._super
=t
,this._superApply
=e
,i
=n
.apply(this,arguments
),this._super
=s
,this._superApply
=o
,i
}}(),e
):(l
[i]=n
,e
)}),h
.prototype=t
.widget
.extend(a
,{widgetEventPrefix
:r?a
.widgetEventPrefix||i
:i
},l
,{constructor
:h
,namespace:c
,widgetName
:i
,widgetFullName
:o
}),r?
(t
.each(r
._childConstructors
,function(e
,i
){var s
=i
.prototype;t
.widget(s
.namespace+"."+s
.widgetName
,h
,i
._proto
)}),delete r
._childConstructors
):s
._childConstructors
.push(h
),t
.widget
.bridge(i
,h
)},t
.widget
.extend
=function(i
){for(var n
,o
,r
=s
.call(arguments
,1),h
=0,a
=r
.length
;a
>h
;h
++)for(n
in r
[h])o
=r
[h][n],r
[h].hasOwnProperty(n
)&&o
!==e
&&(i
[n]=t
.isPlainObject(o
)?t
.isPlainObject(i
[n])?t
.widget
.extend({},i
[n],o
):t
.widget
.extend({},o
):o
);return i
},t
.widget
.bridge
=function(i
,n
){var o
=n
.prototype.widgetFullName||i
;t
.fn
[i]=function(r
){var h
="string"==typeof r
,a
=s
.call(arguments
,1),l
=this;return r
=!h
&&a
.length?t
.widget
.extend
.apply(null,[r].concat(a
)):r
,h?
this.each(function(){var s
,n
=t
.data(this,o
);return n?t
.isFunction(n
[r])&&"_"!==r
.charAt(0)?
(s
=n
[r].apply(n
,a
),s
!==n
&&s
!==e?
(l
=s
&&s
.jquery?l
.pushStack(s
.get()):s
,!1):e
):t
.error("no such method '"+r
+"' for "+i
+" widget instance"):t
.error("cannot call methods on "+i
+" prior to initialization; "+"attempted to call method '"+r
+"'")}):this.each(function(){var e
=t
.data(this,o
);e?e
.option(r||
{})._init():t
.data(this,o
,new n(r
,this))}),l
}},t
.Widget
=function(){},t
.Widget
._childConstructors
=[],t
.Widget
.prototype={widgetName
:"widget",widgetEventPrefix
:"",defaultElement
:"<div>",options
:{disabled
:!1,create
:null},_createWidget
:function(e
,s
){s
=t(s||
this.defaultElement||
this)[0],this.element
=t(s
),this.uuid
=i
++,this.eventNamespace
="."+this.widgetName
+this.uuid
,this.options
=t
.widget
.extend({},this.options
,this._getCreateOptions(),e
),this.bindings
=t(),this.hoverable
=t(),this.focusable
=t(),s
!==this&&(t
.data(s
,this.widgetFullName
,this),this._on(!0,this.element
,{remove
:function(t
){t
.target
===s
&&this.destroy()}}),this.document
=t(s
.style?s
.ownerDocument
:s
.document||s
),this.window
=t(this.document
[0].defaultView||
this.document
[0].parentWindow
)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions
:t
.noop
,_getCreateEventData
:t
.noop
,_create
:t
.noop
,_init
:t
.noop
,destroy
:function(){this._destroy(),this.element
.unbind(this.eventNamespace
).removeData(this.widgetName
).removeData(this.widgetFullName
).removeData(t
.camelCase(this.widgetFullName
)),this.widget().unbind(this.eventNamespace
).removeAttr("aria-disabled").removeClass(this.widgetFullName
+"-disabled "+"ui-state-disabled"),this.bindings
.unbind(this.eventNamespace
),this.hoverable
.removeClass("ui-state-hover"),this.focusable
.removeClass("ui-state-focus")},_destroy
:t
.noop
,widget
:function(){return this.element
},option
:function(i
,s
){var n
,o
,r
,h
=i
;if(0===arguments
.length
)return t
.widget
.extend({},this.options
);if("string"==typeof i
)if(h
={},n
=i
.split("."),i
=n
.shift(),n
.length
){for(o
=h
[i]=t
.widget
.extend({},this.options
[i]),r
=0;n
.length
-1>r
;r
++)o
[n
[r]]=o
[n
[r]]||
{},o
=o
[n
[r]];if(i
=n
.pop(),1===arguments
.length
)return o
[i]===e?
null:o
[i];o
[i]=s
}else{if(1===arguments
.length
)return this.options
[i]===e?
null:this.options
[i];h
[i]=s
}return this._setOptions(h
),this},_setOptions
:function(t
){var e
;for(e
in t
)this._setOption(e
,t
[e]);return this},_setOption
:function(t
,e
){return this.options
[t]=e
,"disabled"===t
&&(this.widget().toggleClass(this.widgetFullName
+"-disabled ui-state-disabled",!!e
).attr("aria-disabled",e
),this.hoverable
.removeClass("ui-state-hover"),this.focusable
.removeClass("ui-state-focus")),this},enable
:function(){return this._setOption("disabled",!1)},disable
:function(){return this._setOption("disabled",!0)},_on
:function(i
,s
,n
){var o
,r
=this;"boolean"!=typeof i
&&(n
=s
,s
=i
,i
=!1),n?
(s
=o
=t(s
),this.bindings
=this.bindings
.add(s
)):(n
=s
,s
=this.element
,o
=this.widget()),t
.each(n
,function(n
,h
){function a(){return i||r
.options
.disabled
!==!0&&!t(this).hasClass("ui-state-disabled")?
("string"==typeof h?r
[h]:h
).apply(r
,arguments
):e
}"string"!=typeof h
&&(a
.guid
=h
.guid
=h
.guid||a
.guid||t
.guid
++);var l
=n
.match(/^
(\w
+)\s
*(.*)$
/),c
=l
[1]+r
.eventNamespace
,u
=l
[2];u?o
.delegate(u
,c
,a
):s
.bind(c
,a
)})},_off
:function(t
,e
){e
=(e||
"").split(" ").join(this.eventNamespace
+" ")+this.eventNamespace
,t
.unbind(e
).undelegate(e
)},_delay
:function(t
,e
){function i(){return("string"==typeof t?s
[t]:t
).apply(s
,arguments
)}var s
=this;return setTimeout(i
,e||
0)},_hoverable
:function(e
){this.hoverable
=this.hoverable
.add(e
),this._on(e
,{mouseenter
:function(e
){t(e
.currentTarget
).addClass("ui-state-hover")},mouseleave
:function(e
){t(e
.currentTarget
).removeClass("ui-state-hover")}})},_focusable
:function(e
){this.focusable
=this.focusable
.add(e
),this._on(e
,{focusin
:function(e
){t(e
.currentTarget
).addClass("ui-state-focus")},focusout
:function(e
){t(e
.currentTarget
).removeClass("ui-state-focus")}})},_trigger
:function(e
,i
,s
){var n
,o
,r
=this.options
[e];if(s
=s||
{},i
=t
.Event(i
),i
.type
=(e
===this.widgetEventPrefix?e
:this.widgetEventPrefix
+e
).toLowerCase(),i
.target
=this.element
[0],o
=i
.originalEvent
)for(n
in o
)n
in i||
(i
[n]=o
[n]);return this.element
.trigger(i
,s
),!(t
.isFunction(r
)&&r
.apply(this.element
[0],[i].concat(s
))===!1||i
.isDefaultPrevented())}},t
.each({show
:"fadeIn",hide
:"fadeOut"},function(e
,i
){t
.Widget
.prototype["_"+e
]=function(s
,n
,o
){"string"==typeof n
&&(n
={effect
:n
});var r
,h
=n?n
===!0||
"number"==typeof n?i
:n
.effect||i
:e
;n
=n||
{},"number"==typeof n
&&(n
={duration
:n
}),r
=!t
.isEmptyObject(n
),n
.complete
=o
,n
.delay
&&s
.delay(n
.delay
),r
&&t
.effects
&&t
.effects
.effect
[h]?s
[e](n
):h
!==e
&&s
[h]?s
[h](n
.duration
,n
.easing
,o
):s
.queue(function(i
){t(this)[e](),o
&&o
.call(s
[0]),i()})}})})(jQuery
);(function(e
){var t
=!1;e(document
).mouseup(function(){t
=!1}),e
.widget("ui.mouse",{version
:"1.10.4",options
:{cancel
:"input,textarea,button,select,option",distance
:1,delay
:0},_mouseInit
:function(){var t
=this;this.element
.bind("mousedown."+this.widgetName
,function(e
){return t
._mouseDown(e
)}).bind("click."+this.widgetName
,function(n
){return!0===e
.data(n
.target
,t
.widgetName
+".preventClickEvent")?
(e
.removeData(n
.target
,t
.widgetName
+".preventClickEvent"),n
.stopImmediatePropagation(),!1):undefined
}),this.started
=!1},_mouseDestroy
:function(){this.element
.unbind("."+this.widgetName
),this._mouseMoveDelegate
&&e(document
).unbind("mousemove."+this.widgetName
,this._mouseMoveDelegate
).unbind("mouseup."+this.widgetName
,this._mouseUpDelegate
)},_mouseDown
:function(n
){if(!t
){this._mouseStarted
&&this._mouseUp(n
),this._mouseDownEvent
=n
;var i
=this,s
=1===n
.which
,o
="string"==typeof this.options
.cancel
&&n
.target
.nodeName?
e(n
.target
).closest(this.options
.cancel
).length
:!1;return s
&&!o
&&this._mouseCapture(n
)?
(this.mouseDelayMet
=!this.options
.delay
,this.mouseDelayMet||
(this._mouseDelayTimer
=setTimeout(function(){i
.mouseDelayMet
=!0},this.options
.delay
)),this._mouseDistanceMet(n
)&&this._mouseDelayMet(n
)&&(this._mouseStarted
=this._mouseStart(n
)!==!1,!this._mouseStarted
)?
(n
.preventDefault(),!0):(!0===e
.data(n
.target
,this.widgetName
+".preventClickEvent")&&e
.removeData(n
.target
,this.widgetName
+".preventClickEvent"),this._mouseMoveDelegate
=function(e
){return i
._mouseMove(e
)},this._mouseUpDelegate
=function(e
){return i
._mouseUp(e
)},e(document
).bind("mousemove."+this.widgetName
,this._mouseMoveDelegate
).bind("mouseup."+this.widgetName
,this._mouseUpDelegate
),n
.preventDefault(),t
=!0,!0)):!0}},_mouseMove
:function(t
){return e
.ui
.ie
&&(!document
.documentMode||
9>document
.documentMode
)&&!t
.button?
this._mouseUp(t
):this._mouseStarted?
(this._mouseDrag(t
),t
.preventDefault()):(this._mouseDistanceMet(t
)&&this._mouseDelayMet(t
)&&(this._mouseStarted
=this._mouseStart(this._mouseDownEvent
,t
)!==!1,this._mouseStarted?
this._mouseDrag(t
):this._mouseUp(t
)),!this._mouseStarted
)},_mouseUp
:function(t
){return e(document
).unbind("mousemove."+this.widgetName
,this._mouseMoveDelegate
).unbind("mouseup."+this.widgetName
,this._mouseUpDelegate
),this._mouseStarted
&&(this._mouseStarted
=!1,t
.target
===this._mouseDownEvent
.target
&&e
.data(t
.target
,this.widgetName
+".preventClickEvent",!0),this._mouseStop(t
)),!1},_mouseDistanceMet
:function(e
){return Math
.max(Math
.abs(this._mouseDownEvent
.pageX
-e
.pageX
),Math
.abs(this._mouseDownEvent
.pageY
-e
.pageY
))>=this.options
.distance
},_mouseDelayMet
:function(){return this.mouseDelayMet
},_mouseStart
:function(){},_mouseDrag
:function(){},_mouseStop
:function(){},_mouseCapture
:function(){return!0}})})(jQuery
);(function(t
,e
){function i(t
,e
,i
){return[parseFloat(t
[0])*(p
.test(t
[0])?e
/100:1),parseFloat(t
[1])*(p
.test(t
[1])?i
/100:1)]}function s(e
,i
){return parseInt(t
.css(e
,i
),10)||
0}function n(e
){var i
=e
[0];return 9===i
.nodeType?
{width
:e
.width(),height
:e
.height(),offset
:{top
:0,left
:0}}:t
.isWindow(i
)?
{width
:e
.width(),height
:e
.height(),offset
:{top
:e
.scrollTop(),left
:e
.scrollLeft()}}:i
.preventDefault?
{width
:0,height
:0,offset
:{top
:i
.pageY
,left
:i
.pageX
}}:{width
:e
.outerWidth(),height
:e
.outerHeight(),offset
:e
.offset()}}t
.ui
=t
.ui||
{};var o
,a
=Math
.max
,r
=Math
.abs
,h
=Math
.round
,l
=/left|center|right
/,c
=/top|center|bottom
/,u
=/[\
+\
-]\d
+(\
.[\d
]+)?
%?
/,d
=/^\w
+/,p
=/%$
/,f
=t
.fn
.position
;t
.position
={scrollbarWidth
:function(){if(o
!==e
)return o
;var i
,s
,n
=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a
=n
.children()[0];return t("body").append(n
),i
=a
.offsetWidth
,n
.css("overflow","scroll"),s
=a
.offsetWidth
,i
===s
&&(s
=n
[0].clientWidth
),n
.remove(),o
=i
-s
},getScrollInfo
:function(e
){var i
=e
.isWindow||e
.isDocument?
"":e
.element
.css("overflow-x"),s
=e
.isWindow||e
.isDocument?
"":e
.element
.css("overflow-y"),n
="scroll"===i||
"auto"===i
&&e
.width
<e
.element
[0].scrollWidth
,o
="scroll"===s||
"auto"===s
&&e
.height
<e
.element
[0].scrollHeight
;return{width
:o?t
.position
.scrollbarWidth():0,height
:n?t
.position
.scrollbarWidth():0}},getWithinInfo
:function(e
){var i
=t(e||window
),s
=t
.isWindow(i
[0]),n
=!!i
[0]&&9===i
[0].nodeType
;return{element
:i
,isWindow
:s
,isDocument
:n
,offset
:i
.offset()||
{left
:0,top
:0},scrollLeft
:i
.scrollLeft(),scrollTop
:i
.scrollTop(),width
:s?i
.width():i
.outerWidth(),height
:s?i
.height():i
.outerHeight()}}},t
.fn
.position
=function(e
){if(!e||
!e
.of
)return f
.apply(this,arguments
);e
=t
.extend({},e
);var o
,p
,g
,m
,v
,_
,b
=t(e
.of
),y
=t
.position
.getWithinInfo(e
.within
),w
=t
.position
.getScrollInfo(y
),k
=(e
.collision||
"flip").split(" "),D
={};return _
=n(b
),b
[0].preventDefault
&&(e
.at
="left top"),p
=_
.width
,g
=_
.height
,m
=_
.offset
,v
=t
.extend({},m
),t
.each(["my","at"],function(){var t
,i
,s
=(e
[this]||
"").split(" ");1===s
.length
&&(s
=l
.test(s
[0])?s
.concat(["center"]):c
.test(s
[0])?
["center"].concat(s
):["center","center"]),s
[0]=l
.test(s
[0])?s
[0]:"center",s
[1]=c
.test(s
[1])?s
[1]:"center",t
=u
.exec(s
[0]),i
=u
.exec(s
[1]),D
[this]=[t?t
[0]:0,i?i
[0]:0],e
[this]=[d
.exec(s
[0])[0],d
.exec(s
[1])[0]]}),1===k
.length
&&(k
[1]=k
[0]),"right"===e
.at
[0]?v
.left
+=p
:"center"===e
.at
[0]&&(v
.left
+=p
/2),"bottom"===e
.at
[1]?v
.top
+=g
:"center"===e
.at
[1]&&(v
.top
+=g
/2),o
=i(D
.at
,p
,g
),v
.left
+=o
[0],v
.top
+=o
[1],this.each(function(){var n
,l
,c
=t(this),u
=c
.outerWidth(),d
=c
.outerHeight(),f
=s(this,"marginLeft"),_
=s(this,"marginTop"),x
=u
+f
+s(this,"marginRight")+w
.width
,C
=d
+_
+s(this,"marginBottom")+w
.height
,I
=t
.extend({},v
),P
=i(D
.my
,c
.outerWidth(),c
.outerHeight());"right"===e
.my
[0]?I
.left
-=u
:"center"===e
.my
[0]&&(I
.left
-=u
/2),"bottom"===e
.my
[1]?I
.top
-=d
:"center"===e
.my
[1]&&(I
.top
-=d
/2),I
.left
+=P
[0],I
.top
+=P
[1],t
.support
.offsetFractions||
(I
.left
=h(I
.left
),I
.top
=h(I
.top
)),n
={marginLeft
:f
,marginTop
:_
},t
.each(["left","top"],function(i
,s
){t
.ui
.position
[k
[i]]&&t
.ui
.position
[k
[i]][s](I
,{targetWidth
:p
,targetHeight
:g
,elemWidth
:u
,elemHeight
:d
,collisionPosition
:n
,collisionWidth
:x
,collisionHeight
:C
,offset
:[o
[0]+P
[0],o
[1]+P
[1]],my
:e
.my
,at
:e
.at
,within
:y
,elem
:c
})}),e
.using
&&(l
=function(t
){var i
=m
.left
-I
.left
,s
=i
+p
-u
,n
=m
.top
-I
.top
,o
=n
+g
-d
,h
={target
:{element
:b
,left
:m
.left
,top
:m
.top
,width
:p
,height
:g
},element
:{element
:c
,left
:I
.left
,top
:I
.top
,width
:u
,height
:d
},horizontal
:0>s?
"left":i
>0?
"right":"center",vertical
:0>o?
"top":n
>0?
"bottom":"middle"};u
>p
&&p
>r(i
+s
)&&(h
.horizontal
="center"),d
>g
&&g
>r(n
+o
)&&(h
.vertical
="middle"),h
.important
=a(r(i
),r(s
))>a(r(n
),r(o
))?
"horizontal":"vertical",e
.using
.call(this,t
,h
)}),c
.offset(t
.extend(I
,{using
:l
}))})},t
.ui
.position
={fit
:{left
:function(t
,e
){var i
,s
=e
.within
,n
=s
.isWindow?s
.scrollLeft
:s
.offset
.left
,o
=s
.width
,r
=t
.left
-e
.collisionPosition
.marginLeft
,h
=n
-r
,l
=r
+e
.collisionWidth
-o
-n
;e
.collisionWidth
>o?h
>0&&0>=l?
(i
=t
.left
+h
+e
.collisionWidth
-o
-n
,t
.left
+=h
-i
):t
.left
=l
>0&&0>=h?n
:h
>l?n
+o
-e
.collisionWidth
:n
:h
>0?t
.left
+=h
:l
>0?t
.left
-=l
:t
.left
=a(t
.left
-r
,t
.left
)},top
:function(t
,e
){var i
,s
=e
.within
,n
=s
.isWindow?s
.scrollTop
:s
.offset
.top
,o
=e
.within
.height
,r
=t
.top
-e
.collisionPosition
.marginTop
,h
=n
-r
,l
=r
+e
.collisionHeight
-o
-n
;e
.collisionHeight
>o?h
>0&&0>=l?
(i
=t
.top
+h
+e
.collisionHeight
-o
-n
,t
.top
+=h
-i
):t
.top
=l
>0&&0>=h?n
:h
>l?n
+o
-e
.collisionHeight
:n
:h
>0?t
.top
+=h
:l
>0?t
.top
-=l
:t
.top
=a(t
.top
-r
,t
.top
)}},flip
:{left
:function(t
,e
){var i
,s
,n
=e
.within
,o
=n
.offset
.left
+n
.scrollLeft
,a
=n
.width
,h
=n
.isWindow?n
.scrollLeft
:n
.offset
.left
,l
=t
.left
-e
.collisionPosition
.marginLeft
,c
=l
-h
,u
=l
+e
.collisionWidth
-a
-h
,d
="left"===e
.my
[0]?
-e
.elemWidth
:"right"===e
.my
[0]?e
.elemWidth
:0,p
="left"===e
.at
[0]?e
.targetWidth
:"right"===e
.at
[0]?
-e
.targetWidth
:0,f
=-2*e
.offset
[0];0>c?
(i
=t
.left
+d
+p
+f
+e
.collisionWidth
-a
-o
,(0>i||
r(c
)>i
)&&(t
.left
+=d
+p
+f
)):u
>0&&(s
=t
.left
-e
.collisionPosition
.marginLeft
+d
+p
+f
-h
,(s
>0||u
>r(s
))&&(t
.left
+=d
+p
+f
))},top
:function(t
,e
){var i
,s
,n
=e
.within
,o
=n
.offset
.top
+n
.scrollTop
,a
=n
.height
,h
=n
.isWindow?n
.scrollTop
:n
.offset
.top
,l
=t
.top
-e
.collisionPosition
.marginTop
,c
=l
-h
,u
=l
+e
.collisionHeight
-a
-h
,d
="top"===e
.my
[1],p
=d?
-e
.elemHeight
:"bottom"===e
.my
[1]?e
.elemHeight
:0,f
="top"===e
.at
[1]?e
.targetHeight
:"bottom"===e
.at
[1]?
-e
.targetHeight
:0,g
=-2*e
.offset
[1];0>c?
(s
=t
.top
+p
+f
+g
+e
.collisionHeight
-a
-o
,t
.top
+p
+f
+g
>c
&&(0>s||
r(c
)>s
)&&(t
.top
+=p
+f
+g
)):u
>0&&(i
=t
.top
-e
.collisionPosition
.marginTop
+p
+f
+g
-h
,t
.top
+p
+f
+g
>u
&&(i
>0||u
>r(i
))&&(t
.top
+=p
+f
+g
))}},flipfit
:{left
:function(){t
.ui
.position
.flip
.left
.apply(this,arguments
),t
.ui
.position
.fit
.left
.apply(this,arguments
)},top
:function(){t
.ui
.position
.flip
.top
.apply(this,arguments
),t
.ui
.position
.fit
.top
.apply(this,arguments
)}}},function(){var e
,i
,s
,n
,o
,a
=document
.getElementsByTagName("body")[0],r
=document
.createElement("div");e
=document
.createElement(a?
"div":"body"),s
={visibility
:"hidden",width
:0,height
:0,border
:0,margin
:0,background
:"none"},a
&&t
.extend(s
,{position
:"absolute",left
:"-1000px",top
:"-1000px"});for(o
in s
)e
.style
[o]=s
[o];e
.appendChild(r
),i
=a||document
.documentElement
,i
.insertBefore(e
,i
.firstChild
),r
.style
.cssText
="position: absolute; left: 10.7432222px;",n
=t(r
).offset().left
,t
.support
.offsetFractions
=n
>10&&11>n
,e
.innerHTML
="",i
.removeChild(e
)}()})(jQuery
);