/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);;(function(b){var a=[];b.preLoadImages=function(){for(var d=arguments.length,c=d;c--;){var b=document.createElement("img");b.src=arguments[c];a.push(b)}}})(jQuery);jQuery.cookie=function(d,c,a){if(typeof c!="undefined"){a=a||{};if(c===null){c="";a.expires=-1}var h="";if(a.expires&&(typeof a.expires=="number"||a.expires.toUTCString)){var b;if(typeof a.expires=="number"){b=new Date;b.setTime(b.getTime()+a.expires*24*60*60*1e3)}else b=a.expires;h="; expires="+b.toUTCString()}var l=a.path?"; path="+a.path:"",j=a.domain?"; domain="+a.domain:"",k=a.secure?"; secure":"";document.cookie=[d,"=",encodeURIComponent(c),h,l,j,k].join("")}else{var f=null;if(document.cookie&&document.cookie!="")for(var g=document.cookie.split(";"),e=0;e<g.length;e++){var i=jQuery.trim(g[e]);if(i.substring(0,d.length+1)==d+"="){f=decodeURIComponent(i.substring(d.length+1));break}}return f}};(function(F,C){var D=function(H){var G,I=[];for(G in H){if(/string|number/.test(typeof H[G])&&H[G]!==""){I.push(G+'="'+H[G]+'"')}}return I[A]("")},E=function(I){var G,K,J=[],H;if(typeof I=="object"){for(G in I){if(typeof I[G]=="object"){H=[];for(K in I[G]){H.push([K,"=",encodeURIComponent(I[G][K])][A](""))}I[G]=H[A]("&amp;")}if(I[G]){J.push(['<param name="',G,'" value="',I[G],'" />'][A](""))}}I=J[A]("")}return I},B=false,A="join";F[C]=(function(){try{var G="0,0,0",H=navigator.plugins["Shockwave Flash"]||ActiveXObject;G=H.description||(function(){try{return(new H("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(J){}}())}catch(I){}G=G.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+[d|r]|,)(\d+)/);return{available:G[1]>0,activeX:H&&!H.name,version:{major:G[1]*1,minor:G[2]*1,release:G[3]*1},hasVersion:function(K){var N=this.version,L="major",M="minor",J="release";K=(/string|number/.test(typeof K))?K.toString().split("."):K||[0,0,0];K=[K[L]||K[0]||N[L],K[M]||K[1]||N[M],K[J]||K[2]||N[J]];return(K[0]<N[L])||(K[0]==N[L]&&K[1]<N[M])||(K[0]==N[L]&&K[1]==N[M]&&K[2]<=N[J])},expressInstall:"expressInstall.swf",create:function(J){if(!F[C].available||B||!typeof J=="object"||!J.swf){return false}if(J.hasVersion&&!F[C].hasVersion(J.hasVersion)){J={swf:J.expressInstall||F[C].expressInstall,attrs:{id:J.id||"SWFObjectExprInst",name:J.name,height:Math.max(J.height||137),width:Math.max(J.width||214)},params:{flashvars:{MMredirectURL:location.href,MMplayerType:(F[C].activeX)?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}};B=true}else{J=F.extend(true,{attrs:{id:J.id,name:J.name,height:J.height||180,width:J.width||320},params:{wmode:J.wmode||"opaque",flashvars:J.flashvars}},J)}if(F[C].activeX){J.attrs.classid=J.attrs.classid||"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";J.params.movie=J.params.movie||J.swf}else{J.attrs.type=J.attrs.classid||"application/x-shockwave-flash";J.attrs.data=J.attrs.data||J.swf}return["<object ",D(J.attrs),">",E(J.params),"</object>"][A]("")}}}());F.fn[C]=function(G){if(typeof G=="object"){this.each(function(){var I=document.createElement(C);var H=F[C].create(G);if(H){I.innerHTML=H;if(I.childNodes[0]){this.appendChild(I.childNodes[0])}}})}else{if(typeof G=="function"){this.find("object").andSelf().filter("object").each(function(){var I=this,H="jsInteractionTimeoutMs";I[H]=I[H]||0;if(I[H]<660){if(I.clientWidth||I.clientHeight){G.call(this)}else{setTimeout(function(){F(I)[C](G)},I[H]+66)}}})}}return this}}(jQuery,"flash"));;/**
* jQuery Validation Plugin 1.9.0
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
*
* Copyright (c) 2006 - 2011 JГ¶rn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html
*/
(function (c)
{
    c.extend(c.fn, { validate: function (a)
    {
        if (this.length)
        {
            var b = c.data(this[0], "validator"); if (b) return b; this.attr("novalidate", "novalidate"); b = new c.validator(a, this[0]); c.data(this[0], "validator", b); if (b.settings.onsubmit)
            {
                a = this.find("input, button"); a.filter(".cancel").click(function () { b.cancelSubmit = true }); b.settings.submitHandler && a.filter(":submit").click(function () { b.submitButton = this }); this.submit(function (d)
                {
                    function e()
                    {
                        if (b.settings.submitHandler)
                        {
                            if (b.submitButton) var f = c("<input type='hidden'/>").attr("name",
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm); b.settings.submitHandler.call(b, b.currentForm); b.submitButton && f.remove(); return false
                        } return true
                    } b.settings.debug && d.preventDefault(); if (b.cancelSubmit) { b.cancelSubmit = false; return e() } if (b.form()) { if (b.pendingRequest) { b.formSubmitted = true; return false } return e() } else { b.focusInvalid(); return false } 
                })
            } return b
        } else a && a.debug && window.console && console.warn("nothing selected, can't validate, returning nothing")
    }, valid: function ()
    {
        if (c(this[0]).is("form")) return this.validate().form();
        else { var a = true, b = c(this[0].form).validate(); this.each(function () { a &= b.element(this) }); return a } 
    }, removeAttrs: function (a) { var b = {}, d = this; c.each(a.split(/\s/), function (e, f) { b[f] = d.attr(f); d.removeAttr(f) }); return b }, rules: function (a, b)
    {
        var d = this[0]; if (a)
        {
            var e = c.data(d.form, "validator").settings, f = e.rules, g = c.validator.staticRules(d); switch (a)
            {
                case "add": c.extend(g, c.validator.normalizeRule(b)); f[d.name] = g; if (b.messages) e.messages[d.name] = c.extend(e.messages[d.name], b.messages); break; case "remove": if (!b)
                    {
                        delete f[d.name];
                        return g
                    } var h = {}; c.each(b.split(/\s/), function (j, i) { h[i] = g[i]; delete g[i] }); return h
            } 
        } d = c.validator.normalizeRules(c.extend({}, c.validator.metadataRules(d), c.validator.classRules(d), c.validator.attributeRules(d), c.validator.staticRules(d)), d); if (d.required) { e = d.required; delete d.required; d = c.extend({ required: e }, d) } return d
    } 
    }); c.extend(c.expr[":"], { blank: function (a) { return !c.trim("" + a.value) }, filled: function (a) { return !!c.trim("" + a.value) }, unchecked: function (a) { return !a.checked } }); c.validator = function (a,
b) { this.settings = c.extend(true, {}, c.validator.defaults, a); this.currentForm = b; this.init() }; c.validator.format = function (a, b) { if (arguments.length == 1) return function () { var d = c.makeArray(arguments); d.unshift(a); return c.validator.format.apply(this, d) }; if (arguments.length > 2 && b.constructor != Array) b = c.makeArray(arguments).slice(1); if (b.constructor != Array) b = [b]; c.each(b, function (d, e) { a = a.replace(RegExp("\\{" + d + "\\}", "g"), e) }); return a }; c.extend(c.validator, { defaults: { messages: {}, groups: {}, rules: {}, errorClass: "error",
    validClass: "valid", errorElement: "label", focusInvalid: true, errorContainer: c([]), errorLabelContainer: c([]), onsubmit: true, ignore: ":hidden", ignoreTitle: false, onfocusin: function (a) { this.lastActive = a; if (this.settings.focusCleanup && !this.blockFocusCleanup) { this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass, this.settings.validClass); this.addWrapper(this.errorsFor(a)).hide() } }, onfocusout: function (a) { if (!this.checkable(a) && (a.name in this.submitted || !this.optional(a))) this.element(a) },
    onkeyup: function (a) { if (a.name in this.submitted || a == this.lastElement) this.element(a) }, onclick: function (a) { if (a.name in this.submitted) this.element(a); else a.parentNode.name in this.submitted && this.element(a.parentNode) }, highlight: function (a, b, d) { a.type === "radio" ? this.findByName(a.name).addClass(b).removeClass(d) : c(a).addClass(b).removeClass(d) }, unhighlight: function (a, b, d) { a.type === "radio" ? this.findByName(a.name).removeClass(b).addClass(d) : c(a).removeClass(b).addClass(d) } 
}, setDefaults: function (a)
{
    c.extend(c.validator.defaults,
a)
}, messages: { required: "This field is required.", remote: "Please fix this field.", email: "Please enter a valid email address.", url: "Please enter a valid URL.", date: "Please enter a valid date.", dateISO: "Please enter a valid date (ISO).", number: "Please enter a valid number.", digits: "Please enter only digits.", creditcard: "Please enter a valid credit card number.", equalTo: "Please enter the same value again.", accept: "Please enter a value with a valid extension.", maxlength: c.validator.format("Please enter no more than {0} characters."),
    minlength: c.validator.format("Please enter at least {0} characters."), rangelength: c.validator.format("Please enter a value between {0} and {1} characters long."), range: c.validator.format("Please enter a value between {0} and {1}."), max: c.validator.format("Please enter a value less than or equal to {0}."), min: c.validator.format("Please enter a value greater than or equal to {0}.")
}, autoCreateRanges: false, prototype: { init: function ()
{
    function a(e)
    {
        var f = c.data(this[0].form, "validator"), g = "on" + e.type.replace(/^validate/,
""); f.settings[g] && f.settings[g].call(f, this[0], e)
    } this.labelContainer = c(this.settings.errorLabelContainer); this.errorContext = this.labelContainer.length && this.labelContainer || c(this.currentForm); this.containers = c(this.settings.errorContainer).add(this.settings.errorLabelContainer); this.submitted = {}; this.valueCache = {}; this.pendingRequest = 0; this.pending = {}; this.invalid = {}; this.reset(); var b = this.groups = {}; c.each(this.settings.groups, function (e, f) { c.each(f.split(/\s/), function (g, h) { b[h] = e }) }); var d =
this.settings.rules; c.each(d, function (e, f) { d[e] = c.validator.normalizeRule(f) }); c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ", "focusin focusout keyup", a).validateDelegate("[type='radio'], [type='checkbox'], select, option", "click",
a); this.settings.invalidHandler && c(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler)
}, form: function () { this.checkForm(); c.extend(this.submitted, this.errorMap); this.invalid = c.extend({}, this.errorMap); this.valid() || c(this.currentForm).triggerHandler("invalid-form", [this]); this.showErrors(); return this.valid() }, checkForm: function () { this.prepareForm(); for (var a = 0, b = this.currentElements = this.elements(); b[a]; a++) this.check(b[a]); return this.valid() }, element: function (a)
{
    this.lastElement =
a = this.validationTargetFor(this.clean(a)); this.prepareElement(a); this.currentElements = c(a); var b = this.check(a); if (b) delete this.invalid[a.name]; else this.invalid[a.name] = true; if (!this.numberOfInvalids()) this.toHide = this.toHide.add(this.containers); this.showErrors(); return b
}, showErrors: function (a)
{
    if (a) { c.extend(this.errorMap, a); this.errorList = []; for (var b in a) this.errorList.push({ message: a[b], element: this.findByName(b)[0] }); this.successList = c.grep(this.successList, function (d) { return !(d.name in a) }) } this.settings.showErrors ?
this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
}, resetForm: function () { c.fn.resetForm && c(this.currentForm).resetForm(); this.submitted = {}; this.lastElement = null; this.prepareForm(); this.hideErrors(); this.elements().removeClass(this.settings.errorClass) }, numberOfInvalids: function () { return this.objectLength(this.invalid) }, objectLength: function (a) { var b = 0, d; for (d in a) b++; return b }, hideErrors: function () { this.addWrapper(this.toHide).hide() }, valid: function ()
{
    return this.size() ==
0
}, size: function () { return this.errorList.length }, focusInvalid: function () { if (this.settings.focusInvalid) try { c(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin") } catch (a) { } }, findLastActive: function () { var a = this.lastActive; return a && c.grep(this.errorList, function (b) { return b.element.name == a.name }).length == 1 && a }, elements: function ()
{
    var a = this, b = {}; return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function ()
    {
        !this.name &&
a.settings.debug && window.console && console.error("%o has no name assigned", this); if (this.name in b || !a.objectLength(c(this).rules())) return false; return b[this.name] = true
    })
}, clean: function (a) { return c(a)[0] }, errors: function () { return c(this.settings.errorElement + "." + this.settings.errorClass, this.errorContext) }, reset: function () { this.successList = []; this.errorList = []; this.errorMap = {}; this.toShow = c([]); this.toHide = c([]); this.currentElements = c([]) }, prepareForm: function () { this.reset(); this.toHide = this.errors().add(this.containers) },
    prepareElement: function (a) { this.reset(); this.toHide = this.errorsFor(a) }, check: function (a)
    {
        a = this.validationTargetFor(this.clean(a)); var b = c(a).rules(), d = false, e; for (e in b)
        {
            var f = { method: e, parameters: b[e] }; try { var g = c.validator.methods[e].call(this, a.value.replace(/\r/g, ""), a, f.parameters); if (g == "dependency-mismatch") d = true; else { d = false; if (g == "pending") { this.toHide = this.toHide.not(this.errorsFor(a)); return } if (!g) { this.formatAndAdd(a, f); return false } } } catch (h)
            {
                this.settings.debug && window.console && console.log("exception occured when checking element " +
a.id + ", check the '" + f.method + "' method", h); throw h;
            } 
        } if (!d) { this.objectLength(b) && this.successList.push(a); return true } 
    }, customMetaMessage: function (a, b) { if (c.metadata) { var d = this.settings.meta ? c(a).metadata()[this.settings.meta] : c(a).metadata(); return d && d.messages && d.messages[b] } }, customMessage: function (a, b) { var d = this.settings.messages[a]; return d && (d.constructor == String ? d : d[b]) }, findDefined: function () { for (var a = 0; a < arguments.length; a++) if (arguments[a] !== undefined) return arguments[a] }, defaultMessage: function (a,
b) { return this.findDefined(this.customMessage(a.name, b), this.customMetaMessage(a, b), !this.settings.ignoreTitle && a.title || undefined, c.validator.messages[b], "<strong>Warning: No message defined for " + a.name + "</strong>") }, formatAndAdd: function (a, b)
{
    var d = this.defaultMessage(a, b.method), e = /\$?\{(\d+)\}/g; if (typeof d == "function") d = d.call(this, b.parameters, a); else if (e.test(d)) d = jQuery.format(d.replace(e, "{$1}"), b.parameters); this.errorList.push({ message: d, element: a }); this.errorMap[a.name] = d; this.submitted[a.name] =
d
}, addWrapper: function (a) { if (this.settings.wrapper) a = a.add(a.parent(this.settings.wrapper)); return a }, defaultShowErrors: function ()
{
    for (var a = 0; this.errorList[a]; a++) { var b = this.errorList[a]; this.settings.highlight && this.settings.highlight.call(this, b.element, this.settings.errorClass, this.settings.validClass); this.showLabel(b.element, b.message) } if (this.errorList.length) this.toShow = this.toShow.add(this.containers); if (this.settings.success) for (a = 0; this.successList[a]; a++) this.showLabel(this.successList[a]);
    if (this.settings.unhighlight) { a = 0; for (b = this.validElements(); b[a]; a++) this.settings.unhighlight.call(this, b[a], this.settings.errorClass, this.settings.validClass) } this.toHide = this.toHide.not(this.toShow); this.hideErrors(); this.addWrapper(this.toShow).show()
}, validElements: function () { return this.currentElements.not(this.invalidElements()) }, invalidElements: function () { return c(this.errorList).map(function () { return this.element }) }, showLabel: function (a, b)
{
    var d = this.errorsFor(a); if (d.length)
    {
        d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
        d.attr("generated") && d.html(b)
    } else { d = c("<" + this.settings.errorElement + "/>").attr({ "for": this.idOrName(a), generated: true }).addClass(this.settings.errorClass).html(b || ""); if (this.settings.wrapper) d = d.hide().show().wrap("<" + this.settings.wrapper + "/>").parent(); this.labelContainer.append(d).length || (this.settings.errorPlacement ? this.settings.errorPlacement(d, c(a)) : d.insertAfter(a)) } if (!b && this.settings.success) { d.text(""); typeof this.settings.success == "string" ? d.addClass(this.settings.success) : this.settings.success(d) } this.toShow =
this.toShow.add(d)
}, errorsFor: function (a) { var b = this.idOrName(a); return this.errors().filter(function () { return c(this).attr("for") == b }) }, idOrName: function (a) { return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name) }, validationTargetFor: function (a) { if (this.checkable(a)) a = this.findByName(a.name).not(this.settings.ignore)[0]; return a }, checkable: function (a) { return /radio|checkbox/i.test(a.type) }, findByName: function (a)
{
    var b = this.currentForm; return c(document.getElementsByName(a)).map(function (d,
e) { return e.form == b && e.name == a && e || null })
}, getLength: function (a, b) { switch (b.nodeName.toLowerCase()) { case "select": return c("option:selected", b).length; case "input": if (this.checkable(b)) return this.findByName(b.name).filter(":checked").length } return a.length }, depend: function (a, b) { return this.dependTypes[typeof a] ? this.dependTypes[typeof a](a, b) : true }, dependTypes: { "boolean": function (a) { return a }, string: function (a, b) { return !!c(a, b.form).length }, "function": function (a, b) { return a(b) } }, optional: function (a)
{
    return !c.validator.methods.required.call(this,
c.trim(a.value), a) && "dependency-mismatch"
}, startRequest: function (a) { if (!this.pending[a.name]) { this.pendingRequest++; this.pending[a.name] = true } }, stopRequest: function (a, b)
{
    this.pendingRequest--; if (this.pendingRequest < 0) this.pendingRequest = 0; delete this.pending[a.name]; if (b && this.pendingRequest == 0 && this.formSubmitted && this.form()) { c(this.currentForm).submit(); this.formSubmitted = false } else if (!b && this.pendingRequest == 0 && this.formSubmitted)
    {
        c(this.currentForm).triggerHandler("invalid-form", [this]); this.formSubmitted =
false
    } 
}, previousValue: function (a) { return c.data(a, "previousValue") || c.data(a, "previousValue", { old: null, valid: true, message: this.defaultMessage(a, "remote") }) } 
}, classRuleSettings: { required: { required: true }, email: { email: true }, url: { url: true }, date: { date: true }, dateISO: { dateISO: true }, dateDE: { dateDE: true }, number: { number: true }, numberDE: { numberDE: true }, digits: { digits: true }, creditcard: { creditcard: true} }, addClassRules: function (a, b)
{
    a.constructor == String ? this.classRuleSettings[a] = b : c.extend(this.classRuleSettings,
a)
}, classRules: function (a) { var b = {}; (a = c(a).attr("class")) && c.each(a.split(" "), function () { this in c.validator.classRuleSettings && c.extend(b, c.validator.classRuleSettings[this]) }); return b }, attributeRules: function (a) { var b = {}; a = c(a); for (var d in c.validator.methods) { var e; if (e = d === "required" && typeof c.fn.prop === "function" ? a.prop(d) : a.attr(d)) b[d] = e; else if (a[0].getAttribute("type") === d) b[d] = true } b.maxlength && /-1|2147483647|524288/.test(b.maxlength) && delete b.maxlength; return b }, metadataRules: function (a)
{
    if (!c.metadata) return {};
    var b = c.data(a.form, "validator").settings.meta; return b ? c(a).metadata()[b] : c(a).metadata()
}, staticRules: function (a) { var b = {}, d = c.data(a.form, "validator"); if (d.settings.rules) b = c.validator.normalizeRule(d.settings.rules[a.name]) || {}; return b }, normalizeRules: function (a, b)
{
    c.each(a, function (d, e)
    {
        if (e === false) delete a[d]; else if (e.param || e.depends)
        {
            var f = true; switch (typeof e.depends) { case "string": f = !!c(e.depends, b.form).length; break; case "function": f = e.depends.call(b, b) } if (f) a[d] = e.param !== undefined ?
e.param : true; else delete a[d]
        } 
    }); c.each(a, function (d, e) { a[d] = c.isFunction(e) ? e(b) : e }); c.each(["minlength", "maxlength", "min", "max"], function () { if (a[this]) a[this] = Number(a[this]) }); c.each(["rangelength", "range"], function () { if (a[this]) a[this] = [Number(a[this][0]), Number(a[this][1])] }); if (c.validator.autoCreateRanges) { if (a.min && a.max) { a.range = [a.min, a.max]; delete a.min; delete a.max } if (a.minlength && a.maxlength) { a.rangelength = [a.minlength, a.maxlength]; delete a.minlength; delete a.maxlength } } a.messages && delete a.messages;
    return a
}, normalizeRule: function (a) { if (typeof a == "string") { var b = {}; c.each(a.split(/\s/), function () { b[this] = true }); a = b } return a }, addMethod: function (a, b, d) { c.validator.methods[a] = b; c.validator.messages[a] = d != undefined ? d : c.validator.messages[a]; b.length < 3 && c.validator.addClassRules(a, c.validator.normalizeRule(a)) }, methods: { required: function (a, b, d)
{
    if (!this.depend(d, b)) return "dependency-mismatch"; switch (b.nodeName.toLowerCase())
    {
        case "select": return (a = c(b).val()) && a.length > 0; case "input": if (this.checkable(b)) return this.getLength(a,
b) > 0; default: return c.trim(a).length > 0
    } 
}, remote: function (a, b, d)
{
    if (this.optional(b)) return "dependency-mismatch"; var e = this.previousValue(b); this.settings.messages[b.name] || (this.settings.messages[b.name] = {}); e.originalMessage = this.settings.messages[b.name].remote; this.settings.messages[b.name].remote = e.message; d = typeof d == "string" && { url: d} || d; if (this.pending[b.name]) return "pending"; if (e.old === a) return e.valid; e.old = a; var f = this; this.startRequest(b); var g = {}; g[b.name] = a; c.ajax(c.extend(true, { url: d,
        mode: "abort", port: "validate" + b.name, dataType: "json", data: g, success: function (h) { f.settings.messages[b.name].remote = e.originalMessage; var j = h === true; if (j) { var i = f.formSubmitted; f.prepareElement(b); f.formSubmitted = i; f.successList.push(b); f.showErrors() } else { i = {}; h = h || f.defaultMessage(b, "remote"); i[b.name] = e.message = c.isFunction(h) ? h(a) : h; f.showErrors(i) } e.valid = j; f.stopRequest(b, j) } 
    }, d)); return "pending"
}, minlength: function (a, b, d) { return this.optional(b) || this.getLength(c.trim(a), b) >= d }, maxlength: function (a,
b, d) { return this.optional(b) || this.getLength(c.trim(a), b) <= d }, rangelength: function (a, b, d) { a = this.getLength(c.trim(a), b); return this.optional(b) || a >= d[0] && a <= d[1] }, min: function (a, b, d) { return this.optional(b) || a >= d }, max: function (a, b, d) { return this.optional(b) || a <= d }, range: function (a, b, d) { return this.optional(b) || a >= d[0] && a <= d[1] }, email: function (a, b) { return this.optional(b) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a) },
    url: function (a, b) { return this.optional(b) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a) },
    date: function (a, b) { return this.optional(b) || !/Invalid|NaN/.test(new Date(a)) }, dateISO: function (a, b) { return this.optional(b) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a) }, number: function (a, b) { return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a) }, digits: function (a, b) { return this.optional(b) || /^\d+$/.test(a) }, creditcard: function (a, b)
    {
        if (this.optional(b)) return "dependency-mismatch"; if (/[^0-9 -]+/.test(a)) return false; var d = 0, e = 0, f = false; a = a.replace(/\D/g, ""); for (var g = a.length - 1; g >=
0; g--) { e = a.charAt(g); e = parseInt(e, 10); if (f) if ((e *= 2) > 9) e -= 9; d += e; f = !f } return d % 10 == 0
    }, accept: function (a, b, d) { d = typeof d == "string" ? d.replace(/,/g, "|") : "png|jpe?g|gif"; return this.optional(b) || a.match(RegExp(".(" + d + ")$", "i")) }, equalTo: function (a, b, d) { d = c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo", function () { c(b).valid() }); return a == d.val() } 
}
}); c.format = c.validator.format
})(jQuery);
(function (c) { var a = {}; if (c.ajaxPrefilter) c.ajaxPrefilter(function (d, e, f) { e = d.port; if (d.mode == "abort") { a[e] && a[e].abort(); a[e] = f } }); else { var b = c.ajax; c.ajax = function (d) { var e = ("port" in d ? d : c.ajaxSettings).port; if (("mode" in d ? d : c.ajaxSettings).mode == "abort") { a[e] && a[e].abort(); return a[e] = b.apply(this, arguments) } return b.apply(this, arguments) } } })(jQuery);
(function (c)
{
    !jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener && c.each({ focus: "focusin", blur: "focusout" }, function (a, b) { function d(e) { e = c.event.fix(e); e.type = b; return c.event.handle.call(this, e) } c.event.special[b] = { setup: function () { this.addEventListener(a, d, true) }, teardown: function () { this.removeEventListener(a, d, true) }, handler: function (e) { arguments[0] = c.event.fix(e); arguments[0].type = b; return c.event.handle.apply(this, arguments) } } }); c.extend(c.fn, { validateDelegate: function (a,
b, d) { return this.bind(b, function (e) { var f = c(e.target); if (f.is(a)) return d.apply(f, arguments) }) } 
    })
})(jQuery);
;/**
 * jQuery Validation Plugin 1.8.0
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2011 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(){function a(b){return b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,"")}jQuery.validator.addMethod("maxWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length<d},jQuery.validator.format("Please enter {0} words or less."));jQuery.validator.addMethod("minWords",function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d},jQuery.validator.format("Please enter at least {0} words."));jQuery.validator.addMethod("rangeWords",
function(b,c,d){return this.optional(c)||a(b).match(/\b\w+\b/g).length>=d[0]&&b.match(/bw+b/g).length<d[1]},jQuery.validator.format("Please enter between {0} and {1} words."))})();jQuery.validator.addMethod("letterswithbasicpunc",function(a,b){return this.optional(b)||/^[a-z-.,()'\"\s]+$/i.test(a)},"Letters or punctuation only please");jQuery.validator.addMethod("alphanumeric",function(a,b){return this.optional(b)||/^\w+$/i.test(a)},"Letters, numbers, spaces or underscores only please");
jQuery.validator.addMethod("lettersonly",function(a,b){return this.optional(b)||/^[a-z]+$/i.test(a)},"Letters only please");jQuery.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please");jQuery.validator.addMethod("ziprange",function(a,b){return this.optional(b)||/^90[2-5]\d\{2}-\d{4}$/.test(a)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
jQuery.validator.addMethod("integer",function(a,b){return this.optional(b)||/^-?\d+$/.test(a)},"A positive or negative non-decimal number please");
jQuery.validator.addMethod("vinUS",function(a){if(a.length!=17)return false;var b,c,d,f,e,g=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],h=0;for(b=0;b<17;b++){f=j[b];d=a.slice(b,b+1);if(b==8)e=d;if(isNaN(d))for(c=0;c<g.length;c++){if(d.toUpperCase()===g[c]){d=i[c];d*=f;if(isNaN(e)&&c==8)e=g[c];break}}else d*=f;h+=d}a=h%11;if(a==10)a="X";if(a==e)return true;return false},
"The specified vehicle identification number (VIN) is invalid.");jQuery.validator.addMethod("dateITA",function(a,b){var c=false;if(/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(a)){var d=a.split("/");c=parseInt(d[0],10);var f=parseInt(d[1],10);d=parseInt(d[2],10);var e=new Date(d,f-1,c);c=e.getFullYear()==d&&e.getMonth()==f-1&&e.getDate()==c?true:false}else c=false;return this.optional(b)||c},"Please enter a correct date");
jQuery.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(a)},"Vul hier een geldige datum in.");jQuery.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(a)},"Please enter a valid time, between 00:00 and 23:59");
jQuery.validator.addMethod("phoneUS",function(a,b){a=a.replace(/\s+/g,"");return this.optional(b)||a.length>9&&a.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number");jQuery.validator.addMethod("phoneUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/)},"Please specify a valid phone number");
jQuery.validator.addMethod("mobileUK",function(a,b){return this.optional(b)||a.length>9&&a.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/)},"Please specify a valid mobile number");jQuery.validator.addMethod("strippedminlength",function(a,b,c){return jQuery(a).text().length>=c},jQuery.validator.format("Please enter at least {0} characters"));
jQuery.validator.addMethod("email2",function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},jQuery.validator.messages.email);
jQuery.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
jQuery.validator.messages.url);
jQuery.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9-]+/.test(a))return false;a=a.replace(/\D/g,"");b=0;if(c.mastercard)b|=1;if(c.visa)b|=2;if(c.amex)b|=4;if(c.dinersclub)b|=8;if(c.enroute)b|=16;if(c.discover)b|=32;if(c.jcb)b|=64;if(c.unknown)b|=128;if(c.all)b=255;if(b&1&&/^(51|52|53|54|55)/.test(a))return a.length==16;if(b&2&&/^(4)/.test(a))return a.length==16;if(b&4&&/^(34|37)/.test(a))return a.length==15;if(b&8&&/^(300|301|302|303|304|305|36|38)/.test(a))return a.length==14;if(b&
16&&/^(2014|2149)/.test(a))return a.length==15;if(b&32&&/^(6011)/.test(a))return a.length==16;if(b&64&&/^(3)/.test(a))return a.length==16;if(b&64&&/^(2131|1800)/.test(a))return a.length==15;if(b&128)return true;return false},"Please enter a valid credit card number.");
jQuery.validator.addMethod("ipv4",function(a,b){return this.optional(b)||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(a)},"Please enter a valid IP v4 address.");
jQuery.validator.addMethod("ipv6",function(a,b){return this.optional(b)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(a)},"Please enter a valid IP v6 address.");
;/*!
 * jQuery UI 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.12",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;/*!
 * jQuery UI Widget 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
;/*!
 * jQuery UI Mouse 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,e=a.which==1,f=typeof this.options.cancel=="string"?b(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return c._mouseMove(d)};this._mouseUpDelegate=function(d){return c._mouseUp(d)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=
true}},_mouseMove:function(a){if(b.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
;/*
 * jQuery UI Position 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Position
 */
(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY,
left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+=
k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-=
m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
;/*
 * jQuery UI Draggable 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Draggables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&
this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),
height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?
document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),
10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),
10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&
d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=
this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?
e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,
offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.12"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g.refreshPositions();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},
b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=
d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};
a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&
this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",
{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+
"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",
a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+
c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<
c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+
c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),
f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=
c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=
c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),
{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=
parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
;/*
 * jQuery UI Droppable 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Droppables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.mouse.js
 *	jquery.ui.draggable.js
 */
(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this);
a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&
this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.12"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
"none";if(c[f].visible){e=="mousedown"&&c[f]._activate.call(c[f],b);c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight}}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
;/*
 * jQuery UI Resizable 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Resizables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=
null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+
this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=
[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=
this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,
a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,
c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,
originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.12"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=
b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width",
"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};
if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-
g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,
height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=
e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,
d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?
d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=
a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&
/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");
b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/
(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
;/*
 * jQuery UI Selectable 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Selectables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting",
c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d=
this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.12"})})(jQuery);
;/*
 * jQuery UI Sortable 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Sortables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=
b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;
d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-
this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=
document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);
return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<
b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-
b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,
a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],
e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();
c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):
this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,
dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},
toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||
this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();
var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},
_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();
if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),
this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),
this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&
this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=
this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=
d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||
0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",
a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-
f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=
this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(a[0].style.width==
""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=
this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a=
{top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),
10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?
document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),
10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=
this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&
this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();
var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-
this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],
this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]=
"";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",
f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,
this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",
a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},
_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.12"})})(jQuery);
;/*
 * jQuery UI Accordion 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=
this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.12",
animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",
paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
;/*
 * jQuery UI Autocomplete 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Autocomplete
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.position.js
 */
(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=
false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=
a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};
this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&
a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&
b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source=
this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();
this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label||
b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var g=this;
d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},
deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);
e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,
g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})})(jQuery);
;/*
 * jQuery UI Button 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Button
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,f=a([]);if(c)f=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return f};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
i);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||a(this).removeClass(f)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");
b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var e=b.element[0];h(e).not(e).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");
g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){if(c.disabled)return false;if(e.keyCode==a.ui.keyCode.SPACE||e.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",
c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var b=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=b.find(c);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(c);if(!this.buttonElement.length)this.buttonElement=b.find(c)}this.element.addClass("ui-helper-hidden-accessible");
(b=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){if(this.options.text)e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){e.push(f?"ui-button-icons-only":
"ui-button-icon-only");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
;/*
 * jQuery UI Dialog 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Dialog
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *  jquery.ui.button.js
 *	jquery.ui.draggable.js
 *	jquery.ui.mouse.js
 *	jquery.ui.position.js
 *	jquery.ui.resizable.js
 */
(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,
position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||"&#160;",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",
e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==
b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=
1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===
f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,
function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('<button type="button"></button>').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,
originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",
f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):
[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);
if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):
e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||"&#160;"));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=
this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.12",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,
function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
;/*
 * jQuery UI Slider 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Slider
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=d([]);if(a.range){if(a.range===true){this.range=d("<div></div>");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length<a.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();
else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===
b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b,
g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},
_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;
if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=
this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c<e))c=e;if(c!==this.values(a)){e=this.values();e[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:e});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else if(c!==this.value()){b=this._trigger("slide",b,{handle:this.handles[a],
value:c});b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c)},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=
this._trimAlignValue(b);this._refreshValue();this._change(null,0)}else return this._value()},values:function(b,a){var c,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):
this.value();else return this._values()},_setOption:function(b,a){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":if(a){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];
return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<=this._valueMin())return this._valueMin();if(b>=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);
if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,
1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.12"})})(jQuery);
;/*
 * jQuery UI Tabs 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.12"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
;/*
 * jQuery UI Datepicker 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	jquery.ui.core.js
 */
(function(d,A){function K(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function F(a,b){d.extend(a,b);for(var c in b)if(b[c]==
null||b[c]==A)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.12"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){F(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();
f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&
b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==
""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,
c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),
true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}F(a.settings,e||{});
b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,
function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:
f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},
e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");F(e.settings,f);if(i!==null&&f.dateFormat!==A&&f.minDate===A)e.settings.minDate=this._formatDate(e,i);if(g!==null&&f.dateFormat!==A&&f.maxDate===A)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},
_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");
b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),
"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?
-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,
+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==A?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);
if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);
d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");F(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=
document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");
var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=
b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");
this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+
this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&
a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():
0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),
"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?
"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=
d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=
d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c==
"M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=
b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();
this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);
a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?
c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){var v=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&v?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p)throw"Missing number at position "+s;s+=p[0].length;return parseInt(p[0],10)},n=function(p,v,H){p=o(p)?H:v;for(v=0;v<p.length;v++)if(b.substr(s,p[v].length).toLowerCase()==p[v].toLowerCase()){s+=p[v].length;return v+1}throw"Unknown name at position "+
s;},r=function(){if(b.charAt(s)!=a.charAt(z))throw"Unexpected literal at position "+s;s++},s=0,z=0;z<a.length;z++)if(k)if(a.charAt(z)=="'"&&!o("'"))k=false;else r();else switch(a.charAt(z)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var w=new Date(m("@"));c=w.getFullYear();j=w.getMonth()+1;l=w.getDate();break;case "!":w=new Date((m("!")-this._ticksTo1970)/1E4);c=w.getFullYear();j=w.getMonth()+
1;l=w.getDate();break;case "'":if(o("'"))r();else k=true;break;default:r()}if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",
RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&
a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",
b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+=
"0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==A?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=
f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=
(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,
l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=
a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),
b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=
this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+
(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+
(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,
"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=
this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",D=0;D<i[0];D++){for(var M="",E=0;E<i[1];E++){var N=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1)switch(E){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-
1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&D==0?c?f:n:"")+(/all|right/.test(t)&&D==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,D>0||E>0,z,w)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var B=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=
(t+h)%7;B+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=B+"</tr></thead><tbody>";B=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,B);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;B=l?6:Math.ceil((t+B)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<B;O++){x+="<tr>";var P=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var G=
p?p.apply(a.input?a.input[0]:null,[q]):[true,""],C=q.getMonth()!=g,J=C&&!H||!G[0]||k&&q<k||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(C?" ui-datepicker-other-month":"")+(q.getTime()==N.getTime()&&g==a.selectedMonth&&a._keyEvent||L.getTime()==q.getTime()&&L.getTime()==N.getTime()?" "+this._dayOverClass:"")+(J?" "+this._unselectableClass+" ui-state-disabled":"")+(C&&!v?"":" "+G[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":
""))+'"'+((!C||v)&&G[2]?' title="'+G[2]+'"':"")+(J?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(C&&!v?"&#xa0;":J?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==u.getTime()?" ui-state-active":"")+(C?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=
P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&E==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',
o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&
l)?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+
a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";if(d.browser.mozilla)k+='<select class="ui-datepicker-year"><option value="'+c+'" selected="selected">'+c+"</option></select>";else{k+=a.yearshtml;a.yearshtml=null}}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?"&#xa0;":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=
a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,
"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);
c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,
"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,
[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.12";window["DP_jQuery_"+y]=d})(jQuery);
;/*
 * jQuery UI Progressbar 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Progressbar
 *
 * Depends:
 *   jquery.ui.core.js
 *   jquery.ui.widget.js
 */
(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.12"})})(jQuery);
;/*
 * jQuery UI Effects 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/
 */
jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0];
h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,
a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.12",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,
a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);
return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments);
else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),
b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,
a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,
a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==
e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=
g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,
a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
;/*
 * jQuery UI Effects Blind 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Blind
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
;/*
 * jQuery UI Effects Bounce 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Bounce
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","bottom","left","right"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Clip 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Clip
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Drop 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Drop
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
"show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Explode 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Explode
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
;/*
 * jQuery UI Effects Fade 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fade
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Fold 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fold
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],
10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
;/*
 * jQuery UI Effects Highlight 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Pulsate 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Pulsate
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Scale 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Scale
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],g=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
p=c.effects.setMode(a,b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};
if(m=="box"||m=="both"){if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);
a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);
child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,
n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Shake 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Shake
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=
(h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
;/*
 * jQuery UI Effects Slide 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Slide
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e);
var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
 * jQuery UI Effects Transfer 1.8.12
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Transfer
 *
 * Depends:
 *	jquery.effects.core.js
 */
(function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
b.dequeue()})})}})(jQuery);
;;(function(a){var b=(a.browser.msie?"paste":"input")+".mask",c=window.orientation!=undefined;a.mask={definitions:{"9":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"}};a.fn.extend({caret:function(a,b){if(this.length==0)return;if(typeof a=="number"){b=typeof b=="number"?b:a;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(a,b)}else if(this.createTextRange){var c=this.createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",a);c.select()}})}else{if(this[0].setSelectionRange){a=this[0].selectionStart;b=this[0].selectionEnd}else if(document.selection&&document.selection.createRange){var c=document.selection.createRange();a=0-c.duplicate().moveStart("character",-1e5);b=a+c.text.length}return {begin:a,end:b}}},unmask:function(){return this.trigger("unmask")},mask:function(g,f){if(!g&&this.length>0){var k=a(this[0]),d=k.data("tests");return a.map(k.data("buffer"),function(a,b){return d[b]?a:null}).join("")}f=a.extend({placeholder:"_",completed:null},f);var j=a.mask.definitions,d=[],h=g.length,i=null,e=g.length;a.each(g.split(""),function(b,a){if(a=="?"){e--;h=b}else if(j[a]){d.push(new RegExp(j[a]));if(i==null)i=d.length-1}else d.push(null)});return this.each(function(){var k=a(this),l=a.map(g.split(""),function(a){if(a!="?")return j[a]?f.placeholder:a}),p=false,q=k.val();k.data("buffer",l).data("tests",d);function o(a){while(++a<=e&&!d[a]);return a}function u(b){while(!d[b]&&--b>=0);for(var a=b;a<e;a++)if(d[a]){l[a]=f.placeholder;var c=o(a);if(c<e&&d[a].test(l[c]))l[a]=l[c];else break}n();k.caret(Math.max(i,b))}function v(h){for(var a=h,b=f.placeholder;a<e;a++)if(d[a]){var c=o(a),g=l[a];l[a]=b;if(c<e&&d[c].test(g))b=g;else break}}function t(e){var d=a(this).caret(),b=e.keyCode;p=b<16||b>16&&b<32||b>32&&b<41;d.begin-d.end!=0&&(!p||b==8||b==46)&&r(d.begin,d.end);if(b==8||b==46||c&&b==127){u(d.begin+(b==46?0:-1));return false}else if(b==27){k.val(q);k.caret(0,m());return false}}function s(b){if(p){p=false;return b.keyCode==8?false:null}b=b||window.event;var g=b.charCode||b.keyCode||b.which,j=a(this).caret();if(b.ctrlKey||b.altKey||b.metaKey)return true;else if(g>=32&&g<=125||g>186){var c=o(j.begin-1);if(c<e){var i=String.fromCharCode(g);if(d[c].test(i)){v(c);l[c]=i;n();var h=o(c);a(this).caret(h);f.completed&&h==e&&f.completed.call(k)}}}return false}function r(b,c){for(var a=b;a<c&&a<e;a++)if(d[a])l[a]=f.placeholder}function n(){return k.val(l.join("")).val()}function m(j){for(var g=k.val(),b=-1,a=0,c=0;a<e;a++)if(d[a]){l[a]=f.placeholder;while(c++<g.length){var m=g.charAt(c-1);if(d[a].test(m)){l[a]=m;b=a;break}}if(c>g.length)break}else if(l[a]==g[c]&&a!=h){c++;b=a}if(!j&&b+1<h){k.val("");r(0,e)}else if(j||b+1>=h){n();!j&&k.val(k.val().substring(0,b+1))}return h?a:i}!k.attr("readonly")&&k.one("unmask",function(){k.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){q=k.val();var a=m();n();setTimeout(function(){if(a==g.length)k.caret(0,a);else k.caret(a)},0)}).bind("blur.mask",function(){m();k.val()!=q&&k.change()}).bind("keydown.mask",t).bind("keypress.mask",s).bind(b,function(){setTimeout(function(){k.caret(m(true))},0)});m()})}})})(jQuery);(function(a){var b;a.fn.jqprint=function(g){b=a.extend({},a.fn.jqprint.defaults,g);var f=this instanceof jQuery?this:a(this);if(b.operaSupport&&a.browser.opera){var c=window.open("","jqPrint-preview");c.document.open();var e=c.document}else{var d=a("<iframe  />");!b.debug&&d.css({position:"absolute",width:"0px",height:"0px",left:"-600px",top:"-600px"});d.appendTo("body");var e=d[0].contentWindow.document}if(b.importCSS)if(a("link[media=print]").length>0)a("link[media=print]").each(function(){e.write("<link type='text/css' rel='stylesheet' href='"+a(this).attr("href")+"' media='print' />")});else a("link").each(function(){e.write("<link type='text/css' rel='stylesheet' href='"+a(this).attr("href")+"' />")});if(b.printContainer)e.write(f.outer());else f.each(function(){e.write(a(this).html())});e.close();(b.operaSupport&&a.browser.opera?c:d[0].contentWindow).focus();setTimeout(function(){(b.operaSupport&&a.browser.opera?c:d[0].contentWindow).print();c&&c.close()},1e3)};a.fn.jqprint.defaults={debug:false,importCSS:true,printContainer:true,operaSupport:true};jQuery.fn.outer=function(){return a(a("<div></div>").html(this.clone())).html()}})(jQuery);(function(a){var b=a.fn.domManip;a.fn.extend({render:function(b){return this.map(function(d,c){return a.render(c,b)})},domManip:function(c){if(c.length>1&&c[0].nodeType)arguments[0]=[a.makeArray(c)];if(c.length===2&&typeof c[0]==="string"&&typeof c[1]!=="string")arguments[0]=[a.render(c[0],c[1])];return b.apply(this,arguments)}});a.extend({render:function(c,d){var b;if(a.templates[c])b=a.templates[c];else if(c.nodeType){var e=c,f=a.data(e);b=f.tmpl||a.tmpl(e.innerHTML)}b=b||a.tmpl(c);if(a.isArray(d))return a.map(d,function(c,d){return b.call(c,a,c,d)});else return b.call(d,a,d,0)},templates:{},tmplcmd:{each:{_default:[null,"$i"],prefix:"jQuery.each($1,function($2){with(this){",suffix:"}});"},"if":{prefix:"if($1){",suffix:"}"},"else":{prefix:"}else{"},html:{prefix:"_.push(typeof $1==='function'?$1.call(this):$1);"},"=":{_default:["this"],prefix:"_.push($.encode(typeof $1==='function'?$1.call(this):$1));"}},encode:function(a){return a!=null?document.createTextNode(a.toString()).nodeValue:""},tmpl:function(d,b,e){var c=new Function("jQuery","$data","$i","var $=jQuery,_=[];_.data=$data;_.index=$i;with($data){_.push('"+d.replace(/[\r\t\n]/g," ").replace(/\${([^}]*)}/g,"{{= $1}}").replace(/{{(\/?)(\w+|.)(?:\((.*?)\))?(?: (.*?))?}}/g,function(h,f,c,e,g){var b=a.tmplcmd[c];if(!b)throw"Template not found: "+c;var d=b._default;return "');"+b[f?"suffix":"prefix"].split("$1").join(g||d[0]).split("$2").join(e||d[1])+"_.push('"})+"');}return $(_.join('')).get();");return b?c.call(this,a,b,e):c}})})(jQuery);(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},h=0,c=0,l=[];function g(e,d,g,i){var c={data:i||(d?d.data:{}),_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};e&&a.extend(c,e,{nodes:[],parent:d});if(g){c.tmpl=g;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++h;(l.length?f:b)[h]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a.fn[d].apply(a(i[h]),k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,l,j){if(d[0]&&d[0].nodeType){var f=a.makeArray(arguments),g=d.length,i=0,h;while(i<g&&!(h=a.data(d[i++],"tmplItem")));if(g>1)f[0]=[a.makeArray(d)];if(h&&c)f[2]=function(b){a.tmpl.afterManip(this,b,j)};r.apply(this,f)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var j,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(i(c,null,c.tmpl(a,c)))}if(!d)return [];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);j=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(i(c,null,j)):j},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return (""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function i(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:i(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=j(c).concat(b);if(d)b=b.concat(j(d))});return b?b:j(c)}function j(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,j,d,b,c,e){var i=a.tmpl.tag[j],h,f,g;if(!i)throw"Template command not found: "+j;h=i._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=k(b);e=e?","+k(e)+")":c?")":"";f=c?b.indexOf(".")>-1?b+c:"("+b+").call($item"+e:b;g=c?f:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else g=f=h.$1||"null";d=k(d);return "');"+i[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(g).split("$1").join(f).split("$2").join(d?d.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(d,c,b,a){a=a?","+a+")":b?")":"";return a?"("+c+").call($item"+a:d}):h.$2||"")+"_.push('"})+"');}return _;")}function n(c,b){c._wrap=i(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function k(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,i;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(i=j.length-1;i>=0;i--)m(j[i]);m(k)}function m(j){var p,i=j,k,e,m;if(m=j.getAttribute(d)){while(i.parentNode&&(i=i.parentNode).nodeType===1&&!(p=i.getAttribute(d)));if(p!==m){i=i.parentNode?i.nodeType===11?0:i.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[i]||f[i],null,true);e.key=++h;b[h]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;i=a.data(j.parentNode,"tmplItem");i=i?i.key:0}if(e){k=e;while(k&&k.key!=i){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent,null,true)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery);/**
 * CoolInput Plugin
 *
 * @version 1.4 (05/09/2009)
 * @requires jQuery v1.2.6+
 * @author Alex Weber <alexweber.com.br>
 * @copyright Copyright (c) 2008-2009, Alex Weber
 * @see http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
 *
 * Distributed under the terms of the GNU General Public License
 * http://www.gnu.org/licenses/gpl-3.0.html
 *
 */
(function(a){a.fn.coolinput=function(b){var c={hint:null,source:"title",blurClass:"blur",iconClass:false,clearOnSubmit:true};if(b&&typeof b=="object"){a.extend(c,b)}else{c.hint=b}return this.each(function(){var d=a(this);var e=c.hint||d.attr(c.source);if(e){d.blur(function(){if(d.val()==""){d.val(e).addClass(c.blurClass)}}).focus(function(){if(d.val()==e){d.val("").removeClass(c.blurClass)}});if(c.clearOnSubmit){d.parents("form:first").submit(function(){if(d.hasClass(c.blurClass)){d.val("")}})}if(c.iconClass){d.addClass(c.iconClass)}d.blur()}})}})(jQuery);
;(function(b){var a={},d,h,f,g=b.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),i=false;b.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){b.tooltip.blocked=!b.tooltip.blocked}};b.fn.extend({tooltip:function(c){c=b.extend({},b.tooltip.defaults,c);l(c);return this.each(function(){b.data(this,"tooltip",c);this.tOpacity=a.parent.css("opacity");this.tooltipText=this.title;b(this).removeAttr("title");this.alt=""}).mouseover(o).mouseout(j).click(j)},fixPNG:g?function(){return this.each(function(){var a=b(this).css("backgroundImage");if(a.match(/^url\(["']?(.*\.png)["']?\)$/i)){a=RegExp.$1;b(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+a+"')"}).each(function(){var a=b(this).css("position");a!="absolute"&&a!="relative"&&b(this).css("position","relative")})}})}:function(){return this},unfixPNG:g?function(){return this.each(function(){b(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){b(this)[b(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function l(c){if(a.parent)return;a.parent=b('<div id="'+c.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();b.fn.bgiframe&&a.parent.bgiframe();a.title=b("h3",a.parent);a.body=b("div.body",a.parent);a.url=b("div.url",a.parent)}function c(a){return b.data(a,"tooltip")}function n(a){if(c(this).delay)f=setTimeout(k,c(this).delay);else k();i=!!c(this).track;b(document.body).bind("mousemove",e);e(a)}function o(){if(b.tooltip.blocked||this==d||!this.tooltipText&&!c(this).bodyHandler)return;d=this;h=this.tooltipText;if(c(this).bodyHandler){a.title.hide();var e=c(this).bodyHandler.call(this);if(e.nodeType||e.jquery)a.body.empty().append(e);else a.body.html(e);a.body.show()}else if(c(this).showBody){var g=h.split(c(this).showBody);a.title.html(g.shift()).show();a.body.empty();for(var f=0,i;i=g[f];f++){f>0&&a.body.append("<br/>");a.body.append(i)}a.body.hideWhenEmpty()}else{a.title.html(h).show();a.body.hide()}if(c(this).showURL&&b(this).url())a.url.html(b(this).url().replace("http://","")).show();else a.url.hide();a.parent.addClass(c(this).extraClass);c(this).fixPNG&&a.parent.fixPNG();n.apply(this,arguments)}function k(){f=null;if((!g||!b.fn.bgiframe)&&c(d).fade)if(a.parent.is(":animated"))a.parent.stop().show().fadeTo(c(d).fade,d.tOpacity);else a.parent.is(":visible")?a.parent.fadeTo(c(d).fade,d.tOpacity):a.parent.fadeIn(c(d).fade);else a.parent.show();e()}function e(h){if(b.tooltip.blocked)return;if(h&&h.target.tagName=="OPTION")return;!i&&a.parent.is(":visible")&&b(document.body).unbind("mousemove",e);if(d==null){b(document.body).unbind("mousemove",e);return}a.parent.removeClass("viewport-right").removeClass("viewport-bottom");var f=a.parent[0].offsetLeft,j=a.parent[0].offsetTop;if(h){f=h.pageX+c(d).left;j=h.pageY+c(d).top;var l="auto";if(c(d).positionLeft){l=b(window).width()-f;f="auto"}a.parent.css({left:f,right:l,top:j})}var k=m(),g=a.parent[0];if(k.x+k.cx<g.offsetLeft+g.offsetWidth){f-=g.offsetWidth+20+c(d).left;a.parent.css({left:f+"px"}).addClass("viewport-right")}if(k.y+k.cy<g.offsetTop+g.offsetHeight){j-=g.offsetHeight+20+c(d).top;a.parent.css({top:j+"px"}).addClass("viewport-bottom")}}function m(){return {x:b(window).scrollLeft(),y:b(window).scrollTop(),cx:b(window).width(),cy:b(window).height()}}function j(){if(b.tooltip.blocked)return;f&&clearTimeout(f);d=null;var e=c(this);function h(){a.parent.removeClass(e.extraClass).hide().css("opacity","")}if((!g||!b.fn.bgiframe)&&e.fade)if(a.parent.is(":animated"))a.parent.stop().fadeTo(e.fade,0,h);else a.parent.stop().fadeOut(e.fade,h);else h();c(this).fixPNG&&a.parent.unfixPNG()}})(jQuery);/*--------------------------------------------------------------------------
* linq.js - LINQ for JavaScript
* ver 2.2.0.2 (Jan. 21th, 2011)
*
* created and maintained by neuecc <ils@neue.cc>
* licensed under Microsoft Public License(Ms-PL)
* http://neue.cc/
* http://linqjs.codeplex.com/
*--------------------------------------------------------------------------*/
jQuery.extend({Enumerable:function(){var m="Single:sequence contains more than one element.",e=true,b=null,a=false,c=function(a){this.GetEnumerator=a};c.Choice=function(){var a=arguments[0]instanceof Array?arguments[0]:arguments;return new c(function(){return new f(g.Blank,function(){return this.Yield(a[Math.floor(Math.random()*a.length)])},g.Blank)})};c.Cycle=function(){var a=arguments[0]instanceof Array?arguments[0]:arguments;return new c(function(){var b=0;return new f(g.Blank,function(){if(b>=a.length)b=0;return this.Yield(a[b++])},g.Blank)})};c.Empty=function(){return new c(function(){return new f(g.Blank,function(){return a},g.Blank)})};c.From=function(j){if(j==b)return c.Empty();if(j instanceof c)return j;if(typeof j==i.Number||typeof j==i.Boolean)return c.Repeat(j,1);if(typeof j==i.String)return new c(function(){var b=0;return new f(g.Blank,function(){return b<j.length?this.Yield(j.charAt(b++)):a},g.Blank)});if(typeof j!=i.Function){if(typeof j.length==i.Number)return new h(j);if(!(j instanceof Object)&&d.IsIEnumerable(j))return new c(function(){var c=e,b;return new f(function(){b=new Enumerator(j)},function(){if(c)c=a;else b.moveNext();return b.atEnd()?a:this.Yield(b.item())},g.Blank)})}return new c(function(){var b=[],c=0;return new f(function(){for(var a in j)!(j[a]instanceof Function)&&b.push({Key:a,Value:j[a]})},function(){return c<b.length?this.Yield(b[c++]):a},g.Blank)})},c.Return=function(a){return c.Repeat(a,1)};c.Matches=function(h,e,d){if(d==b)d="";if(e instanceof RegExp){d+=e.ignoreCase?"i":"";d+=e.multiline?"m":"";e=e.source}if(d.indexOf("g")===-1)d+="g";return new c(function(){var b;return new f(function(){b=new RegExp(e,d)},function(){var c=b.exec(h);return c?this.Yield(c):a},g.Blank)})};c.Range=function(e,d,a){if(a==b)a=1;return c.ToInfinity(e,a).Take(d)};c.RangeDown=function(e,d,a){if(a==b)a=1;return c.ToNegativeInfinity(e,a).Take(d)};c.RangeTo=function(d,e,a){if(a==b)a=1;return d<e?c.ToInfinity(d,a).TakeWhile(function(a){return a<=e}):c.ToNegativeInfinity(d,a).TakeWhile(function(a){return a>=e})};c.Repeat=function(d,a){return a!=b?c.Repeat(d).Take(a):new c(function(){return new f(g.Blank,function(){return this.Yield(d)},g.Blank)})};c.RepeatWithFinalize=function(a,e){a=d.CreateLambda(a);e=d.CreateLambda(e);return new c(function(){var c;return new f(function(){c=a()},function(){return this.Yield(c)},function(){if(c!=b){e(c);c=b}})})};c.Generate=function(a,e){if(e!=b)return c.Generate(a).Take(e);a=d.CreateLambda(a);return new c(function(){return new f(g.Blank,function(){return this.Yield(a())},g.Blank)})};c.ToInfinity=function(d,a){if(d==b)d=0;if(a==b)a=1;return new c(function(){var b;return new f(function(){b=d-a},function(){return this.Yield(b+=a)},g.Blank)})};c.ToNegativeInfinity=function(d,a){if(d==b)d=0;if(a==b)a=1;return new c(function(){var b;return new f(function(){b=d+a},function(){return this.Yield(b-=a)},g.Blank)})};c.Unfold=function(h,b){b=d.CreateLambda(b);return new c(function(){var d=e,c;return new f(g.Blank,function(){if(d){d=a;c=h;return this.Yield(c)}c=b(c);return this.Yield(c)},g.Blank)})};c.prototype={CascadeBreadthFirst:function(g,b){var h=this;g=d.CreateLambda(g);b=d.CreateLambda(b);return new c(function(){var i,k=0,j=[];return new f(function(){i=h.GetEnumerator()},function(){while(e){if(i.MoveNext()){j.push(i.Current());return this.Yield(b(i.Current(),k))}var f=c.From(j).SelectMany(function(a){return g(a)});if(!f.Any())return a;else{k++;j=[];d.Dispose(i);i=f.GetEnumerator()}}},function(){d.Dispose(i)})})},CascadeDepthFirst:function(g,b){var h=this;g=d.CreateLambda(g);b=d.CreateLambda(b);return new c(function(){var j=[],i;return new f(function(){i=h.GetEnumerator()},function(){while(e){if(i.MoveNext()){var f=b(i.Current(),j.length);j.push(i);i=c.From(g(i.Current())).GetEnumerator();return this.Yield(f)}if(j.length<=0)return a;d.Dispose(i);i=j.pop()}},function(){try{d.Dispose(i)}finally{c.From(j).ForEach(function(a){a.Dispose()})}})})},Flatten:function(){var h=this;return new c(function(){var j,i=b;return new f(function(){j=h.GetEnumerator()},function(){while(e){if(i!=b)if(i.MoveNext())return this.Yield(i.Current());else i=b;if(j.MoveNext())if(j.Current()instanceof Array){d.Dispose(i);i=c.From(j.Current()).SelectMany(g.Identity).Flatten().GetEnumerator();continue}else return this.Yield(j.Current());return a}},function(){try{d.Dispose(j)}finally{d.Dispose(i)}})})},Pairwise:function(b){var e=this;b=d.CreateLambda(b);return new c(function(){var c;return new f(function(){c=e.GetEnumerator();c.MoveNext()},function(){var d=c.Current();return c.MoveNext()?this.Yield(b(d,c.Current())):a},function(){d.Dispose(c)})})},Scan:function(i,g,j){if(j!=b)return this.Scan(i,g).Select(j);var h;if(g==b){g=d.CreateLambda(i);h=a}else{g=d.CreateLambda(g);h=e}var k=this;return new c(function(){var b,c,j=e;return new f(function(){b=k.GetEnumerator()},function(){if(j){j=a;if(!h){if(b.MoveNext())return this.Yield(c=b.Current())}else return this.Yield(c=i)}return b.MoveNext()?this.Yield(c=g(c,b.Current())):a},function(){d.Dispose(b)})})},Select:function(b){var e=this;b=d.CreateLambda(b);return new c(function(){var c,g=0;return new f(function(){c=e.GetEnumerator()},function(){return c.MoveNext()?this.Yield(b(c.Current(),g++)):a},function(){d.Dispose(c)})})},SelectMany:function(g,e){var h=this;g=d.CreateLambda(g);if(e==b)e=function(b,a){return a};e=d.CreateLambda(e);return new c(function(){var j,i=undefined,k=0;return new f(function(){j=h.GetEnumerator()},function(){if(i===undefined)if(!j.MoveNext())return a;do{if(i==b){var f=g(j.Current(),k++);i=c.From(f).GetEnumerator()}if(i.MoveNext())return this.Yield(e(j.Current(),i.Current()));d.Dispose(i);i=b}while(j.MoveNext());return a},function(){try{d.Dispose(j)}finally{d.Dispose(i)}})})},Where:function(b){b=d.CreateLambda(b);var e=this;return new c(function(){var c,g=0;return new f(function(){c=e.GetEnumerator()},function(){while(c.MoveNext())if(b(c.Current(),g++))return this.Yield(c.Current());return a},function(){d.Dispose(c)})})},OfType:function(c){var a;switch(c){case Number:a=i.Number;break;case String:a=i.String;break;case Boolean:a=i.Boolean;break;case Function:a=i.Function;break;default:a=b}return a===b?this.Where(function(a){return a instanceof c}):this.Where(function(b){return typeof b===a})},Zip:function(e,b){b=d.CreateLambda(b);var g=this;return new c(function(){var i,h,j=0;return new f(function(){i=g.GetEnumerator();h=c.From(e).GetEnumerator()},function(){return i.MoveNext()&&h.MoveNext()?this.Yield(b(i.Current(),h.Current(),j++)):a},function(){try{d.Dispose(i)}finally{d.Dispose(h)}})})},Join:function(m,i,h,k,j){i=d.CreateLambda(i);h=d.CreateLambda(h);k=d.CreateLambda(k);j=d.CreateLambda(j);var l=this;return new c(function(){var n,q,o=b,p=0;return new f(function(){n=l.GetEnumerator();q=c.From(m).ToLookup(h,g.Identity,j)},function(){while(e){if(o!=b){var c=o[p++];if(c!==undefined)return this.Yield(k(n.Current(),c));c=b;p=0}if(n.MoveNext()){var d=i(n.Current());o=q.Get(d).ToArray()}else return a}},function(){d.Dispose(n)})})},GroupJoin:function(l,h,e,j,i){h=d.CreateLambda(h);e=d.CreateLambda(e);j=d.CreateLambda(j);i=d.CreateLambda(i);var k=this;return new c(function(){var m=k.GetEnumerator(),n=b;return new f(function(){m=k.GetEnumerator();n=c.From(l).ToLookup(e,g.Identity,i)},function(){if(m.MoveNext()){var b=n.Get(h(m.Current()));return this.Yield(j(m.Current(),b))}return a},function(){d.Dispose(m)})})},All:function(b){b=d.CreateLambda(b);var c=e;this.ForEach(function(d){if(!b(d)){c=a;return a}});return c},Any:function(c){c=d.CreateLambda(c);var b=this.GetEnumerator();try{if(arguments.length==0)return b.MoveNext();while(b.MoveNext())if(c(b.Current()))return e;return a}finally{d.Dispose(b)}},Concat:function(e){var g=this;return new c(function(){var i,h;return new f(function(){i=g.GetEnumerator()},function(){if(h==b){if(i.MoveNext())return this.Yield(i.Current());h=c.From(e).GetEnumerator()}return h.MoveNext()?this.Yield(h.Current()):a},function(){try{d.Dispose(i)}finally{d.Dispose(h)}})})},Insert:function(h,b){var g=this;return new c(function(){var j,i,l=0,k=a;return new f(function(){j=g.GetEnumerator();i=c.From(b).GetEnumerator()},function(){if(l==h&&i.MoveNext()){k=e;return this.Yield(i.Current())}if(j.MoveNext()){l++;return this.Yield(j.Current())}return!k&&i.MoveNext()?this.Yield(i.Current()):a},function(){try{d.Dispose(j)}finally{d.Dispose(i)}})})},Alternate:function(a){a=c.Return(a);return this.SelectMany(function(b){return c.Return(b).Concat(a)}).TakeExceptLast()},Contains:function(f,b){b=d.CreateLambda(b);var c=this.GetEnumerator();try{while(c.MoveNext())if(b(c.Current())===f)return e;return a}finally{d.Dispose(c)}},DefaultIfEmpty:function(b){var g=this;return new c(function(){var c,h=e;return new f(function(){c=g.GetEnumerator()},function(){if(c.MoveNext()){h=a;return this.Yield(c.Current())}else if(h){h=a;return this.Yield(b)}return a},function(){d.Dispose(c)})})},Distinct:function(a){return this.Except(c.Empty(),a)},Except:function(e,b){b=d.CreateLambda(b);var g=this;return new c(function(){var h,i;return new f(function(){h=g.GetEnumerator();i=new n(b);c.From(e).ForEach(function(a){i.Add(a)})},function(){while(h.MoveNext()){var b=h.Current();if(!i.Contains(b)){i.Add(b);return this.Yield(b)}}return a},function(){d.Dispose(h)})})},Intersect:function(e,b){b=d.CreateLambda(b);var g=this;return new c(function(){var h,i,j;return new f(function(){h=g.GetEnumerator();i=new n(b);c.From(e).ForEach(function(a){i.Add(a)});j=new n(b)},function(){while(h.MoveNext()){var b=h.Current();if(!j.Contains(b)&&i.Contains(b)){j.Add(b);return this.Yield(b)}}return a},function(){d.Dispose(h)})})},SequenceEqual:function(h,f){f=d.CreateLambda(f);var g=this.GetEnumerator();try{var b=c.From(h).GetEnumerator();try{while(g.MoveNext())if(!b.MoveNext()||f(g.Current())!==f(b.Current()))return a;return b.MoveNext()?a:e}finally{d.Dispose(b)}}finally{d.Dispose(g)}},Union:function(e,b){b=d.CreateLambda(b);var g=this;return new c(function(){var j,h,i;return new f(function(){j=g.GetEnumerator();i=new n(b)},function(){var b;if(h===undefined){while(j.MoveNext()){b=j.Current();if(!i.Contains(b)){i.Add(b);return this.Yield(b)}}h=c.From(e).GetEnumerator()}while(h.MoveNext()){b=h.Current();if(!i.Contains(b)){i.Add(b);return this.Yield(b)}}return a},function(){try{d.Dispose(j)}finally{d.Dispose(h)}})})},OrderBy:function(b){return new j(this,b,a)},OrderByDescending:function(a){return new j(this,a,e)},Reverse:function(){var b=this;return new c(function(){var c,d;return new f(function(){c=b.ToArray();d=c.length},function(){return d>0?this.Yield(c[--d]):a},g.Blank)})},Shuffle:function(){var b=this;return new c(function(){var c;return new f(function(){c=b.ToArray()},function(){if(c.length>0){var b=Math.floor(Math.random()*c.length);return this.Yield(c.splice(b,1)[0])}return a},g.Blank)})},GroupBy:function(i,h,e,g){var j=this;i=d.CreateLambda(i);h=d.CreateLambda(h);if(e!=b)e=d.CreateLambda(e);g=d.CreateLambda(g);return new c(function(){var c;return new f(function(){c=j.ToLookup(i,h,g).ToEnumerable().GetEnumerator()},function(){while(c.MoveNext())return e==b?this.Yield(c.Current()):this.Yield(e(c.Current().Key(),c.Current()));return a},function(){d.Dispose(c)})})},PartitionBy:function(j,i,g,h){var l=this;j=d.CreateLambda(j);i=d.CreateLambda(i);h=d.CreateLambda(h);var k;if(g==b){k=a;g=function(b,a){return new o(b,a)}}else{k=e;g=d.CreateLambda(g)}return new c(function(){var b,n,o,m=[];return new f(function(){b=l.GetEnumerator();if(b.MoveNext()){n=j(b.Current());o=h(n);m.push(i(b.Current()))}},function(){var d;while((d=b.MoveNext())==e)if(o===h(j(b.Current())))m.push(i(b.Current()));else break;if(m.length>0){var f=k?g(n,c.From(m)):g(n,m);if(d){n=j(b.Current());o=h(n);m=[i(b.Current())]}else m=[];return this.Yield(f)}return a},function(){d.Dispose(b)})})},BufferWithCount:function(e){var b=this;return new c(function(){var c;return new f(function(){c=b.GetEnumerator()},function(){var b=[],d=0;while(c.MoveNext()){b.push(c.Current());if(++d>=e)return this.Yield(b)}return b.length>0?this.Yield(b):a},function(){d.Dispose(c)})})},Aggregate:function(c,b,a){return this.Scan(c,b,a).Last()},Average:function(a){a=d.CreateLambda(a);var c=0,b=0;this.ForEach(function(d){c+=a(d);++b});return c/b},Count:function(a){a=a==b?g.True:d.CreateLambda(a);var c=0;this.ForEach(function(d,b){if(a(d,b))++c});return c},Max:function(a){if(a==b)a=g.Identity;return this.Select(a).Aggregate(function(a,b){return a>b?a:b})},Min:function(a){if(a==b)a=g.Identity;return this.Select(a).Aggregate(function(a,b){return a<b?a:b})},MaxBy:function(a){a=d.CreateLambda(a);return this.Aggregate(function(b,c){return a(b)>a(c)?b:c})},MinBy:function(a){a=d.CreateLambda(a);return this.Aggregate(function(b,c){return a(b)<a(c)?b:c})},Sum:function(a){if(a==b)a=g.Identity;return this.Select(a).Aggregate(0,function(a,b){return a+b})},ElementAt:function(d){var c,b=a;this.ForEach(function(g,f){if(f==d){c=g;b=e;return a}});if(!b)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return c},ElementAtOrDefault:function(f,d){var c,b=a;this.ForEach(function(g,d){if(d==f){c=g;b=e;return a}});return!b?d:c},First:function(c){if(c!=b)return this.Where(c).First();var f,d=a;this.ForEach(function(b){f=b;d=e;return a});if(!d)throw new Error("First:No element satisfies the condition.");return f},FirstOrDefault:function(c,d){if(d!=b)return this.Where(d).FirstOrDefault(c);var g,f=a;this.ForEach(function(b){g=b;f=e;return a});return!f?c:g},Last:function(c){if(c!=b)return this.Where(c).Last();var f,d=a;this.ForEach(function(a){d=e;f=a});if(!d)throw new Error("Last:No element satisfies the condition.");return f},LastOrDefault:function(c,d){if(d!=b)return this.Where(d).LastOrDefault(c);var g,f=a;this.ForEach(function(a){f=e;g=a});return!f?c:g},Single:function(d){if(d!=b)return this.Where(d).Single();var f,c=a;this.ForEach(function(a){if(!c){c=e;f=a}else throw new Error(m);});if(!c)throw new Error("Single:No element satisfies the condition.");return f},SingleOrDefault:function(d,f){if(f!=b)return this.Where(f).SingleOrDefault(d);var g,c=a;this.ForEach(function(a){if(!c){c=e;g=a}else throw new Error(m);});return!c?d:g},Skip:function(e){var b=this;return new c(function(){var c,g=0;return new f(function(){c=b.GetEnumerator();while(g++<e&&c.MoveNext());},function(){return c.MoveNext()?this.Yield(c.Current()):a},function(){d.Dispose(c)})})},SkipWhile:function(b){b=d.CreateLambda(b);var g=this;return new c(function(){var c,i=0,h=a;return new f(function(){c=g.GetEnumerator()},function(){while(!h)if(c.MoveNext()){if(!b(c.Current(),i++)){h=e;return this.Yield(c.Current())}continue}else return a;return c.MoveNext()?this.Yield(c.Current()):a},function(){d.Dispose(c)})})},Take:function(e){var b=this;return new c(function(){var c,g=0;return new f(function(){c=b.GetEnumerator()},function(){return g++<e&&c.MoveNext()?this.Yield(c.Current()):a},function(){d.Dispose(c)})})},TakeWhile:function(b){b=d.CreateLambda(b);var e=this;return new c(function(){var c,g=0;return new f(function(){c=e.GetEnumerator()},function(){return c.MoveNext()&&b(c.Current(),g++)?this.Yield(c.Current()):a},function(){d.Dispose(c)})})},TakeExceptLast:function(e){if(e==b)e=1;var g=this;return new c(function(){if(e<=0)return g.GetEnumerator();var b,c=[];return new f(function(){b=g.GetEnumerator()},function(){while(b.MoveNext()){if(c.length==e){c.push(b.Current());return this.Yield(c.shift())}c.push(b.Current())}return a},function(){d.Dispose(b)})})},TakeFromLast:function(e){if(e<=0||e==b)return c.Empty();var g=this;return new c(function(){var j,h,i=[];return new f(function(){j=g.GetEnumerator()},function(){while(j.MoveNext()){i.length==e&&i.shift();i.push(j.Current())}if(h==b)h=c.From(i).GetEnumerator();return h.MoveNext()?this.Yield(h.Current()):a},function(){d.Dispose(h)})})},IndexOf:function(c){var a=b;this.ForEach(function(d,b){if(d===c){a=b;return e}});return a!==b?a:-1},LastIndexOf:function(b){var a=-1;this.ForEach(function(d,c){if(d===b)a=c});return a},ToArray:function(){var a=[];this.ForEach(function(b){a.push(b)});return a},ToLookup:function(c,b,a){c=d.CreateLambda(c);b=d.CreateLambda(b);a=d.CreateLambda(a);var e=new n(a);this.ForEach(function(g){var f=c(g),a=b(g),d=e.Get(f);if(d!==undefined)d.push(a);else e.Add(f,[a])});return new q(e)},ToObject:function(b,a){b=d.CreateLambda(b);a=d.CreateLambda(a);var c={};this.ForEach(function(d){c[b(d)]=a(d)});return c},ToDictionary:function(c,b,a){c=d.CreateLambda(c);b=d.CreateLambda(b);a=d.CreateLambda(a);var e=new n(a);this.ForEach(function(a){e.Add(c(a),b(a))});return e},ToJSON:function(a,b){return JSON.stringify(this.ToArray(),a,b)},ToString:function(a,c){if(a==b)a="";if(c==b)c=g.Identity;return this.Select(c).ToArray().join(a)},Do:function(b){var e=this;b=d.CreateLambda(b);return new c(function(){var c,g=0;return new f(function(){c=e.GetEnumerator()},function(){if(c.MoveNext()){b(c.Current(),g++);return this.Yield(c.Current())}return a},function(){d.Dispose(c)})})},ForEach:function(c){c=d.CreateLambda(c);var e=0,b=this.GetEnumerator();try{while(b.MoveNext())if(c(b.Current(),e++)===a)break}finally{d.Dispose(b)}},Write:function(c,f){if(c==b)c="";f=d.CreateLambda(f);var g=e;this.ForEach(function(b){if(g)g=a;else document.write(c);document.write(f(b))})},WriteLine:function(a){a=d.CreateLambda(a);this.ForEach(function(b){document.write(a(b));document.write("<br />")})},Force:function(){var a=this.GetEnumerator();try{while(a.MoveNext());}finally{d.Dispose(a)}},Let:function(b){b=d.CreateLambda(b);var e=this;return new c(function(){var g;return new f(function(){g=c.From(b(e)).GetEnumerator()},function(){return g.MoveNext()?this.Yield(g.Current()):a},function(){d.Dispose(g)})})},Share:function(){var e=this,d;return new c(function(){return new f(function(){if(d==b)d=e.GetEnumerator()},function(){return d.MoveNext()?this.Yield(d.Current()):a},g.Blank)})},MemoizeAll:function(){var h=this,e,d;return new c(function(){var c=-1;return new f(function(){if(d==b){d=h.GetEnumerator();e=[]}},function(){c++;return e.length<=c?d.MoveNext()?this.Yield(e[c]=d.Current()):a:this.Yield(e[c])},g.Blank)})},Catch:function(b){b=d.CreateLambda(b);var e=this;return new c(function(){var c;return new f(function(){c=e.GetEnumerator()},function(){try{return c.MoveNext()?this.Yield(c.Current()):a}catch(d){b(d);return a}},function(){d.Dispose(c)})})},Finally:function(b){b=d.CreateLambda(b);var e=this;return new c(function(){var c;return new f(function(){c=e.GetEnumerator()},function(){return c.MoveNext()?this.Yield(c.Current()):a},function(){try{d.Dispose(c)}finally{b()}})})},Trace:function(c,a){if(c==b)c="Trace";a=d.CreateLambda(a);return this.Do(function(b){console.log(c,":",a(b))})}};var g={Identity:function(a){return a},True:function(){return e},Blank:function(){}},i={Boolean:typeof e,Number:typeof 0,String:typeof"",Object:typeof{},Undefined:typeof undefined,Function:typeof function(){}},d={CreateLambda:function(a){if(a==b)return g.Identity;if(typeof a==i.String)if(a=="")return g.Identity;else if(a.indexOf("=>")==-1)return new Function("$,$$,$$$,$$$$","return "+a);else{var c=a.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/);return new Function(c[1],"return "+c[2])}return a},IsIEnumerable:function(b){if(typeof Enumerator!=i.Undefined)try{new Enumerator(b);return e}catch(c){}return a},Compare:function(a,b){return a===b?0:a>b?1:-1},Dispose:function(a){a!=b&&a.Dispose()}},k={Before:0,Running:1,After:2},f=function(d,f,g){var c=new p,b=k.Before;this.Current=c.Current;this.MoveNext=function(){try{switch(b){case k.Before:b=k.Running;d();case k.Running:if(f.apply(c))return e;else{this.Dispose();return a}case k.After:return a}}catch(g){this.Dispose();throw g;}};this.Dispose=function(){if(b!=k.Running)return;try{g()}finally{b=k.After}}},p=function(){var a=b;this.Current=function(){return a};this.Yield=function(b){a=b;return e}},j=function(f,b,c,e){var a=this;a.source=f;a.keySelector=d.CreateLambda(b);a.descending=c;a.parent=e};j.prototype=new c;j.prototype.CreateOrderedEnumerable=function(a,b){return new j(this.source,a,b,this)};j.prototype.ThenBy=function(b){return this.CreateOrderedEnumerable(b,a)};j.prototype.ThenByDescending=function(a){return this.CreateOrderedEnumerable(a,e)};j.prototype.GetEnumerator=function(){var h=this,d,c,e=0;return new f(function(){d=[];c=[];h.source.ForEach(function(b,a){d.push(b);c.push(a)});var a=l.Create(h,b);a.GenerateKeys(d);c.sort(function(b,c){return a.Compare(b,c)})},function(){return e<c.length?this.Yield(d[c[e++]]):a},g.Blank)};var l=function(c,d,e){var a=this;a.keySelector=c;a.descending=d;a.child=e;a.keys=b};l.Create=function(a,d){var c=new l(a.keySelector,a.descending,d);return a.parent!=b?l.Create(a.parent,c):c};l.prototype.GenerateKeys=function(d){var a=this;for(var f=d.length,g=a.keySelector,e=new Array(f),c=0;c<f;c++)e[c]=g(d[c]);a.keys=e;a.child!=b&&a.child.GenerateKeys(d)};l.prototype.Compare=function(e,f){var a=this,c=d.Compare(a.keys[e],a.keys[f]);if(c==0){if(a.child!=b)return a.child.Compare(e,f);c=d.Compare(e,f)}return a.descending?-c:c};var h=function(a){this.source=a};h.prototype=new c;h.prototype.Any=function(a){return a==b?this.source.length>0:c.prototype.Any.apply(this,arguments)};h.prototype.Count=function(a){return a==b?this.source.length:c.prototype.Count.apply(this,arguments)};h.prototype.ElementAt=function(a){return 0<=a&&a<this.source.length?this.source[a]:c.prototype.ElementAt.apply(this,arguments)};h.prototype.ElementAtOrDefault=function(a,b){return 0<=a&&a<this.source.length?this.source[a]:b};h.prototype.First=function(a){return a==b&&this.source.length>0?this.source[0]:c.prototype.First.apply(this,arguments)};h.prototype.FirstOrDefault=function(a,d){return d!=b?c.prototype.FirstOrDefault.apply(this,arguments):this.source.length>0?this.source[0]:a};h.prototype.Last=function(d){var a=this;return d==b&&a.source.length>0?a.source[a.source.length-1]:c.prototype.Last.apply(a,arguments)};h.prototype.LastOrDefault=function(d,e){var a=this;return e!=b?c.prototype.LastOrDefault.apply(a,arguments):a.source.length>0?a.source[a.source.length-1]:d};h.prototype.Skip=function(d){var b=this.source;return new c(function(){var c;return new f(function(){c=d<0?0:d},function(){return c<b.length?this.Yield(b[c++]):a},g.Blank)})};h.prototype.TakeExceptLast=function(a){if(a==b)a=1;return this.Take(this.source.length-a)};h.prototype.TakeFromLast=function(a){return this.Skip(this.source.length-a)};h.prototype.Reverse=function(){var b=this.source;return new c(function(){var c;return new f(function(){c=b.length},function(){return c>0?this.Yield(b[--c]):a},g.Blank)})};h.prototype.SequenceEqual=function(d,e){return(d instanceof h||d instanceof Array)&&e==b&&c.From(d).Count()!=this.Count()?a:c.prototype.SequenceEqual.apply(this,arguments)};h.prototype.ToString=function(a,d){if(d!=b||!(this.source instanceof Array))return c.prototype.ToString.apply(this,arguments);if(a==b)a="";return this.source.join(a)};h.prototype.GetEnumerator=function(){var b=this.source,c=0;return new f(g.Blank,function(){return c<b.length?this.Yield(b[c++]):a},g.Blank)};var n=function(){var h=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},d=function(a){return a===b?"null":a===undefined?"undefined":typeof a.toString===i.Function?a.toString():Object.prototype.toString.call(a)},l=function(d,c){var a=this;a.Key=d;a.Value=c;a.Prev=b;a.Next=b},j=function(){this.First=b;this.Last=b};j.prototype={AddLast:function(c){var a=this;if(a.Last!=b){a.Last.Next=c;c.Prev=a.Last;a.Last=c}else a.First=a.Last=c},Replace:function(c,a){if(c.Prev!=b){c.Prev.Next=a;a.Prev=c.Prev}else this.First=a;if(c.Next!=b){c.Next.Prev=a;a.Next=c.Next}else this.Last=a},Remove:function(a){if(a.Prev!=b)a.Prev.Next=a.Next;else this.First=a.Next;if(a.Next!=b)a.Next.Prev=a.Prev;else this.Last=a.Prev}};var k=function(c){var a=this;a.count=0;a.entryList=new j;a.buckets={};a.compareSelector=c==b?g.Identity:c};k.prototype={Add:function(i,j){var a=this,g=a.compareSelector(i),f=d(g),c=new l(i,j);if(h(a.buckets,f)){for(var b=a.buckets[f],e=0;e<b.length;e++)if(a.compareSelector(b[e].Key)===g){a.entryList.Replace(b[e],c);b[e]=c;return}b.push(c)}else a.buckets[f]=[c];a.count++;a.entryList.AddLast(c)},Get:function(i){var a=this,c=a.compareSelector(i),g=d(c);if(!h(a.buckets,g))return undefined;for(var e=a.buckets[g],b=0;b<e.length;b++){var f=e[b];if(a.compareSelector(f.Key)===c)return f.Value}return undefined},Set:function(k,m){var b=this,g=b.compareSelector(k),j=d(g);if(h(b.buckets,j))for(var f=b.buckets[j],c=0;c<f.length;c++)if(b.compareSelector(f[c].Key)===g){var i=new l(k,m);b.entryList.Replace(f[c],i);f[c]=i;return e}return a},Contains:function(j){var b=this,f=b.compareSelector(j),i=d(f);if(!h(b.buckets,i))return a;for(var g=b.buckets[i],c=0;c<g.length;c++)if(b.compareSelector(g[c].Key)===f)return e;return a},Clear:function(){this.count=0;this.buckets={};this.entryList=new j},Remove:function(g){var a=this,f=a.compareSelector(g),e=d(f);if(!h(a.buckets,e))return;for(var b=a.buckets[e],c=0;c<b.length;c++)if(a.compareSelector(b[c].Key)===f){a.entryList.Remove(b[c]);b.splice(c,1);if(b.length==0)delete a.buckets[e];a.count--;return}},Count:function(){return this.count},ToEnumerable:function(){var d=this;return new c(function(){var c;return new f(function(){c=d.entryList.First},function(){if(c!=b){var d={Key:c.Key,Value:c.Value};c=c.Next;return this.Yield(d)}return a},g.Blank)})}};return k}(),q=function(a){var b=this;b.Count=function(){return a.Count()};b.Get=function(b){return c.From(a.Get(b))};b.Contains=function(b){return a.Contains(b)};b.ToEnumerable=function(){return a.ToEnumerable().Select(function(a){return new o(a.Key,a.Value)})}},o=function(b,a){this.Key=function(){return b};h.call(this,a)};o.prototype=new h;return c}()});(function(a,b){a.fn.toEnumerable=function(){return b.From(this).Select(function(b){return a(b)})};b.prototype.TojQuery=function(){return a(this.ToArray())}})(jQuery,this.Enumerable||this.jQuery.Enumerable);(function(a){a.fn.center=function(){return this.each(function(){var c=(a(window).height()-a(this).outerHeight())/2+a(window).scrollTop(),b=(a(window).width()-a(this).outerWidth())/2+a(window).scrollLeft();a(this).css({position:"absolute",margin:0,top:(c>0?c:0)+"px",left:(b>0?b:0)+"px"})})}})(jQuery);(function(a){if(/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery)||/^1.1/.test(a.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+a.fn.jquery);return}a.fn._fadeIn=a.fn.fadeIn;var g=function(){},f=document.documentMode||0,n=a.browser.msie&&(a.browser.version<8&&!f||f<8),m=a.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!f;a.blockUI=function(a){i(window,a)};a.unblockUI=function(a){e(window,a)};a.growlUI=function(e,d,b,f){var c=a('<div class="growlUI"></div>');e&&c.append("<h2>"+e+"</h2>");d&&c.append("<h3>"+d+"</h3>");if(b==undefined)b=3e3;a.blockUI({message:c,fadeIn:700,fadeOut:1e3,centerY:false,timeout:b,showOverlay:false,onUnblock:f,css:a.blockUI.defaults.growlCSS})};a.fn.block=function(b){return this.unblock({fadeOut:0}).each(function(){if(!a.browser.mozilla&&a.css(this,"position")=="static")this.style.position="relative";if(a.browser.msie)this.style.zoom=1;i(this,b)})};a.fn.unblock=function(a){return this.each(function(){e(this,a)})};a.blockUI.version=2.33;a.blockUI.defaults={message:"<h2>Please wait...</h2>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1e3,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var c=null,b=[];function i(p,f){var i=p==window,h=f&&f.message!==undefined?f.message:undefined;f=a.extend({},a.blockUI.defaults,f||{});f.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,f.overlayCSS||{});var H=a.extend({},a.blockUI.defaults.css,f.css||{}),B=a.extend({},a.blockUI.defaults.themedCSS,f.themedCSS||{});h=h===undefined?f.message:h;i&&c&&e(window,{fadeOut:0});if(h&&typeof h!="string"&&(h.parentNode||h.jquery)){var t=h.jquery?h[0]:h,q={};a(p).data("blockUI.history",q);q.el=t;q.parent=t.parentNode;q.display=t.style.display;q.position=t.style.position;q.parent&&q.parent.removeChild(t)}var s=f.baseZ,v=a.browser.msie||f.forceIframe?a('<iframe class="blockUI" style="z-index:'+s+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+f.iframeSrc+'"></iframe>'):a('<div class="blockUI" style="display:none"></div>'),r=a('<div class="blockUI blockOverlay" style="z-index:'+s+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),k,u;if(f.theme&&i)u='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+s+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(f.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';else if(f.theme)u='<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+s+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(f.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';else if(i)u='<div class="blockUI blockMsg blockPage" style="z-index:'+s+';display:none;position:fixed"></div>';else u='<div class="blockUI blockMsg blockElement" style="z-index:'+s+';display:none;position:absolute"></div>';k=a(u);if(h)if(f.theme){k.css(B);k.addClass("ui-widget-content")}else k.css(H);(!f.applyPlatformOpacityRules||!(a.browser.mozilla&&/Linux/.test(navigator.platform)))&&r.css(f.overlayCSS);r.css("position",i?"fixed":"absolute");(a.browser.msie||f.forceIframe)&&v.css("opacity",0);var C=[v,r,k],D=i?a("body"):a(p);a.each(C,function(){this.appendTo(D)});f.theme&&f.draggable&&a.fn.draggable&&k.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var E=n&&(!a.boxModel||a("object,embed",i?null:p).length>0);if(m||E){i&&f.allowBodyStretch&&a.boxModel&&a("html,body").css("height","100%");if((m||!a.boxModel)&&!i)var A=d(p,"borderTopWidth"),z=d(p,"borderLeftWidth"),x=A?"(0 - "+A+")":0,w=z?"(0 - "+z+")":0;a.each([v,r,k],function(d,e){var a=e[0].style;a.position="absolute";if(d<2){i?a.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+f.quirksmodeOffsetHack+') + "px"'):a.setExpression("height",'this.parentNode.offsetHeight + "px"');i?a.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):a.setExpression("width",'this.parentNode.offsetWidth + "px"');w&&a.setExpression("left",w);x&&a.setExpression("top",x)}else if(f.centerY){i&&a.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');a.marginTop=0}else if(!f.centerY&&i){var c=f.css&&f.css.top?parseInt(f.css.top):0,b="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+c+') + "px"';a.setExpression("top",b)}})}if(h){if(f.theme)k.find(".ui-widget-content").append(h);else k.append(h);(h.jquery||h.nodeType)&&a(h).show()}(a.browser.msie||f.forceIframe)&&f.showOverlay&&v.show();if(f.fadeIn){var y=f.onBlock?f.onBlock:g,F=f.showOverlay&&!h?y:g,G=h?y:g;f.showOverlay&&r._fadeIn(f.fadeIn,F);h&&k._fadeIn(f.fadeIn,G)}else{f.showOverlay&&r.show();h&&k.show();f.onBlock&&f.onBlock()}l(1,p,f);if(i){c=k[0];b=a(":input:enabled:visible",c);f.focusInput&&setTimeout(j,20)}else o(k[0],f.centerX,f.centerY);if(f.timeout){var I=setTimeout(function(){i?a.unblockUI(f):a(p).unblock(f)},f.timeout);a(p).data("blockUI.timeout",I)}}function e(e,d){var i=e==window,g=a(e),h=g.data("blockUI.history"),j=g.data("blockUI.timeout");if(j){clearTimeout(j);g.removeData("blockUI.timeout")}d=a.extend({},a.blockUI.defaults,d||{});l(0,e,d);var f;if(i)f=a("body").children().filter(".blockUI").add("body > .blockUI");else f=a(".blockUI",e);if(i)c=b=null;if(d.fadeOut){f.fadeOut(d.fadeOut);setTimeout(function(){k(f,h,d,e)},d.fadeOut)}else k(f,h,d,e)}function k(e,b,c,d){e.each(function(){this.parentNode&&this.parentNode.removeChild(this)});if(b&&b.el){b.el.style.display=b.display;b.el.style.position=b.position;b.parent&&b.parent.appendChild(b.el);a(d).removeData("blockUI.history")}typeof c.onUnblock=="function"&&c.onUnblock(d,c)}function l(b,i,e){var d=i==window,g=a(i);if(!b&&(d&&!c||!d&&!g.data("blockUI.isBlocked")))return;!d&&g.data("blockUI.isBlocked",b);if(!e.bindEvents||b&&!e.showOverlay)return;var f="mousedown mouseup keydown keypress";b?a(document).bind(f,e,h):a(document).unbind(f,h)}function h(d){if(d.keyCode&&d.keyCode==9)if(c&&d.data.constrainTabKey){var e=b,g=!d.shiftKey&&d.target==e[e.length-1],f=d.shiftKey&&d.target==e[0];if(g||f){setTimeout(function(){j(f)},10);return false}}if(a(d.target).parents("div.blockMsg").length>0)return true;return a(d.target).parents().children().filter("div.blockUI").length==0}function j(c){if(!b)return;var a=b[c===true?b.length-1:0];a&&a.focus()}function o(a,g,h){var b=a.parentNode,e=a.style,c=(b.offsetWidth-a.offsetWidth)/2-d(b,"borderLeftWidth"),f=(b.offsetHeight-a.offsetHeight)/2-d(b,"borderTopWidth");if(g)e.left=c>0?c+"px":"0";if(h)e.top=f>0?f+"px":"0"}function d(b,c){return parseInt(a.css(b,c))||0}})(jQuery);(function($){$.formatCurrency={};$.formatCurrency.regions=[];$.formatCurrency.regions[""]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};
$.fn.formatCurrency=function(destination,settings){if(arguments.length==1&&typeof destination!=="string"){settings=destination;destination=false
}var defaults={name:"formatCurrency",colorize:false,region:"",global:true,roundToDecimalPlace:2,eventOnDecimalsEntered:false};defaults=$.extend(defaults,$.formatCurrency.regions[""]);
if(settings.region.length>0){settings=$.extend(defaults,getRegionOrCulture(settings.region),settings);}else{settings=$.extend(defaults, settings);}settings.regex=generateRegex(settings);
return this.each(function(){$this=$(this);var num="0";num=$this[$this.is("input, select, textarea")?"val":"html"]();if(num.search("\\(")>=0){num="-"+num
}if(num===""||(num==="-"&&settings.roundToDecimalPlace===-1)){return}if(isNaN(num)){num=num.replace(settings.regex,"");if(num===""||(num==="-"&&settings.roundToDecimalPlace===-1)){return
}if(settings.decimalSymbol!="."){num=num.replace(settings.decimalSymbol,".")}if(isNaN(num)){num="0"}}var numParts=String(num).split(".");var isPositive=(num==Math.abs(num));
var hasDecimals=(numParts.length>1);var decimals=(hasDecimals?numParts[1].toString():"0");var originalDecimals=decimals;num=Math.abs(numParts[0]);
num=isNaN(num)?0:num;if(settings.roundToDecimalPlace>=0){decimals=parseFloat("1."+decimals);decimals=decimals.toFixed(settings.roundToDecimalPlace);
if(decimals.substring(0,1)=="2"){num=Number(num)+1}decimals=decimals.substring(2)}num=String(num);if(settings.groupDigits){for(var i=0;i<Math.floor((num.length-(1+i))/3);
i++){num=num.substring(0,num.length-(4*i+3))+settings.digitGroupSymbol+num.substring(num.length-(4*i+3))}}if((hasDecimals&&settings.roundToDecimalPlace==-1)||settings.roundToDecimalPlace>0){num+=settings.decimalSymbol+decimals
}var format=isPositive?settings.positiveFormat:settings.negativeFormat;var money=format.replace(/%s/g,settings.symbol);money=money.replace(/%n/g,num);
var $destination=$([]);if(!destination){$destination=$this}else{$destination=$(destination)}$destination[$destination.is("input, select, textarea")?"val":"html"](money);
if(hasDecimals&&settings.eventOnDecimalsEntered&&originalDecimals.length>settings.roundToDecimalPlace){$destination.trigger("decimalsEntered",originalDecimals)
}if(settings.colorize){$destination.css("color",isPositive?"black":"red")}})};$.fn.toNumber=function(settings){var defaults=$.extend({name:"toNumber",region:"",global:true},$.formatCurrency.regions[""]);
settings=jQuery.extend(defaults,settings);if(settings.region.length>0){settings=$.extend(settings,getRegionOrCulture(settings.region))}settings.regex=generateRegex(settings);
return this.each(function(){var method=$(this).is("input, select, textarea")?"val":"html";$(this)[method]($(this)[method]().replace("(","(-").replace(settings.regex,""))
})};$.fn.asNumber=function(settings){var defaults=$.extend({name:"asNumber",region:"",parse:true,parseType:"Float",global:true},$.formatCurrency.regions[""]);
settings=jQuery.extend(defaults,settings);if(settings.region.length>0){settings=$.extend(settings,getRegionOrCulture(settings.region))}settings.regex=generateRegex(settings);
settings.parseType=validateParseType(settings.parseType);var method=$(this).is("input, select, textarea")?"val":"html";var num=$(this)[method]();
num=num?num:"";num=num.replace("(","(-");num=num.replace(settings.regex,"");if(!settings.parse){return num}if(num.length==0){num="0"}if(settings.decimalSymbol!="."){num=num.replace(settings.decimalSymbol,".")
}return window["parse"+settings.parseType](num)};function getRegionOrCulture(region){var regionInfo=$.formatCurrency.regions[region];if(regionInfo){return regionInfo
}else{if(/(\w+)-(\w+)/g.test(region)){var culture=region.replace(/(\w+)-(\w+)/g,"$1");return $.formatCurrency.regions[culture]}}return null}function validateParseType(parseType){switch(parseType.toLowerCase()){case"int":return"Int";
case"float":return"Float";default:throw"invalid parseType"}}function generateRegex(settings){if(settings.symbol===""){return new RegExp("[^\\d"+settings.decimalSymbol+"-]","g")
}else{var symbol=settings.symbol.replace("$","\\$").replace(".","\\.");return new RegExp(symbol+"|[^\\d"+settings.decimalSymbol+"-]","g")}}})(jQuery);;(function(a){a.formatCurrency.regions["af-ZA"]={symbol:"R",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["am-ET"]={symbol:"ETB",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-AE"]={symbol:"د.إ.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-BH"]={symbol:"د.ب.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-DZ"]={symbol:"د.ج.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-EG"]={symbol:"ج.م.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-IQ"]={symbol:"د.ع.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-JO"]={symbol:"د.ا.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-KW"]={symbol:"د.ك.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-LB"]={symbol:"ل.ل.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-LY"]={symbol:"د.ل.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-MA"]={symbol:"د.م.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-OM"]={symbol:"ر.ع.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-QA"]={symbol:"ر.ق.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-SA"]={symbol:"ر.س.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-SY"]={symbol:"ل.س.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-TN"]={symbol:"د.ت.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ar-YE"]={symbol:"ر.ي.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["arn-CL"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["as-IN"]={symbol:"ট",positiveFormat:"%n%s",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["az-Cyrl-AZ"]={symbol:"ман.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["az-Latn-AZ"]={symbol:"man.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["ba-RU"]={symbol:"һ.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["be-BY"]={symbol:"р.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["bg-BG"]={symbol:"лв",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["bn-BD"]={symbol:"৳",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["bn-IN"]={symbol:"টা",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["bo-CN"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["br-FR"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["bs-Cyrl-BA"]={symbol:"КМ",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["bs-Latn-BA"]={symbol:"KM",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["ca-ES"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["co-FR"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["cs-CZ"]={symbol:"Kč",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["cy-GB"]={symbol:"£",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["da-DK"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["de-AT"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["de-CH"]={symbol:"SFr.",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:"'",groupDigits:true};a.formatCurrency.regions["de-DE"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["de-LI"]={symbol:"CHF",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:"'",groupDigits:true};a.formatCurrency.regions["de-LU"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["de"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["dsb-DE"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["dv-MV"]={symbol:"ރ.",positiveFormat:"%n %s",negativeFormat:"%n %s-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["el-GR"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["en-029"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-AU"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-BZ"]={symbol:"BZ$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-CA"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-GB"]={symbol:"£",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-IE"]={symbol:"€",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-IN"]={symbol:"Rs.",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-JM"]={symbol:"J$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-MY"]={symbol:"RM",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-NZ"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-PH"]={symbol:"Php",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-SG"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-TT"]={symbol:"TT$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-US"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-ZA"]={symbol:"R",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["en-ZW"]={symbol:"Z$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-AR"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-BO"]={symbol:"$b",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-CL"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-CO"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-CR"]={symbol:"₡",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-DO"]={symbol:"RD$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-EC"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-ES"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-GT"]={symbol:"Q",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-HN"]={symbol:"L.",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-MX"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-NI"]={symbol:"C$",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-PA"]={symbol:"B/.",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-PE"]={symbol:"S/.",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-PR"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-PY"]={symbol:"Gs",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-SV"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-US"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["es-UY"]={symbol:"$U",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es-VE"]={symbol:"Bs",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["es"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["et-EE"]={symbol:"kr",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:".",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["eu-ES"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["fa-IR"]={symbol:"ريال",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:"/",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["fi-FI"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["fil-PH"]={symbol:"PhP",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["fo-FO"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["fr-BE"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["fr-CA"]={symbol:"$",positiveFormat:"%n %s",negativeFormat:"(%n %s)",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["fr-CH"]={symbol:"SFr.",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:"'",groupDigits:true};a.formatCurrency.regions["fr-FR"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["fr-LU"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["fr-MC"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["fr"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["fy-NL"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["ga-IE"]={symbol:"€",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["gl-ES"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["gsw-FR"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["gu-IN"]={symbol:"રૂ",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ha-Latn-NG"]={symbol:"N",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["he-IL"]={symbol:"₪",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["hi-IN"]={symbol:"रु",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["hr-BA"]={symbol:"KM",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["hr-HR"]={symbol:"kn",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["hsb-DE"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["hu-HU"]={symbol:"Ft",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["hy-AM"]={symbol:"դր.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["id-ID"]={symbol:"Rp",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["ig-NG"]={symbol:"N",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ii-CN"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["is-IS"]={symbol:"kr.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["it-CH"]={symbol:"SFr.",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:"'",groupDigits:true};a.formatCurrency.regions["it-IT"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["it"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["iu-Cans-CA"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["iu-Latn-CA"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ja-JP"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ja"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ka-GE"]={symbol:"Lari",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["kk-KZ"]={symbol:"Т",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:"-",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["kl-GL"]={symbol:"kr.",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["km-KH"]={symbol:"៛",positiveFormat:"%n%s",negativeFormat:"-%n%s",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["kn-IN"]={symbol:"ರೂ",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ko-KR"]={symbol:"₩",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["kok-IN"]={symbol:"रु",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ky-KG"]={symbol:"сом",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:"-",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["lb-LU"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["lo-LA"]={symbol:"₭",positiveFormat:"%n%s",negativeFormat:"(%n%s)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["lt-LT"]={symbol:"Lt",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["lv-LV"]={symbol:"Ls",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["mi-NZ"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["mk-MK"]={symbol:"ден.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["ml-IN"]={symbol:"ക",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["mn-MN"]={symbol:"₮",positiveFormat:"%n%s",negativeFormat:"-%n%s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["mn-Mong-CN"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["moh-CA"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["mr-IN"]={symbol:"रु",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ms-BN"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["ms-MY"]={symbol:"R",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["mt-MT"]={symbol:"Lm",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["nb-NO"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["ne-NP"]={symbol:"रु",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["nl-BE"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["nl-NL"]={symbol:"€",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["nn-NO"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["nso-ZA"]={symbol:"R",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["oc-FR"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["or-IN"]={symbol:"ଟ",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["pa-IN"]={symbol:"ਰੁ",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["pl-PL"]={symbol:"zł",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["prs-AF"]={symbol:"؋",positiveFormat:"%s%n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ps-AF"]={symbol:"؋",positiveFormat:"%s%n",negativeFormat:"%s%n-",decimalSymbol:"٫",digitGroupSymbol:"٬",groupDigits:true};a.formatCurrency.regions["pt-BR"]={symbol:"R$",positiveFormat:"%s %n",negativeFormat:"-%s %n",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["pt-PT"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["qut-GT"]={symbol:"Q",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["quz-BO"]={symbol:"$b",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["quz-EC"]={symbol:"$",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["quz-PE"]={symbol:"S/.",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["rm-CH"]={symbol:"fr.",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:"'",groupDigits:true};a.formatCurrency.regions["ro-RO"]={symbol:"lei",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["ru-RU"]={symbol:"р.",positiveFormat:"%n%s",negativeFormat:"-%n%s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["rw-RW"]={symbol:"RWF",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["sa-IN"]={symbol:"रु",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["sah-RU"]={symbol:"с.",positiveFormat:"%n%s",negativeFormat:"-%n%s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["se-FI"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["se-NO"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["se-SE"]={symbol:"kr",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["si-LK"]={symbol:"රු.",positiveFormat:"%s %n",negativeFormat:"(%s %n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["sk-SK"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["sl-SI"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sma-NO"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["sma-SE"]={symbol:"kr",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["smj-NO"]={symbol:"kr",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["smj-SE"]={symbol:"kr",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["smn-FI"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["sms-FI"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["sq-AL"]={symbol:"Lek",positiveFormat:"%n%s",negativeFormat:"-%n%s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sr-Cyrl-BA"]={symbol:"КМ",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sr-Cyrl-CS"]={symbol:"Дин.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sr-Latn-BA"]={symbol:"KM",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sr-Latn-CS"]={symbol:"Din.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sv-FI"]={symbol:"€",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["sv-SE"]={symbol:"kr",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["sw-KE"]={symbol:"S",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["syr-SY"]={symbol:"ل.س.‏",positiveFormat:"%s %n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ta-IN"]={symbol:"ரூ",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["te-IN"]={symbol:"రూ",positiveFormat:"%s %n",negativeFormat:"%s -%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["tg-Cyrl-TJ"]={symbol:"т.р.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:";",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["th-TH"]={symbol:"฿",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["tk-TM"]={symbol:"m.",positiveFormat:"%n%s",negativeFormat:"-%n%s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["tn-ZA"]={symbol:"R",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["tr-TR"]={symbol:"TL",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["tt-RU"]={symbol:"р.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["tzm-Latn-DZ"]={symbol:"DZD",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["ug-CN"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["uk-UA"]={symbol:"грн.",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["ur-PK"]={symbol:"Rs",positiveFormat:"%s%n",negativeFormat:"%s%n-",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["uz-Cyrl-UZ"]={symbol:"сўм",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["uz-Latn-UZ"]={symbol:"su'm",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["vi-VN"]={symbol:"₫",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:".",groupDigits:true};a.formatCurrency.regions["wo-SN"]={symbol:"XOF",positiveFormat:"%n %s",negativeFormat:"-%n %s",decimalSymbol:",",digitGroupSymbol:" ",groupDigits:true};a.formatCurrency.regions["xh-ZA"]={symbol:"R",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["yo-NG"]={symbol:"N",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zh-CN"]={symbol:"￥",positiveFormat:"%s%n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zh-HK"]={symbol:"HK$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zh-MO"]={symbol:"MOP",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zh-SG"]={symbol:"$",positiveFormat:"%s%n",negativeFormat:"(%s%n)",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zh-TW"]={symbol:"NT$",positiveFormat:"%s%n",negativeFormat:"-%s%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zh"]={symbol:"¥",positiveFormat:"%s%n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true};a.formatCurrency.regions["zu-ZA"]={symbol:"R",positiveFormat:"%s %n",negativeFormat:"%s-%n",decimalSymbol:".",digitGroupSymbol:",",groupDigits:true}})(jQuery);(function(b){var c=b["document"],a=b["jQuery"];a.fn["printElement"]=function(c){var b=a.extend({},a.fn["printElement"]["defaults"],c);if(b["printMode"]=="iframe")if(a.browser.opera||/chrome/.test(navigator.userAgent.toLowerCase()))b["printMode"]="popup";a("[id^='printElement_']").remove();return this.each(function(){var c=a.meta?a.extend({},b,a(this).data()):b;f(a(this),c)})};a.fn["printElement"]["defaults"]={printMode:"iframe",pageTitle:"",overrideElementCSS:null,overrideElementJS:null,printBodyOptions:{styleToAdd:"padding:10px;margin:10px;",classNameToAdd:""},leaveOpen:false,iframeElementOptions:{styleToAdd:"border:none;position:absolute;width:0px;height:0px;bottom:0px;left:0px;",classNameToAdd:""}};a.fn["printElement"]["cssElement"]={href:"",media:""};function f(k,i){var l=h(k,i),g=null,e=null;if(i["printMode"].toLowerCase()=="popup"){g=b.open("about:blank","printElementWindow","width=650,height=440,scrollbars=yes");e=g.document}else{var j="printElement_"+Math.round(Math.random()*99999).toString(),f=c.createElement("IFRAME");a(f).attr({style:i["iframeElementOptions"]["styleToAdd"],id:j,className:i["iframeElementOptions"]["classNameToAdd"],frameBorder:0,scrolling:"no",src:"about:blank"});c.body.appendChild(f);e=f.contentWindow||f.contentDocument;if(e.document)e=e.document;f=c.frames?c.frames[j]:c.getElementById(j);g=f.contentWindow||f}focus();e.open();e.write(l);e.close();d(g)}function d(a){if(a&&a["printPage"])a["printPage"]();else setTimeout(function(){d(a)},50)}function e(d){var b=a(d);a(":checked",b).each(function(){this.setAttribute("checked","checked")});a("input[type='text']",b).each(function(){this.setAttribute("value",a(this).val())});a("select",b).each(function(){var b=a(this);a("option",b).each(function(){b.val()==a(this).val()&&this.setAttribute("selected","selected")})});a("textarea",b).each(function(){var b=a(this).attr("value");if(a.browser.mozilla&&this.firstChild)this.firstChild.textContent=b;else this.innerHTML=b});var c=a("<div></div>").append(b.clone()).html();return c}function g(){var a=b.location.port?":"+b.location.port:"";return b.location.protocol+"//"+b.location.hostname+a+b.location.pathname}function h(i,b){var k=a(i),j=e(i),d=[];d.push("<html><head><title>"+b["pageTitle"]+"</title>");if(b["overrideElementCSS"]){if(b["overrideElementCSS"].length>0)for(var h=0;h<b["overrideElementCSS"].length;h++){var f=b["overrideElementCSS"][h];if(typeof f=="string")d.push('<link type="text/css" rel="stylesheet" href="'+f+'" >');else d.push('<link type="text/css" rel="stylesheet" href="'+f["href"]+'" media="'+f["media"]+'" >')}}else a("link",c).filter(function(){return a(this).attr("rel").toLowerCase()=="stylesheet"}).each(function(){d.push('<link type="text/css" rel="stylesheet" href="'+a(this).attr("href")+'" media="'+a(this).attr("media")+'" >')});if(b["overrideElementJS"])if(b["overrideElementJS"].length>0)for(var h=0;h<b["overrideElementJS"].length;h++){var f=b["overrideElementJS"][h];if(typeof f=="string")d.push('<script type="text/javascript" src="'+f+('" ></sc'+"ript>"));else d.push('<script type="text/javascript" src="'+f["src"]+('" ></sc'+"ript>"))}d.push('<base href="'+g()+'" />');d.push('</head><body style="'+b["printBodyOptions"]["styleToAdd"]+'" class="'+b["printBodyOptions"]["classNameToAdd"]+'">');d.push('<div class="'+k.attr("class")+'">'+j+"</div>");d.push('<script type="text/javascript">function printPage(){focus();setTimeout("print();'+(!a.browser.opera&&!b["leaveOpen"]&&b["printMode"].toLowerCase()=="popup"?"close();":"")+('",500);}</sc'+"ript>"));d.push("</body></html>");return d.join("")}})(window);/*
* jScrollPane - v2.0.0beta9 - 2011-02-04
* http://jscrollpane.kelvinluck.com/
*
* Copyright (c) 2010 Kelvin Luck
* Dual licensed under the MIT and GPL licenses.
*/
(function (b, a, c)
{
    b.fn.jScrollPane = function (f)
    {
        function d(D, N)
        {
            var ay, P = this, X, aj, w, al, S, Y, z, r, az, aE, au, j, I, i, k, Z, T, ap, W, u, B, aq, ae, am, G, m, at, ax, y, av, aH, g, K, ai = true, O = true, aG = false, l = false, ao = D.clone(false, false).empty(), ab = b.fn.mwheelIntent ? "mwheelIntent.jsp" : "mousewheel.jsp"; aH = D.css("paddingTop") + " " + D.css("paddingRight") + " " + D.css("paddingBottom") + " " + D.css("paddingLeft"); g = (parseInt(D.css("paddingLeft"), 10) || 0) + (parseInt(D.css("paddingRight"), 10) || 0); function ar(aQ) { var aO, aP, aK, aM, aL, aJ, aI, aN; ay = aQ; if (X === c) { aI = D.scrollTop(); aN = D.scrollLeft(); D.css({ overflow: "hidden", padding: 0 }); aj = D.innerWidth() + g; w = D.innerHeight(); D.width(aj); X = b('<div class="jspPane" />').css("padding", aH).append(D.children()); al = b('<div class="jspContainer" />').css({ width: aj + "px", height: w + "px" }).append(X).appendTo(D) } else { D.css("width", ""); aJ = D.innerWidth() + g != aj || D.outerHeight() != w; if (aJ) { aj = D.innerWidth() + g; w = D.innerHeight(); al.css({ width: aj + "px", height: w + "px" }) } if (!aJ && K == S && X.outerHeight() == Y) { D.width(aj); return } K = S; X.css("width", ""); D.width(aj); al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end() } aO = X.clone(false, false).css("position", "absolute"); aP = b('<div style="width:1px; position: relative;" />').append(aO); b("body").append(aP); S = Math.max(X.outerWidth(), aO.outerWidth()); aP.remove(); Y = X.outerHeight(); z = S / aj; r = Y / w; az = r > 1; aE = z > 1; if (!(aE || az)) { D.removeClass("jspScrollable"); X.css({ top: 0, width: al.width() - g }); o(); E(); Q(); x(); ah() } else { D.addClass("jspScrollable"); aK = ay.maintainPosition && (I || Z); if (aK) { aM = aC(); aL = aA() } aF(); A(); F(); if (aK) { M(aM, false); L(aL, false) } J(); af(); an(); if (ay.enableKeyboardNavigation) { R() } if (ay.clickOnTrack) { q() } C(); if (ay.hijackInternalLinks) { n() } } if (ay.autoReinitialise && !av) { av = setInterval(function () { ar(ay) }, ay.autoReinitialiseDelay) } else { if (!ay.autoReinitialise && av) { clearInterval(av) } } aI && D.scrollTop(0) && L(aI, false); aN && D.scrollLeft(0) && M(aN, false); D.trigger("jsp-initialised", [aE || az]) } function aF() { if (az) { al.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'), b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'), b('<div class="jspDragBottom" />'))), b('<div class="jspCap jspCapBottom" />'))); T = al.find(">.jspVerticalBar"); ap = T.find(">.jspTrack"); au = ap.find(">.jspDrag"); if (ay.showArrows) { aq = b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp", aD(0, -1)).bind("click.jsp", aB); ae = b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp", aD(0, 1)).bind("click.jsp", aB); if (ay.arrowScrollOnHover) { aq.bind("mouseover.jsp", aD(0, -1, aq)); ae.bind("mouseover.jsp", aD(0, 1, ae)) } ak(ap, ay.verticalArrowPositions, aq, ae) } u = w; al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function () { u -= b(this).outerHeight() }); au.hover(function () { au.addClass("jspHover") }, function () { au.removeClass("jspHover") }).bind("mousedown.jsp", function (aI) { b("html").bind("dragstart.jsp selectstart.jsp", aB); au.addClass("jspActive"); var s = aI.pageY - au.position().top; b("html").bind("mousemove.jsp", function (aJ) { U(aJ.pageY - s, false) }).bind("mouseup.jsp mouseleave.jsp", aw); return false }); p() } } function p() { ap.height(u + "px"); I = 0; W = ay.verticalGutter + ap.outerWidth(); X.width(aj - W - g); if (T.position().left === 0) { X.css("margin-left", W + "px") } } function A()
            {
                if (aE)
                {
                    al.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'), b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'), b('<div class="jspDragRight" />'))), b('<div class="jspCap jspCapRight" />'))); am = al.find(">.jspHorizontalBar"); G = am.find(">.jspTrack"); i = G.find(">.jspDrag"); if (ay.showArrows)
                    {
                        ax = b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp", aD(-1, 0)).bind("click.jsp", aB); y = b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp", aD(1, 0)).bind("click.jsp", aB);
                        if (ay.arrowScrollOnHover) { ax.bind("mouseover.jsp", aD(-1, 0, ax)); y.bind("mouseover.jsp", aD(1, 0, y)) } ak(G, ay.horizontalArrowPositions, ax, y)
                    } i.hover(function () { i.addClass("jspHover") }, function () { i.removeClass("jspHover") }).bind("mousedown.jsp", function (aI) { b("html").bind("dragstart.jsp selectstart.jsp", aB); i.addClass("jspActive"); var s = aI.pageX - i.position().left; b("html").bind("mousemove.jsp", function (aJ) { V(aJ.pageX - s, false) }).bind("mouseup.jsp mouseleave.jsp", aw); return false }); m = al.innerWidth(); ag()
                } 
            } function ag() { al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function () { m -= b(this).outerWidth() }); G.width(m + "px"); Z = 0 } function F() { if (aE && az) { var aI = G.outerHeight(), s = ap.outerWidth(); u -= aI; b(am).find(">.jspCap:visible,>.jspArrow").each(function () { m += b(this).outerWidth() }); m -= s; w -= s; aj -= aI; G.parent().append(b('<div class="jspCorner" />').css("width", aI + "px")); p(); ag() } if (aE) { X.width((al.outerWidth() - g) + "px") } Y = X.outerHeight(); r = Y / w; if (aE) { at = Math.ceil(1 / z * m); if (at > ay.horizontalDragMaxWidth) { at = ay.horizontalDragMaxWidth } else { if (at < ay.horizontalDragMinWidth) { at = ay.horizontalDragMinWidth } } i.width(at + "px"); k = m - at; ad(Z) } if (az) { B = Math.ceil(1 / r * u); if (B > ay.verticalDragMaxHeight) { B = ay.verticalDragMaxHeight } else { if (B < ay.verticalDragMinHeight) { B = ay.verticalDragMinHeight } } au.height(B + "px"); j = u - B; ac(I) } } function ak(aJ, aL, aI, s) { var aN = "before", aK = "after", aM; if (aL == "os") { aL = /Mac/.test(navigator.platform) ? "after" : "split" } if (aL == aN) { aK = aL } else { if (aL == aK) { aN = aL; aM = aI; aI = s; s = aM } } aJ[aN](aI)[aK](s) } function aD(aI, s, aJ) { return function () { H(aI, s, this, aJ); this.blur(); return false } } function H(aL, aK, aO, aN) { aO = b(aO).addClass("jspActive"); var aM, aJ, aI = true, s = function () { if (aL !== 0) { P.scrollByX(aL * ay.arrowButtonSpeed) } if (aK !== 0) { P.scrollByY(aK * ay.arrowButtonSpeed) } aJ = setTimeout(s, aI ? ay.initialDelay : ay.arrowRepeatFreq); aI = false }; s(); aM = aN ? "mouseout.jsp" : "mouseup.jsp"; aN = aN || b("html"); aN.bind(aM, function () { aO.removeClass("jspActive"); aJ && clearTimeout(aJ); aJ = null; aN.unbind(aM) }) } function q() { x(); if (az) { ap.bind("mousedown.jsp", function (aN) { if (aN.originalTarget === c || aN.originalTarget == aN.currentTarget) { var aL = b(this), aO = aL.offset(), aM = aN.pageY - aO.top - I, aJ, aI = true, s = function () { var aR = aL.offset(), aS = aN.pageY - aR.top - B / 2, aP = w * ay.scrollPagePercent, aQ = j * aP / (Y - w); if (aM < 0) { if (I - aQ > aS) { P.scrollByY(-aP) } else { U(aS) } } else { if (aM > 0) { if (I + aQ < aS) { P.scrollByY(aP) } else { U(aS) } } else { aK(); return } } aJ = setTimeout(s, aI ? ay.initialDelay : ay.trackClickRepeatFreq); aI = false }, aK = function () { aJ && clearTimeout(aJ); aJ = null; b(document).unbind("mouseup.jsp", aK) }; s(); b(document).bind("mouseup.jsp", aK); return false } }) } if (aE) { G.bind("mousedown.jsp", function (aN) { if (aN.originalTarget === c || aN.originalTarget == aN.currentTarget) { var aL = b(this), aO = aL.offset(), aM = aN.pageX - aO.left - Z, aJ, aI = true, s = function () { var aR = aL.offset(), aS = aN.pageX - aR.left - at / 2, aP = aj * ay.scrollPagePercent, aQ = k * aP / (S - aj); if (aM < 0) { if (Z - aQ > aS) { P.scrollByX(-aP) } else { V(aS) } } else { if (aM > 0) { if (Z + aQ < aS) { P.scrollByX(aP) } else { V(aS) } } else { aK(); return } } aJ = setTimeout(s, aI ? ay.initialDelay : ay.trackClickRepeatFreq); aI = false }, aK = function () { aJ && clearTimeout(aJ); aJ = null; b(document).unbind("mouseup.jsp", aK) }; s(); b(document).bind("mouseup.jsp", aK); return false } }) } } function x() { if (G) { G.unbind("mousedown.jsp") } if (ap) { ap.unbind("mousedown.jsp") } } function aw() { b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"); if (au) { au.removeClass("jspActive") } if (i) { i.removeClass("jspActive") } } function U(s, aI) { if (!az) { return } if (s < 0) { s = 0 } else { if (s > j) { s = j } } if (aI === c) { aI = ay.animateScroll } if (aI) { P.animate(au, "top", s, ac) } else { au.css("top", s); ac(s) } } function ac(aI) { if (aI === c) { aI = au.position().top } al.scrollTop(0); I = aI; var aL = I === 0, aJ = I == j, aK = aI / j, s = -aK * (Y - w); if (ai != aL || aG != aJ) { ai = aL; aG = aJ; D.trigger("jsp-arrow-change", [ai, aG, O, l]) } v(aL, aJ); X.css("top", s); D.trigger("jsp-scroll-y", [-s, aL, aJ]).trigger("scroll") } function V(aI, s)
            {
                if (!aE) { return } if (aI < 0) { aI = 0 } else { if (aI > k) { aI = k } } if (s === c) { s = ay.animateScroll } if (s)
                {
                    P.animate(i, "left", aI, ad)
                } else { i.css("left", aI); ad(aI) } 
            } function ad(aI) { if (aI === c) { aI = i.position().left } al.scrollTop(0); Z = aI; var aL = Z === 0, aK = Z == k, aJ = aI / k, s = -aJ * (S - aj); if (O != aL || l != aK) { O = aL; l = aK; D.trigger("jsp-arrow-change", [ai, aG, O, l]) } t(aL, aK); X.css("left", s); D.trigger("jsp-scroll-x", [-s, aL, aK]).trigger("scroll") } function v(aI, s) { if (ay.showArrows) { aq[aI ? "addClass" : "removeClass"]("jspDisabled"); ae[s ? "addClass" : "removeClass"]("jspDisabled") } } function t(aI, s) { if (ay.showArrows) { ax[aI ? "addClass" : "removeClass"]("jspDisabled"); y[s ? "addClass" : "removeClass"]("jspDisabled") } } function L(s, aI) { var aJ = s / (Y - w); U(aJ * j, aI) } function M(aI, s) { var aJ = aI / (S - aj); V(aJ * k, s) } function aa(aU, aP, aJ) { var aN, aK, aL, s = 0, aT = 0, aI, aO, aR, aQ, aS; try { aN = b(aU) } catch (aM) { return } aK = aN.outerHeight(); aL = aN.outerWidth(); al.scrollTop(0); al.scrollLeft(0); while (!aN.is(".jspPane")) { s += aN.position().top; aT += aN.position().left; aN = aN.offsetParent(); if (/^body|html$/i.test(aN[0].nodeName)) { return } } aI = aA(); aO = aI + w; if (s < aI || aP) { aQ = s - ay.verticalGutter } else { if (s + aK > aO) { aQ = s - w + aK + ay.verticalGutter } } if (aQ) { L(aQ, aJ) } viewportLeft = aC(); aR = viewportLeft + aj; if (aT < viewportLeft || aP) { aS = aT - ay.horizontalGutter } else { if (aT + aL > aR) { aS = aT - aj + aL + ay.horizontalGutter } } if (aS) { M(aS, aJ) } } function aC() { return -X.position().left } function aA() { return -X.position().top } function af() { al.unbind(ab).bind(ab, function (aL, aM, aK, aI) { var aJ = Z, s = I; P.scrollBy(aK * ay.mouseWheelSpeed, -aI * ay.mouseWheelSpeed, false); return aJ == Z && s == I }) } function o() { al.unbind(ab) } function aB() { return false } function J() { X.find(":input,a").unbind("focus.jsp").bind("focus.jsp", function (s) { aa(s.target, false) }) } function E() { X.find(":input,a").unbind("focus.jsp") } function R() { var s, aI; X.focus(function () { D.focus() }); D.attr("tabindex", 0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp", function (aM) { if (aM.target !== this) { return } var aL = Z, aK = I; switch (aM.keyCode) { case 40: case 38: case 34: case 32: case 33: case 39: case 37: s = aM.keyCode; aJ(); break; case 35: L(Y - w); s = null; break; case 36: L(0); s = null; break } aI = aM.keyCode == s && aL != Z || aK != I; return !aI }).bind("keypress.jsp", function (aK) { if (aK.keyCode == s) { aJ() } return !aI }); if (ay.hideFocus) { D.css("outline", "none"); if ("hideFocus" in al[0]) { D.attr("hideFocus", true) } } else { D.css("outline", ""); if ("hideFocus" in al[0]) { D.attr("hideFocus", false) } } function aJ() { var aL = Z, aK = I; switch (s) { case 40: P.scrollByY(ay.keyboardSpeed, false); break; case 38: P.scrollByY(-ay.keyboardSpeed, false); break; case 34: case 32: P.scrollByY(w * ay.scrollPagePercent, false); break; case 33: P.scrollByY(-w * ay.scrollPagePercent, false); break; case 39: P.scrollByX(ay.keyboardSpeed, false); break; case 37: P.scrollByX(-ay.keyboardSpeed, false); break } aI = aL != Z || aK != I; return aI } } function Q() { D.attr("tabindex", "-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp") } function C() { if (location.hash && location.hash.length > 1) { var aJ, aI; try { aJ = b(location.hash) } catch (s) { return } if (aJ.length && X.find(location.hash)) { if (al.scrollTop() === 0) { aI = setInterval(function () { if (al.scrollTop() > 0) { aa(location.hash, true); b(document).scrollTop(al.position().top); clearInterval(aI) } }, 50) } else { aa(location.hash, true); b(document).scrollTop(al.position().top) } } } } function ah() { b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack") } function n() { ah(); b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack", function () { var s = this.href.split("#"), aI; if (s.length > 1) { aI = s[1]; if (aI.length > 0 && X.find("#" + aI).length > 0) { aa("#" + aI, true); return false } } }) } function an() { var aJ, aI, aL, aK, aM, s = false; al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp", function (aN) { var aO = aN.originalEvent.touches[0]; aJ = aC(); aI = aA(); aL = aO.pageX; aK = aO.pageY; aM = false; s = true }).bind("touchmove.jsp", function (aQ) { if (!s) { return } var aP = aQ.originalEvent.touches[0], aO = Z, aN = I; P.scrollTo(aJ + aL - aP.pageX, aI + aK - aP.pageY); aM = aM || Math.abs(aL - aP.pageX) > 5 || Math.abs(aK - aP.pageY) > 5; return aO == Z && aN == I }).bind("touchend.jsp", function (aN) { s = false }).bind("click.jsp-touchclick", function (aN) { if (aM) { aM = false; return false } }) } function h()
            {
                var s = aA(), aI = aC();
                D.removeClass("jspScrollable").unbind(".jsp"); D.replaceWith(ao.append(X.children())); ao.scrollTop(s); ao.scrollLeft(aI)
            } b.extend(P, { reinitialise: function (aI) { aI = b.extend({}, ay, aI); ar(aI) }, scrollToElement: function (aJ, aI, s) { aa(aJ, aI, s) }, scrollTo: function (aJ, s, aI) { M(aJ, aI); L(s, aI) }, scrollToX: function (aI, s) { M(aI, s) }, scrollToY: function (s, aI) { L(s, aI) }, scrollToPercentX: function (aI, s) { M(aI * (S - aj), s) }, scrollToPercentY: function (aI, s) { L(aI * (Y - w), s) }, scrollBy: function (aI, s, aJ) { P.scrollByX(aI, aJ); P.scrollByY(s, aJ) }, scrollByX: function (s, aJ) { var aI = aC() + s, aK = aI / (S - aj); V(aK * k, aJ) }, scrollByY: function (s, aJ) { var aI = aA() + s, aK = aI / (Y - w); U(aK * j, aJ) }, positionDragX: function (s, aI) { V(s, aI) }, positionDragY: function (aI, s) { V(aI, s) }, animate: function (aI, aL, s, aK) { var aJ = {}; aJ[aL] = s; aI.animate(aJ, { duration: ay.animateDuration, ease: ay.animateEase, queue: false, step: aK }) }, getContentPositionX: function () { return aC() }, getContentPositionY: function () { return aA() }, getContentWidth: function () { return S() }, getContentHeight: function () { return Y() }, getPercentScrolledX: function () { return aC() / (S - aj) }, getPercentScrolledY: function () { return aA() / (Y - w) }, getIsScrollableH: function () { return aE }, getIsScrollableV: function () { return az }, getContentPane: function () { return X }, scrollToBottom: function (s) { U(j, s) }, hijackInternalLinks: function () { n() }, destroy: function () { h() } }); ar(N)
        } f = b.extend({}, b.fn.jScrollPane.defaults, f); b.each(["mouseWheelSpeed", "arrowButtonSpeed", "trackClickSpeed", "keyboardSpeed"], function () { f[this] = f[this] || f.speed }); var e; this.each(function () { var g = b(this), h = g.data("jsp"); if (h) { h.reinitialise(f) } else { h = new d(g, f); g.data("jsp", h) } e = e ? e.add(g) : g }); return e
    }; b.fn.jScrollPane.defaults = { showArrows: false, maintainPosition: true, clickOnTrack: true, autoReinitialise: false, autoReinitialiseDelay: 500, verticalDragMinHeight: 0, verticalDragMaxHeight: 99999, horizontalDragMinWidth: 0, horizontalDragMaxWidth: 99999, animateScroll: false, animateDuration: 300, animateEase: "linear", hijackInternalLinks: false, verticalGutter: 4, horizontalGutter: 4, mouseWheelSpeed: 0, arrowButtonSpeed: 0, arrowRepeatFreq: 50, arrowScrollOnHover: false, trackClickSpeed: 0, trackClickRepeatFreq: 70, verticalArrowPositions: "split", horizontalArrowPositions: "split", enableKeyboardNavigation: true, hideFocus: false, keyboardSpeed: 0, initialDelay: 300, speed: 30, scrollPagePercent: 0.8}
})(jQuery, this);;/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 *
 * Requires: 1.2.2+
 */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(i){var g=i||window.event,f=[].slice.call(arguments,1),j=0,h=true,e=0,d=0;i=c.event.fix(g);i.type="mousewheel";if(i.wheelDelta){j=i.wheelDelta/120}if(i.detail){j=-i.detail/3}d=j;if(g.axis!==undefined&&g.axis===g.HORIZONTAL_AXIS){d=0;e=-1*j}if(g.wheelDeltaY!==undefined){d=g.wheelDeltaY/120}if(g.wheelDeltaX!==undefined){e=-1*g.wheelDeltaX/120}f.unshift(i,j,e,d);return c.event.handle.apply(this,f)}})(jQuery);;/**
 * @author trixta
 * @version 1.2
 */
(function(a){function g(){if(this===c.elem){c.pos=[-260,-260];c.elem=false;d=3}}var c={pos:[-260,-260]},d=3,e=document,k=e.documentElement,h=e.body,i,j;a.event.special.mwheelIntent={setup:function(){var b=a(this).bind("mousewheel",a.event.special.mwheelIntent.handler);this!==e&&this!==k&&this!==h&&b.bind("mouseleave",g);return true},teardown:function(){a(this).unbind("mousewheel",a.event.special.mwheelIntent.handler).unbind("mouseleave",g);return true},handler:function(b){var f=[b.clientX,b.clientY]; if(this===c.elem||Math.abs(c.pos[0]-f[0])>d||Math.abs(c.pos[1]-f[1])>d){c.elem=this;c.pos=f;d=250;clearTimeout(j);j=setTimeout(function(){d=10},200);clearTimeout(i);i=setTimeout(function(){d=3},1500);b=a.extend({},b,{type:"mwheelIntent"});return a.event.handle.apply(this,arguments)}}};a.fn.extend({mwheelIntent:function(b){return b?this.bind("mwheelIntent",b):this.trigger("mwheelIntent")},unmwheelIntent:function(b){return this.unbind("mwheelIntent",b)}});a(function(){h=e.body;a(e).bind("mwheelIntent.mwheelIntentDefault", a.noop)})})(jQuery);;if(!this.JSON){this.JSON={};}
(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());;/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */;/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function ($) {
    $.fn.jcarousel = function (o) {
        if (typeof o == 'string') { var instance = $(this).data('jcarousel'), args = Array.prototype.slice.call(arguments, 1); return instance[o].apply(instance, args); } else
            return this.each(function () { $(this).data('jcarousel', new $jc(this, o)); });
    }; var defaults = { vertical: false, start: 1, offset: 1, size: null, scroll: 5, visible: null, animation: 'normal', easing: 'swing', auto: 0, wrap: null, initCallback: null, reloadCallback: null, itemLoadCallback: null, itemFirstInCallback: null, itemFirstOutCallback: null, itemLastInCallback: null, itemLastOutCallback: null, itemVisibleInCallback: null, itemVisibleOutCallback: null, buttonNextHTML: '<div></div>', buttonPrevHTML: '<div></div>', buttonNextEvent: 'click', buttonPrevEvent: 'click', buttonNextCallback: null, buttonPrevCallback: null }; $.jcarousel = function (e, o) {
        this.options = $.extend({}, defaults, o || {}); this.locked = false; this.container = null; this.clip = null; this.list = null; this.buttonNext = null; this.buttonPrev = null; this.wh = !this.options.vertical ? 'width' : 'height'; this.lt = !this.options.vertical ? 'left' : 'top'; var skin = '', split = e.className.split(' '); for (var i = 0; i < split.length; i++) { if (split[i].indexOf('jcarousel-skin') != -1) { $(e).removeClass(split[i]); skin = split[i]; break; } } if (e.nodeName == 'UL' || e.nodeName == 'OL') { this.list = $(e); this.container = this.list.parent(); if (this.container.hasClass('jcarousel-clip')) { if (!this.container.parent().hasClass('jcarousel-container')) this.container = this.container.wrap('<div></div>'); this.container = this.container.parent(); } else if (!this.container.hasClass('jcarousel-container')) this.container = this.list.wrap('<div></div>').parent(); } else { this.container = $(e); this.list = this.container.find('ul,ol').eq(0); } if (skin != '' && this.container.parent()[0].className.indexOf('jcarousel-skin') == -1) this.container.wrap('<div class=" ' + skin + '"></div>'); this.clip = this.list.parent(); if (!this.clip.length || !this.clip.hasClass('jcarousel-clip')) this.clip = this.list.wrap('<div></div>').parent(); this.buttonNext = $('.jcarousel-next', this.container); if (this.buttonNext.size() == 0 && this.options.buttonNextHTML != null) this.buttonNext = this.clip.after(this.options.buttonNextHTML).next(); this.buttonNext.addClass(this.className('jcarousel-next')); this.buttonPrev = $('.jcarousel-prev', this.container); if (this.buttonPrev.size() == 0 && this.options.buttonPrevHTML != null) this.buttonPrev = this.clip.after(this.options.buttonPrevHTML).next(); this.buttonPrev.addClass(this.className('jcarousel-prev')); this.clip.addClass(this.className('jcarousel-clip')).css({ overflow: 'hidden', position: 'relative' }); this.list.addClass(this.className('jcarousel-list')).css({ overflow: 'hidden', position: 'relative', top: 0, left: 0, margin: 0, padding: 0 }); this.container.addClass(this.className('jcarousel-container')).css({ position: 'relative' }); var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var li = this.list.children('li'); var self = this; if (li.size() > 0) { var wh = 0, i = this.options.offset; li.each(function () { self.format(this, i++); wh += self.dimension(this, di); }); this.list.css(this.wh, wh + 'px'); if (!o || o.size === undefined) this.options.size = li.size(); } this.container.css('display', 'block'); this.buttonNext.css('display', 'block'); this.buttonPrev.css('display', 'block'); this.funcNext = function () { self.next(); }; this.funcPrev = function () { self.prev(); }; this.funcResize = function () { self.reload(); }; if (this.options.initCallback != null) this.options.initCallback(this, 'init'); if ($.browser.safari) { this.buttons(false, false); $(window).bind('load.jcarousel', function () { self.setup(); }); } else
            this.setup();
    }; var $jc = $.jcarousel; $jc.fn = $jc.prototype = { jcarousel: '0.2.4' }; $jc.fn.extend = $jc.extend = $.extend; $jc.fn.extend({ setup: function () { this.first = null; this.last = null; this.prevFirst = null; this.prevLast = null; this.animating = false; this.timer = null; this.tail = null; this.inTail = false; if (this.locked) return; this.list.css(this.lt, this.pos(this.options.offset) + 'px'); var p = this.pos(this.options.start); this.prevFirst = this.prevLast = null; this.animate(p, false); $(window).unbind('resize.jcarousel', this.funcResize).bind('resize.jcarousel', this.funcResize); }, reset: function () { this.list.empty(); this.list.css(this.lt, '0px'); this.list.css(this.wh, '10px'); if (this.options.initCallback != null) this.options.initCallback(this, 'reset'); this.setup(); }, reload: function () { if (this.tail != null && this.inTail) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + this.tail); this.tail = null; this.inTail = false; if (this.options.reloadCallback != null) this.options.reloadCallback(this); if (this.options.visible != null) { var self = this; var di = Math.ceil(this.clipping() / this.options.visible), wh = 0, lt = 0; $('li', this.list).each(function (i) { wh += self.dimension(this, di); if (i + 1 < self.first) lt = wh; }); this.list.css(this.wh, wh + 'px'); this.list.css(this.lt, -lt + 'px'); } this.scroll(this.first, false); }, lock: function () { this.locked = true; this.buttons(); }, unlock: function () { this.locked = false; this.buttons(); }, size: function (s) { if (s != undefined) { this.options.size = s; if (!this.locked) this.buttons(); } return this.options.size; }, has: function (i, i2) { if (i2 == undefined || !i2) i2 = i; if (this.options.size !== null && i2 > this.options.size) i2 = this.options.size; for (var j = i; j <= i2; j++) { var e = this.get(j); if (!e.length || e.hasClass('jcarousel-item-placeholder')) return false; } return true; }, get: function (i) { return $('.jcarousel-item-' + i, this.list); }, add: function (i, s) {
        var e = this.get(i), old = 0, add = 0; if (e.length == 0) { var c, e = this.create(i), j = $jc.intval(i); while (c = this.get(--j)) { if (j <= 0 || c.length) { j <= 0 ? this.list.prepend(e) : c.after(e); break; } } } else
            old = this.dimension(e); e.removeClass(this.className('jcarousel-item-placeholder')); typeof s == 'string' ? e.html(s) : e.empty().append(s); var di = this.options.visible != null ? Math.ceil(this.clipping() / this.options.visible) : null; var wh = this.dimension(e, di) - old; if (i > 0 && i < this.first) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - wh + 'px'); this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) + wh + 'px'); return e;
    }, remove: function (i) { var e = this.get(i); if (!e.length || (i >= this.first && i <= this.last)) return; var d = this.dimension(e); if (i < this.first) this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) + d + 'px'); e.remove(); this.list.css(this.wh, $jc.intval(this.list.css(this.wh)) - d + 'px'); }, next: function () {
        this.stopAuto(); if (this.tail != null && !this.inTail) this.scrollTail(false); else
            this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'last') && this.options.size != null && this.last == this.options.size) ? 1 : this.first + this.options.scroll);
    }, prev: function () {
        this.stopAuto(); if (this.tail != null && this.inTail) this.scrollTail(true); else
            this.scroll(((this.options.wrap == 'both' || this.options.wrap == 'first') && this.options.size != null && this.first == 1) ? this.options.size : this.first - this.options.scroll);
    }, scrollTail: function (b) { if (this.locked || this.animating || !this.tail) return; var pos = $jc.intval(this.list.css(this.lt)); !b ? pos -= this.tail : pos += this.tail; this.inTail = !b; this.prevFirst = this.first; this.prevLast = this.last; this.animate(pos); }, scroll: function (i, a) { if (this.locked || this.animating) return; this.animate(this.pos(i), a); }, pos: function (i) { var pos = $jc.intval(this.list.css(this.lt)); if (this.locked || this.animating) return pos; if (this.options.wrap != 'circular') i = i < 1 ? 1 : (this.options.size && i > this.options.size ? this.options.size : i); var back = this.first > i; var f = this.options.wrap != 'circular' && this.first <= 1 ? 1 : this.first; var c = back ? this.get(f) : this.get(this.last); var j = back ? f : f - 1; var e = null, l = 0, p = false, d = 0, g; while (back ? --j >= i : ++j < i) { e = this.get(j); p = !e.length; if (e.length == 0) { e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); c[back ? 'before' : 'after'](e); if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { g = this.get(this.index(j)); if (g.length) this.add(j, g.children().clone(true)); } } c = e; d = this.dimension(e); if (p) l += d; if (this.first != null && (this.options.wrap == 'circular' || (j >= 1 && (this.options.size == null || j <= this.options.size)))) pos = back ? pos + d : pos - d; } var clipping = this.clipping(); var cache = []; var visible = 0, j = i, v = 0; var c = this.get(i - 1); while (++visible) { e = this.get(j); p = !e.length; if (e.length == 0) { e = this.create(j).addClass(this.className('jcarousel-item-placeholder')); c.length == 0 ? this.list.prepend(e) : c[back ? 'before' : 'after'](e); if (this.first != null && this.options.wrap == 'circular' && this.options.size !== null && (j <= 0 || j > this.options.size)) { g = this.get(this.index(j)); if (g.length) this.add(j, g.find('>*').clone(true)); } } c = e; var d = this.dimension(e); if (d == 0) { alert('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...'); return 0; } if (this.options.wrap != 'circular' && this.options.size !== null && j > this.options.size) cache.push(e); else if (p) l += d; v += d; if (v >= clipping) break; j++; } for (var x = 0; x < cache.length; x++) cache[x].remove(); if (l > 0) { this.list.css(this.wh, this.dimension(this.list) + l + 'px'); if (back) { pos -= l; this.list.css(this.lt, $jc.intval(this.list.css(this.lt)) - l + 'px'); } } var last = i + visible - 1; if (this.options.wrap != 'circular' && this.options.size && last > this.options.size) last = this.options.size; if (j > last) { visible = 0, j = last, v = 0; while (++visible) { var e = this.get(j--); if (!e.length) break; v += this.dimension(e); if (v >= clipping) break; } } var first = last - visible + 1; if (this.options.wrap != 'circular' && first < 1) first = 1; if (this.inTail && back) { pos += this.tail; this.inTail = false; } this.tail = null; if (this.options.wrap != 'circular' && last == this.options.size && (last - visible + 1) >= 1) { var m = $jc.margin(this.get(last), !this.options.vertical ? 'marginRight' : 'marginBottom'); if ((v - m) > clipping) this.tail = v - clipping - m; } while (i-- > first) pos += this.dimension(this.get(i)); this.prevFirst = this.first; this.prevLast = this.last; this.first = first; this.last = last; return pos; }, animate: function (p, a) { if (this.locked || this.animating) return; this.animating = true; var self = this; var scrolled = function () { self.animating = false; if (p == 0) self.list.css(self.lt, 0); if (self.options.wrap == 'circular' || self.options.wrap == 'both' || self.options.wrap == 'last' || self.options.size == null || self.last < self.options.size) self.startAuto(); self.buttons(); self.notify('onAfterAnimation'); }; this.notify('onBeforeAnimation'); if (!this.options.animation || a == false) { this.list.css(this.lt, p + 'px'); scrolled(); } else { var o = !this.options.vertical ? { 'left': p} : { 'top': p }; this.list.animate(o, this.options.animation, this.options.easing, scrolled); } }, startAuto: function (s) { if (s != undefined) this.options.auto = s; if (this.options.auto == 0) return this.stopAuto(); if (this.timer != null) return; var self = this; this.timer = setTimeout(function () { self.next(); }, this.options.auto * 1000); }, stopAuto: function () { if (this.timer == null) return; clearTimeout(this.timer); this.timer = null; }, buttons: function (n, p) { if (n == undefined || n == null) { var n = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'first') || this.options.size == null || this.last < this.options.size); if (!this.locked && (!this.options.wrap || this.options.wrap == 'first') && this.options.size != null && this.last >= this.options.size) n = this.tail != null && !this.inTail; } if (p == undefined || p == null) { var p = !this.locked && this.options.size !== 0 && ((this.options.wrap && this.options.wrap != 'last') || this.first > 1); if (!this.locked && (!this.options.wrap || this.options.wrap == 'last') && this.options.size != null && this.first == 1) p = this.tail != null && this.inTail; } var self = this; this.buttonNext[n ? 'bind' : 'unbind'](this.options.buttonNextEvent + '.jcarousel', this.funcNext)[n ? 'removeClass' : 'addClass'](this.className('jcarousel-next-disabled')).attr('disabled', n ? false : true); this.buttonPrev[p ? 'bind' : 'unbind'](this.options.buttonPrevEvent + '.jcarousel', this.funcPrev)[p ? 'removeClass' : 'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled', p ? false : true); if (this.buttonNext.length > 0 && (this.buttonNext[0].jcarouselstate == undefined || this.buttonNext[0].jcarouselstate != n) && this.options.buttonNextCallback != null) { this.buttonNext.each(function () { self.options.buttonNextCallback(self, this, n); }); this.buttonNext[0].jcarouselstate = n; } if (this.buttonPrev.length > 0 && (this.buttonPrev[0].jcarouselstate == undefined || this.buttonPrev[0].jcarouselstate != p) && this.options.buttonPrevCallback != null) { this.buttonPrev.each(function () { self.options.buttonPrevCallback(self, this, p); }); this.buttonPrev[0].jcarouselstate = p; } }, notify: function (evt) { var state = this.prevFirst == null ? 'init' : (this.prevFirst < this.first ? 'next' : 'prev'); this.callback('itemLoadCallback', evt, state); if (this.prevFirst !== this.first) { this.callback('itemFirstInCallback', evt, state, this.first); this.callback('itemFirstOutCallback', evt, state, this.prevFirst); } if (this.prevLast !== this.last) { this.callback('itemLastInCallback', evt, state, this.last); this.callback('itemLastOutCallback', evt, state, this.prevLast); } this.callback('itemVisibleInCallback', evt, state, this.first, this.last, this.prevFirst, this.prevLast); this.callback('itemVisibleOutCallback', evt, state, this.prevFirst, this.prevLast, this.first, this.last); }, callback: function (cb, evt, state, i1, i2, i3, i4) { if (this.options[cb] == undefined || (typeof this.options[cb] != 'object' && evt != 'onAfterAnimation')) return; var callback = typeof this.options[cb] == 'object' ? this.options[cb][evt] : this.options[cb]; if (!$.isFunction(callback)) return; var self = this; if (i1 === undefined) callback(self, state, evt); else if (i2 === undefined) this.get(i1).each(function () { callback(self, this, i1, state, evt); }); else { for (var i = i1; i <= i2; i++) if (i !== null && !(i >= i3 && i <= i4)) this.get(i).each(function () { callback(self, this, i, state, evt); }); } }, create: function (i) { return this.format('<li></li>', i); }, format: function (e, i) { var $e = $(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-' + i)).css({ 'float': 'left', 'list-style': 'none' }); $e.attr('jcarouselindex', i); return $e; }, className: function (c) { return c + ' ' + c + (!this.options.vertical ? '-horizontal' : '-vertical'); }, dimension: function (e, d) { var el = e.jquery != undefined ? e[0] : e; var old = !this.options.vertical ? el.offsetWidth + $jc.margin(el, 'marginLeft') + $jc.margin(el, 'marginRight') : el.offsetHeight + $jc.margin(el, 'marginTop') + $jc.margin(el, 'marginBottom'); if (d == undefined || old == d) return old; var w = !this.options.vertical ? d - $jc.margin(el, 'marginLeft') - $jc.margin(el, 'marginRight') : d - $jc.margin(el, 'marginTop') - $jc.margin(el, 'marginBottom'); $(el).css(this.wh, w + 'px'); return this.dimension(el); }, clipping: function () { return !this.options.vertical ? this.clip[0].offsetWidth - $jc.intval(this.clip.css('borderLeftWidth')) - $jc.intval(this.clip.css('borderRightWidth')) : this.clip[0].offsetHeight - $jc.intval(this.clip.css('borderTopWidth')) - $jc.intval(this.clip.css('borderBottomWidth')); }, index: function (i, s) { if (s == undefined) s = this.options.size; return Math.round((((i - 1) / s) - Math.floor((i - 1) / s)) * s) + 1; } 
    }); $jc.extend({ defaults: function (d) { return $.extend(defaults, d || {}); }, margin: function (e, p) { if (!e) return 0; var el = e.jquery != undefined ? e[0] : e; if (p == 'marginRight' && $.browser.safari) { var old = { 'display': 'block', 'float': 'none', 'width': 'auto' }, oWidth, oWidth2; $.swap(el, old, function () { oWidth = el.offsetWidth; }); old['marginRight'] = 0; $.swap(el, old, function () { oWidth2 = el.offsetWidth; }); return oWidth2 - oWidth; } return $jc.intval($.css(el, p)); }, intval: function (v) { v = parseInt(v); return isNaN(v) ? 0 : v; } });
})(jQuery);
;(function(c){var a="data-",g=/^data\-(.*)$/;function f(b,c){if(c!==undefined)return this.attr(a+b,c);switch(typeof b){case "string":return this.attr(a+b);case "object":return e.call(this,b);case "undefined":return d.call(this);default:throw"dataset: invalid argument "+b;}}function d(){return this.foldAttr(function(c,d,b){var a=g.exec(this.name);if(a)b[a[1]]=this.value})}function e(b){for(var c in b)this.attr(a+c,b[c]);return this}function b(c){var b,d=c&&c.length;if(d===undefined)for(b in c)this.removeAttr(a+b);else for(b=0;b<d;b++)this.removeAttr(a+c[b]);return this}c.fn.dataset=f;c.fn.removeDataset=b})(jQuery);(function(a){function d(b){this.length>0&&a.each(this[0].attributes,b);return this}function e(a,c){return b(this.length>0&&this[0].attributes,a,c)}function b(a,g,b){var f=a&&a.length;if(b===undefined)b={};if(!a)return b;if(f!==undefined)for(var c=0,d=a[c];c<f&&g.call(d,c,d,b)!==false;d=a[++c]);else for(var e in a)if(g.call(a[e],e,a[e],b)===false)break;return b}function c(c,a){if(a===undefined)a=[];return b(this,c,a)}a.fn.eachAttr=d;a.fn.foldAttr=e;a.fn.fold=c;a.fold=b})(jQuery);/**
 * jquery.Jcrop.js v0.9.9 {{{
 *
 * jQuery Image Cropping Plugin - released under MIT License 
 * Author: Kelly Hallman <khallman@gmail.com>
 * http://github.com/tapmodo/Jcrop
 *
 * }}}
 * Copyright (c) 2008-2011 Tapmodo Interactive LLC {{{
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * }}}
 */

(function ($) {

  $.Jcrop = function (obj, opt) {
    var options = $.extend({}, $.Jcrop.defaults),
        docOffset, lastcurs, ie6mode = false;

    // Internal Methods {{{
    function px(n) {
      return parseInt(n, 10) + 'px';
    }
    function cssClass(cl) {
      return options.baseClass + '-' + cl;
    }
    function supportsColorFade() {
      return $.fx.step.hasOwnProperty('backgroundColor');
    }
    function getPos(obj) //{{{
    {
      var pos = $(obj).offset();
      return [pos.left, pos.top];
    }
    //}}}
    function mouseAbs(e) //{{{
    {
      return [(e.pageX - docOffset[0]), (e.pageY - docOffset[1])];
    }
    //}}}
    function setOptions(opt) //{{{
    {
      if (typeof(opt) !== 'object') opt = {};
      options = $.extend(options, opt);

      $.each(['onChange','onSelect','onRelease','onDblClick'],function(i,e) {
        if (typeof(options[e]) !== 'function') options[e] = function () {};
      });
    }
    //}}}
    function startDragMode(mode, pos) //{{{
    {
      docOffset = getPos($img);
      Tracker.setCursor(mode === 'move' ? mode : mode + '-resize');

      if (mode === 'move') {
        return Tracker.activateHandlers(createMover(pos), doneSelect);
      }

      var fc = Coords.getFixed();
      var opp = oppLockCorner(mode);
      var opc = Coords.getCorner(oppLockCorner(opp));

      Coords.setPressed(Coords.getCorner(opp));
      Coords.setCurrent(opc);

      Tracker.activateHandlers(dragmodeHandler(mode, fc), doneSelect);
    }
    //}}}
    function dragmodeHandler(mode, f) //{{{
    {
      return function (pos) {
        if (!options.aspectRatio) {
          switch (mode) {
          case 'e':
            pos[1] = f.y2;
            break;
          case 'w':
            pos[1] = f.y2;
            break;
          case 'n':
            pos[0] = f.x2;
            break;
          case 's':
            pos[0] = f.x2;
            break;
          }
        } else {
          switch (mode) {
          case 'e':
            pos[1] = f.y + 1;
            break;
          case 'w':
            pos[1] = f.y + 1;
            break;
          case 'n':
            pos[0] = f.x + 1;
            break;
          case 's':
            pos[0] = f.x + 1;
            break;
          }
        }
        Coords.setCurrent(pos);
        Selection.update();
      };
    }
    //}}}
    function createMover(pos) //{{{
    {
      var lloc = pos;
      KeyManager.watchKeys();

      return function (pos) {
        Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]);
        lloc = pos;

        Selection.update();
      };
    }
    //}}}
    function oppLockCorner(ord) //{{{
    {
      switch (ord) {
      case 'n':
        return 'sw';
      case 's':
        return 'nw';
      case 'e':
        return 'nw';
      case 'w':
        return 'ne';
      case 'ne':
        return 'sw';
      case 'nw':
        return 'se';
      case 'se':
        return 'nw';
      case 'sw':
        return 'ne';
      }
    }
    //}}}
    function createDragger(ord) //{{{
    {
      return function (e) {
        if (options.disabled) {
          return false;
        }
        if ((ord === 'move') && !options.allowMove) {
          return false;
        }
        btndown = true;
        startDragMode(ord, mouseAbs(e));
        e.stopPropagation();
        e.preventDefault();
        return false;
      };
    }
    //}}}
    function presize($obj, w, h) //{{{
    {
      var nw = $obj.width(),
          nh = $obj.height();
      if ((nw > w) && w > 0) {
        nw = w;
        nh = (w / $obj.width()) * $obj.height();
      }
      if ((nh > h) && h > 0) {
        nh = h;
        nw = (h / $obj.height()) * $obj.width();
      }
      xscale = $obj.width() / nw;
      yscale = $obj.height() / nh;
      $obj.width(nw).height(nh);
    }
    //}}}
    function unscale(c) //{{{
    {
      return {
        x: parseInt(c.x * xscale, 10),
        y: parseInt(c.y * yscale, 10),
        x2: parseInt(c.x2 * xscale, 10),
        y2: parseInt(c.y2 * yscale, 10),
        w: parseInt(c.w * xscale, 10),
        h: parseInt(c.h * yscale, 10)
      };
    }
    //}}}
    function doneSelect(pos) //{{{
    {
      var c = Coords.getFixed();
      if ((c.w > options.minSelect[0]) && (c.h > options.minSelect[1])) {
        Selection.enableHandles();
        Selection.done();
      } else {
        Selection.release();
      }
      Tracker.setCursor(options.allowSelect ? 'crosshair' : 'default');
    }
    //}}}
    function newSelection(e) //{{{
    {
      if (options.disabled) {
        return false;
      }
      if (!options.allowSelect) {
        return false;
      }
      btndown = true;
      docOffset = getPos($img);
      Selection.disableHandles();
      Tracker.setCursor('crosshair');
      var pos = mouseAbs(e);
      Coords.setPressed(pos);
      Selection.update();
      Tracker.activateHandlers(selectDrag, doneSelect);
      KeyManager.watchKeys();

      e.stopPropagation();
      e.preventDefault();
      return false;
    }
    //}}}
    function selectDrag(pos) //{{{
    {
      Coords.setCurrent(pos);
      Selection.update();
    }
    //}}}
    function newTracker() //{{{
    {
      var trk = $('<div></div>').addClass(cssClass('tracker'));
      if ($.browser.msie) {
        trk.css({
          opacity: 0,
          backgroundColor: 'white'
        });
      }
      return trk;
    }
    //}}}

    // }}}
    // Initialization {{{
    // Sanitize some options {{{
    if ($.browser.msie && ($.browser.version.split('.')[0] === '6')) {
      ie6mode = true;
    }
    if (typeof(obj) !== 'object') {
      obj = $(obj)[0];
    }
    if (typeof(opt) !== 'object') {
      opt = {};
    }
    // }}}
    setOptions(opt);
    // Initialize some jQuery objects {{{
    // The values are SET on the image(s) for the interface
    // If the original image has any of these set, they will be reset
    // However, if you destroy() the Jcrop instance the original image's
    // character in the DOM will be as you left it.
    var img_css = {
      border: 'none',
      margin: 0,
      padding: 0,
      position: 'absolute',
      top: 0,
      left: 0
    };

    var $origimg = $(obj);
    var $img = $origimg.clone().removeAttr('id').css(img_css);

    $img.width($origimg.width());
    $img.height($origimg.height());
    $origimg.after($img).hide();

    presize($img, options.boxWidth, options.boxHeight);

    var boundx = $img.width(),
        boundy = $img.height(),
        
        
        $div = $('<div />').width(boundx).height(boundy).addClass(cssClass('holder')).css({
        position: 'relative',
        backgroundColor: options.bgColor
      }).insertAfter($origimg).append($img);

    if (options.addClass) {
      $div.addClass(options.addClass);
    }

    var $img2 = $('<img />')
        .attr('src', $img.attr('src')).css(img_css).width(boundx).height(boundy),

        $img_holder = $('<div />') 
        .width('100%').height('100%').css({
          zIndex: 310,
          position: 'absolute',
          overflow: 'hidden'
        }),

        $hdl_holder = $('<div />') 
        .width('100%').height('100%').css('zIndex', 320), 

        $sel = $('<div />') 
        .css({
          position: 'absolute',
          zIndex: 600
        }).dblclick(function(){
          var c = Coords.getFixed();
          options.onDblClick.call(api,c);
        }).insertBefore($img).append($img_holder, $hdl_holder); 

    $img_holder.append($img2);
    //Shade.refresh();

    if (ie6mode) {
      $sel.css({
        overflowY: 'hidden'
      });
    }

    var bound = options.boundary;
    var $trk = newTracker().width(boundx + (bound * 2)).height(boundy + (bound * 2)).css({
      position: 'absolute',
      top: px(-bound),
      left: px(-bound),
      zIndex: 290
    }).mousedown(newSelection);

    /* }}} */
    // Set more variables {{{
    var bgcolor = options.bgColor,
        bgopacity = options.bgOpacity,
        xlimit, ylimit, xmin, ymin, xscale, yscale, enabled = true,
        btndown, animating, shift_down;

    docOffset = getPos($img);
    // }}}
    // }}}
    // Internal Modules {{{
    // Touch Module {{{ 
    var Touch = (function () {
      // Touch support detection function adapted (under MIT License)
      // from code by Jeffrey Sambells - http://github.com/iamamused/
      function hasTouchSupport() {
        var support = {},
            events = ['touchstart', 'touchmove', 'touchend'],
            el = document.createElement('div'), i;

        try {
          for(i=0; i<events.length; i++) {
            var eventName = events[i];
            eventName = 'on' + eventName;
            var isSupported = (eventName in el);
            if (!isSupported) {
              el.setAttribute(eventName, 'return;');
              isSupported = typeof el[eventName] == 'function';
            }
            support[events[i]] = isSupported;
          }
          return support.touchstart && support.touchend && support.touchmove;
        }
        catch(err) {
          return false;
        }
      }

      function detectSupport() {
        if ((options.touchSupport === true) || (options.touchSupport === false)) return options.touchSupport;
          else return hasTouchSupport();
      }
      return {
        createDragger: function (ord) {
          return function (e) {
            e.pageX = e.originalEvent.changedTouches[0].pageX;
            e.pageY = e.originalEvent.changedTouches[0].pageY;
            if (options.disabled) {
              return false;
            }
            if ((ord === 'move') && !options.allowMove) {
              return false;
            }
            btndown = true;
            startDragMode(ord, mouseAbs(e));
            e.stopPropagation();
            e.preventDefault();
            return false;
          };
        },
        newSelection: function (e) {
          e.pageX = e.originalEvent.changedTouches[0].pageX;
          e.pageY = e.originalEvent.changedTouches[0].pageY;
          return newSelection(e);
        },
        isSupported: hasTouchSupport,
        support: detectSupport()
      };
    }());
    // }}}
    // Coords Module {{{
    var Coords = (function () {
      var x1 = 0,
          y1 = 0,
          x2 = 0,
          y2 = 0,
          ox, oy;

      function setPressed(pos) //{{{
      {
        pos = rebound(pos);
        x2 = x1 = pos[0];
        y2 = y1 = pos[1];
      }
      //}}}
      function setCurrent(pos) //{{{
      {
        pos = rebound(pos);
        ox = pos[0] - x2;
        oy = pos[1] - y2;
        x2 = pos[0];
        y2 = pos[1];
      }
      //}}}
      function getOffset() //{{{
      {
        return [ox, oy];
      }
      //}}}
      function moveOffset(offset) //{{{
      {
        var ox = offset[0],
            oy = offset[1];

        if (0 > x1 + ox) {
          ox -= ox + x1;
        }
        if (0 > y1 + oy) {
          oy -= oy + y1;
        }

        if (boundy < y2 + oy) {
          oy += boundy - (y2 + oy);
        }
        if (boundx < x2 + ox) {
          ox += boundx - (x2 + ox);
        }

        x1 += ox;
        x2 += ox;
        y1 += oy;
        y2 += oy;
      }
      //}}}
      function getCorner(ord) //{{{
      {
        var c = getFixed();
        switch (ord) {
        case 'ne':
          return [c.x2, c.y];
        case 'nw':
          return [c.x, c.y];
        case 'se':
          return [c.x2, c.y2];
        case 'sw':
          return [c.x, c.y2];
        }
      }
      //}}}
      function getFixed() //{{{
      {
        if (!options.aspectRatio) {
          return getRect();
        }
        // This function could use some optimization I think...
        var aspect = options.aspectRatio,
            min_x = options.minSize[0] / xscale,
            
            
            //min_y = options.minSize[1]/yscale,
            max_x = options.maxSize[0] / xscale,
            max_y = options.maxSize[1] / yscale,
            rw = x2 - x1,
            rh = y2 - y1,
            rwa = Math.abs(rw),
            rha = Math.abs(rh),
            real_ratio = rwa / rha,
            xx, yy;

        if (max_x === 0) {
          max_x = boundx * 10;
        }
        if (max_y === 0) {
          max_y = boundy * 10;
        }
        if (real_ratio < aspect) {
          yy = y2;
          w = rha * aspect;
          xx = rw < 0 ? x1 - w : w + x1;

          if (xx < 0) {
            xx = 0;
            h = Math.abs((xx - x1) / aspect);
            yy = rh < 0 ? y1 - h : h + y1;
          } else if (xx > boundx) {
            xx = boundx;
            h = Math.abs((xx - x1) / aspect);
            yy = rh < 0 ? y1 - h : h + y1;
          }
        } else {
          xx = x2;
          h = rwa / aspect;
          yy = rh < 0 ? y1 - h : y1 + h;
          if (yy < 0) {
            yy = 0;
            w = Math.abs((yy - y1) * aspect);
            xx = rw < 0 ? x1 - w : w + x1;
          } else if (yy > boundy) {
            yy = boundy;
            w = Math.abs(yy - y1) * aspect;
            xx = rw < 0 ? x1 - w : w + x1;
          }
        }

        // Magic %-)
        if (xx > x1) { // right side
          if (xx - x1 < min_x) {
            xx = x1 + min_x;
          } else if (xx - x1 > max_x) {
            xx = x1 + max_x;
          }
          if (yy > y1) {
            yy = y1 + (xx - x1) / aspect;
          } else {
            yy = y1 - (xx - x1) / aspect;
          }
        } else if (xx < x1) { // left side
          if (x1 - xx < min_x) {
            xx = x1 - min_x;
          } else if (x1 - xx > max_x) {
            xx = x1 - max_x;
          }
          if (yy > y1) {
            yy = y1 + (x1 - xx) / aspect;
          } else {
            yy = y1 - (x1 - xx) / aspect;
          }
        }

        if (xx < 0) {
          x1 -= xx;
          xx = 0;
        } else if (xx > boundx) {
          x1 -= xx - boundx;
          xx = boundx;
        }

        if (yy < 0) {
          y1 -= yy;
          yy = 0;
        } else if (yy > boundy) {
          y1 -= yy - boundy;
          yy = boundy;
        }

        return makeObj(flipCoords(x1, y1, xx, yy));
      }
      //}}}
      function rebound(p) //{{{
      {
        if (p[0] < 0) {
          p[0] = 0;
        }
        if (p[1] < 0) {
          p[1] = 0;
        }

        if (p[0] > boundx) {
          p[0] = boundx;
        }
        if (p[1] > boundy) {
          p[1] = boundy;
        }

        return [p[0], p[1]];
      }
      //}}}
      function flipCoords(x1, y1, x2, y2) //{{{
      {
        var xa = x1,
            xb = x2,
            ya = y1,
            yb = y2;
        if (x2 < x1) {
          xa = x2;
          xb = x1;
        }
        if (y2 < y1) {
          ya = y2;
          yb = y1;
        }
        return [Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb)];
      }
      //}}}
      function getRect() //{{{
      {
        var xsize = x2 - x1,
            ysize = y2 - y1,
            delta;

        if (xlimit && (Math.abs(xsize) > xlimit)) {
          x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit);
        }
        if (ylimit && (Math.abs(ysize) > ylimit)) {
          y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit);
        }

        if (ymin / yscale && (Math.abs(ysize) < ymin / yscale)) {
          y2 = (ysize > 0) ? (y1 + ymin / yscale) : (y1 - ymin / yscale);
        }
        if (xmin / xscale && (Math.abs(xsize) < xmin / xscale)) {
          x2 = (xsize > 0) ? (x1 + xmin / xscale) : (x1 - xmin / xscale);
        }

        if (x1 < 0) {
          x2 -= x1;
          x1 -= x1;
        }
        if (y1 < 0) {
          y2 -= y1;
          y1 -= y1;
        }
        if (x2 < 0) {
          x1 -= x2;
          x2 -= x2;
        }
        if (y2 < 0) {
          y1 -= y2;
          y2 -= y2;
        }
        if (x2 > boundx) {
          delta = x2 - boundx;
          x1 -= delta;
          x2 -= delta;
        }
        if (y2 > boundy) {
          delta = y2 - boundy;
          y1 -= delta;
          y2 -= delta;
        }
        if (x1 > boundx) {
          delta = x1 - boundy;
          y2 -= delta;
          y1 -= delta;
        }
        if (y1 > boundy) {
          delta = y1 - boundy;
          y2 -= delta;
          y1 -= delta;
        }

        return makeObj(flipCoords(x1, y1, x2, y2));
      }
      //}}}
      function makeObj(a) //{{{
      {
        return {
          x: a[0],
          y: a[1],
          x2: a[2],
          y2: a[3],
          w: a[2] - a[0],
          h: a[3] - a[1]
        };
      }
      //}}}

      return {
        flipCoords: flipCoords,
        setPressed: setPressed,
        setCurrent: setCurrent,
        getOffset: getOffset,
        moveOffset: moveOffset,
        getCorner: getCorner,
        getFixed: getFixed
      };
    }());

    //}}}
    // Shade Module {{{
    var Shade = (function() {
      var enabled = false,
          holder = $('<div />').css({
            position: 'absolute',
            zIndex: 240,
            opacity: 0
          }),
          shades = {
            top: createShade(),
            left: createShade().height(boundy),
            right: createShade().height(boundy),
            bottom: createShade()
          };

      function resizeShades(w,h) {
        shades.left.css({ height: px(h) });
        shades.right.css({ height: px(h) });
      }
      function updateAuto()
      {
        return updateShade(Coords.getFixed());
      }
      function updateShade(c)
      {
        shades.top.css({
          left: px(c.x),
          width: px(c.w),
          height: px(c.y)
        });
        shades.bottom.css({
          top: px(c.y2),
          left: px(c.x),
          width: px(c.w),
          height: px(boundy-c.y2)
        });
        shades.right.css({
          left: px(c.x2),
          width: px(boundx-c.x2)
        });
        shades.left.css({
          width: px(c.x)
        });
      }
      function createShade() {
        return $('<div />').css({
          position: 'absolute',
          backgroundColor: options.shadeColor||options.bgColor
        }).appendTo(holder);
      }
      function enableShade() {
        if (!enabled) {
          enabled = true;
          holder.insertBefore($img);
          updateAuto();
          Selection.setBgOpacity(1,0,1);
          $img2.hide();

          setBgColor(options.shadeColor||options.bgColor,1);
          if (Selection.isAwake())
          {
            setOpacity(options.bgOpacity,1);
          }
            else setOpacity(1,1);
        }
      }
      function setBgColor(color,now) {
        colorChangeMacro(getShades(),color,now);
      }
      function disableShade() {
        if (enabled) {
          holder.remove();
          $img2.show();
          enabled = false;
          if (Selection.isAwake()) {
            Selection.setBgOpacity(options.bgOpacity,1,1);
          } else {
            Selection.setBgOpacity(1,1,1);
            Selection.disableHandles();
          }
          colorChangeMacro($div,0,1);
        }
      }
      function setOpacity(opacity,now) {
        if (enabled) {
          if (options.bgFade && !now) {
            holder.animate({
              opacity: 1-opacity
            },{
              queue: false,
              duration: options.fadeTime
            });
          }
          else holder.css({opacity:1-opacity});
        }
      }
      function refreshAll() {
        options.shade ? enableShade() : disableShade();
        if (Selection.isAwake()) setOpacity(options.bgOpacity);
      }
      function getShades() {
        return holder.children();
      }

      return {
        update: updateAuto,
        updateRaw: updateShade,
        getShades: getShades,
        setBgColor: setBgColor,
        enable: enableShade,
        disable: disableShade,
        resize: resizeShades,
        refresh: refreshAll,
        opacity: setOpacity
      };
    }());
    // }}}
    // Selection Module {{{
    var Selection = (function () {
      var awake, hdep = 370;
      var borders = {};
      var handle = {};
      var seehandles = false;
      var hhs = options.handleOffset;

      // Private Methods
      function insertBorder(type) //{{{
      {
        var jq = $('<div />').css({
          position: 'absolute',
          opacity: options.borderOpacity
        }).addClass(cssClass(type));
        $img_holder.append(jq);
        return jq;
      }
      //}}}
      function dragDiv(ord, zi) //{{{
      {
        var jq = $('<div />').mousedown(createDragger(ord)).css({
          cursor: ord + '-resize',
          position: 'absolute',
          zIndex: zi
        });

        if (Touch.support) {
          jq.bind('touchstart', Touch.createDragger(ord));
        }

        $hdl_holder.append(jq);
        return jq;
      }
      //}}}
      function insertHandle(ord) //{{{
      {
        var hs = options.handleSize;
        return dragDiv(ord, hdep++).css({
          top: px(-hhs + 1),
          left: px(-hhs + 1),
          opacity: options.handleOpacity
        }).width(hs).height(hs).addClass(cssClass('handle'));
      }
      //}}}
      function insertDragbar(ord) //{{{
      {
        var s = options.handleSize,
            h = s,
            w = s,
            t = hhs,
            l = hhs;

        switch (ord) {
        case 'n':
        case 's':
          w = '100%';
          break;
        case 'e':
        case 'w':
          h = '100%';
          break;
        }

        return dragDiv(ord, hdep++).width(w).height(h).css({
          top: px(-t + 1),
          left: px(-l + 1)
        });
      }
      //}}}
      function createHandles(li) //{{{
      {
        var i;
        for (i = 0; i < li.length; i++) {
          handle[li[i]] = insertHandle(li[i]);
        }
      }
      //}}}
      function moveHandles(c) //{{{
      {
        var midvert = Math.round((c.h / 2) - hhs),
            midhoriz = Math.round((c.w / 2) - hhs),
            north = -hhs + 1,
            west = -hhs + 1,
            east = c.w - hhs,
            south = c.h - hhs,
            x, y;

        if (handle.e) {
          handle.e.css({
            top: px(midvert),
            left: px(east)
          });
          handle.w.css({
            top: px(midvert)
          });
          handle.s.css({
            top: px(south),
            left: px(midhoriz)
          });
          handle.n.css({
            left: px(midhoriz)
          });
        }
        if (handle.ne) {
          handle.ne.css({
            left: px(east)
          });
          handle.se.css({
            top: px(south),
            left: px(east)
          });
          handle.sw.css({
            top: px(south)
          });
        }
        if (handle.b) {
          handle.b.css({
            top: px(south)
          });
          handle.r.css({
            left: px(east)
          });
        }
      }
      //}}}
      function moveto(x, y) //{{{
      {
        if (!options.shade) {
          $img2.css({
            top: px(-y),
            left: px(-x)
          });
        }
        $sel.css({
          top: px(y),
          left: px(x)
        });
      }
      //}}}
      function resize(w, h) //{{{
      {
        $sel.width(w).height(h);
      }
      //}}}
      function refresh() //{{{
      {
        var c = Coords.getFixed();

        Coords.setPressed([c.x, c.y]);
        Coords.setCurrent([c.x2, c.y2]);

        updateVisible();
      }
      //}}}

      // Internal Methods
      function updateVisible() //{{{
      {
        if (awake) {
          return update();
        }
      }
      //}}}
      function update() //{{{
      {
        var c = Coords.getFixed();

        resize(c.w, c.h);
        moveto(c.x, c.y);
        if (options.shade) Shade.updateRaw(c);

        if (seehandles) {
          moveHandles(c);
        }
        if (!awake) {
          show();
        }

        options.onChange.call(api, unscale(c));
      }
      //}}}
      function setBgOpacity(opacity,force,now)
      {
        if (!awake && !force) return;
        if (options.bgFade && !now) {
          $img.animate({
            opacity: opacity
          },{
            queue: false,
            duration: options.fadeTime
          });
        } else {
          $img.css('opacity', opacity);
        }
      }
      function show() //{{{
      {
        $sel.show();

        if (options.shade) Shade.opacity(bgopacity);
          else setBgOpacity(bgopacity,true);

        awake = true;
      }
      //}}}
      function release() //{{{
      {
        disableHandles();
        $sel.hide();

        if (options.shade) Shade.opacity(1);
          else setBgOpacity(1);

        awake = false;
        options.onRelease.call(api);
      }
      //}}}
      function showHandles() //{{{
      {
        if (seehandles) {
          moveHandles(Coords.getFixed());
          $hdl_holder.show();
        }
      }
      //}}}
      function enableHandles() //{{{
      {
        seehandles = true;
        if (options.allowResize) {
          moveHandles(Coords.getFixed());
          $hdl_holder.show();
          return true;
        }
      }
      //}}}
      function disableHandles() //{{{
      {
        seehandles = false;
        $hdl_holder.hide();
      } 
      //}}}
      function animMode(v) //{{{
      {
        if (animating === v) {
          disableHandles();
        } else {
          enableHandles();
        }
      } 
      //}}}
      function done() //{{{
      {
        animMode(false);
        refresh();
      } 
      //}}}
      /* Insert draggable elements {{{*/

      // Insert border divs for outline
      if (options.drawBorders) {
        borders = {
          top: insertBorder('hline'),
          bottom: insertBorder('hline bottom'),
          left: insertBorder('vline'),
          right: insertBorder('vline right')
        };
      }

      // Insert handles on edges
      if (options.dragEdges) {
        handle.t = insertDragbar('n');
        handle.b = insertDragbar('s');
        handle.r = insertDragbar('e');
        handle.l = insertDragbar('w');
      }

      // Insert side and corner handles
      if (options.sideHandles) {
        createHandles(['n', 's', 'e', 'w']);
      }
      if (options.cornerHandles) {
        createHandles(['sw', 'nw', 'ne', 'se']);
      }
      //}}}

      var $track = newTracker().mousedown(createDragger('move')).css({
        cursor: 'move',
        position: 'absolute',
        zIndex: 360
      });

      if (Touch.support) {
        $track.bind('touchstart.jcrop', Touch.createDragger('move'));
      }

      $img_holder.append($track);
      disableHandles();

      return {
        updateVisible: updateVisible,
        update: update,
        release: release,
        refresh: refresh,
        isAwake: function () {
          return awake;
        },
        setCursor: function (cursor) {
          $track.css('cursor', cursor);
        },
        enableHandles: enableHandles,
        enableOnly: function () {
          seehandles = true;
        },
        showHandles: showHandles,
        disableHandles: disableHandles,
        animMode: animMode,
        setBgOpacity: setBgOpacity,
        done: done
      };
    }());
    
    //}}}
    // Tracker Module {{{
    var Tracker = (function () {
      var onMove = function () {},
          onDone = function () {},
          trackDoc = options.trackDocument;

      function toFront() //{{{
      {
        $trk.css({
          zIndex: 450
        });
        if (Touch.support) {
          $(document)
            .bind('touchmove', trackTouchMove)
            .bind('touchend', trackTouchEnd);
        }
        if (trackDoc) {
          $(document)
            .bind('mousemove',trackMove)
            .bind('mouseup',trackUp);
        }
      } 
      //}}}
      function toBack() //{{{
      {
        $trk.css({
          zIndex: 290
        });
        if (Touch.support) {
          $(document)
            .unbind('touchmove', trackTouchMove)
            .unbind('touchend', trackTouchEnd);
        }
        if (trackDoc) {
          $(document)
            .unbind('mousemove', trackMove)
            .unbind('mouseup', trackUp);
        }
      } 
      //}}}
      function trackMove(e) //{{{
      {
        onMove(mouseAbs(e));
        return false;
      } 
      //}}}
      function trackUp(e) //{{{
      {
        e.preventDefault();
        e.stopPropagation();

        if (btndown) {
          btndown = false;

          onDone(mouseAbs(e));

          if (Selection.isAwake()) {
            options.onSelect.call(api, unscale(Coords.getFixed()));
          }

          toBack();
          onMove = function () {};
          onDone = function () {};
        }

        return false;
      }
      //}}}
      function activateHandlers(move, done) //{{{
      {
        btndown = true;
        onMove = move;
        onDone = done;
        toFront();
        return false;
      }
      //}}}
      function trackTouchMove(e) //{{{
      {
        e.pageX = e.originalEvent.changedTouches[0].pageX;
        e.pageY = e.originalEvent.changedTouches[0].pageY;
        return trackMove(e);
      }
      //}}}
      function trackTouchEnd(e) //{{{
      {
        e.pageX = e.originalEvent.changedTouches[0].pageX;
        e.pageY = e.originalEvent.changedTouches[0].pageY;
        return trackUp(e);
      }
      //}}}
      function setCursor(t) //{{{
      {
        $trk.css('cursor', t);
      }
      //}}}

      if (!trackDoc) {
        $trk.mousemove(trackMove).mouseup(trackUp).mouseout(trackUp);
      }

      $img.before($trk);
      return {
        activateHandlers: activateHandlers,
        setCursor: setCursor
      };
    }());
    //}}}
    // KeyManager Module {{{
    var KeyManager = (function () {
      var $keymgr = $('<input type="radio" />').css({
        position: 'fixed',
        left: '-120px',
        width: '12px'
      }),
          $keywrap = $('<div />').css({
          position: 'absolute',
          overflow: 'hidden'
        }).append($keymgr);

      function watchKeys() //{{{
      {
        if (options.keySupport) {
          $keymgr.show();
          $keymgr.focus();
        }
      }
      //}}}
      function onBlur(e) //{{{
      {
        $keymgr.hide();
      }
      //}}}
      function doNudge(e, x, y) //{{{
      {
        if (options.allowMove) {
          Coords.moveOffset([x, y]);
          Selection.updateVisible();
        }
        e.preventDefault();
        e.stopPropagation();
      }
      //}}}
      function parseKey(e) //{{{
      {
        if (e.ctrlKey) {
          return true;
        }
        shift_down = e.shiftKey ? true : false;
        var nudge = shift_down ? 10 : 1;

        switch (e.keyCode) {
        case 37:
          doNudge(e, -nudge, 0);
          break;
        case 39:
          doNudge(e, nudge, 0);
          break;
        case 38:
          doNudge(e, 0, -nudge);
          break;
        case 40:
          doNudge(e, 0, nudge);
          break;
        case 27:
          if (options.allowSelect) Selection.release();
          break;
        case 9:
          return true;
        }

        return false;
      }
      //}}}

      if (options.keySupport) {
        $keymgr.keydown(parseKey).blur(onBlur);
        if (ie6mode || !options.fixedSupport) {
          $keymgr.css({
            position: 'absolute',
            left: '-20px'
          });
          $keywrap.append($keymgr).insertBefore($img);
        } else {
          $keymgr.insertBefore($img);
        }
      }


      return {
        watchKeys: watchKeys
      };
    }());
    //}}}
    // }}}
    // API methods {{{
    function setClass(cname) //{{{
    {
      $div.removeClass().addClass(cssClass('holder')).addClass(cname);
    }
    //}}}
    function animateTo(a, callback) //{{{
    {
      var x1 = parseInt(a[0], 10) / xscale,
          y1 = parseInt(a[1], 10) / yscale,
          x2 = parseInt(a[2], 10) / xscale,
          y2 = parseInt(a[3], 10) / yscale;

      if (animating) {
        return;
      }

      var animto = Coords.flipCoords(x1, y1, x2, y2),
          c = Coords.getFixed(),
          initcr = [c.x, c.y, c.x2, c.y2],
          animat = initcr,
          interv = options.animationDelay,
          ix1 = animto[0] - initcr[0],
          iy1 = animto[1] - initcr[1],
          ix2 = animto[2] - initcr[2],
          iy2 = animto[3] - initcr[3],
          pcent = 0,
          velocity = options.swingSpeed;

      x = animat[0];
      y = animat[1];
      x2 = animat[2];
      y2 = animat[3];

      Selection.animMode(true);
      var anim_timer;

      function queueAnimator() {
        window.setTimeout(animator, interv);
      }
      var animator = (function () {
        return function () {
          pcent += (100 - pcent) / velocity;

          animat[0] = x + ((pcent / 100) * ix1);
          animat[1] = y + ((pcent / 100) * iy1);
          animat[2] = x2 + ((pcent / 100) * ix2);
          animat[3] = y2 + ((pcent / 100) * iy2);

          if (pcent >= 99.8) {
            pcent = 100;
          }
          if (pcent < 100) {
            setSelectRaw(animat);
            queueAnimator();
          } else {
            Selection.done();
            if (typeof(callback) === 'function') {
              callback.call(api);
            }
          }
        };
      }());
      queueAnimator();
    }
    //}}}
    function setSelect(rect) //{{{
    {
      setSelectRaw([parseInt(rect[0], 10) / xscale, parseInt(rect[1], 10) / yscale, parseInt(rect[2], 10) / xscale, parseInt(rect[3], 10) / yscale]);
      options.onSelect.call(api, unscale(Coords.getFixed()));
    }
    //}}}
    function setSelectRaw(l) //{{{
    {
      Coords.setPressed([l[0], l[1]]);
      Coords.setCurrent([l[2], l[3]]);
      Selection.update();
    }
    //}}}
    function tellSelect() //{{{
    {
      return unscale(Coords.getFixed());
    }
    //}}}
    function tellScaled() //{{{
    {
      return Coords.getFixed();
    }
    //}}}
    function setOptionsNew(opt) //{{{
    {
      setOptions(opt);
      interfaceUpdate();
    }
    //}}}
    function disableCrop() //{{{
    {
      options.disabled = true;
      Selection.disableHandles();
      Selection.setCursor('default');
      Tracker.setCursor('default');
    }
    //}}}
    function enableCrop() //{{{
    {
      options.disabled = false;
      interfaceUpdate();
    }
    //}}}
    function cancelCrop() //{{{
    {
      Selection.done();
      Tracker.activateHandlers(null, null);
    }
    //}}}
    function destroy() //{{{
    {
      $div.remove();
      $origimg.show();
      $(obj).removeData('Jcrop');
    }
    //}}}
    function setImage(src, callback) //{{{
    {
      Selection.release();
      disableCrop();
      var img = new Image();
      img.onload = function () {
        var iw = img.width;
        var ih = img.height;
        var bw = options.boxWidth;
        var bh = options.boxHeight;
        $img.width(iw).height(ih);
        $img.attr('src', src);
        $img2.attr('src', src);
        presize($img, bw, bh);
        boundx = $img.width();
        boundy = $img.height();
        $img2.width(boundx).height(boundy);
        $trk.width(boundx + (bound * 2)).height(boundy + (bound * 2));
        $div.width(boundx).height(boundy);
        Shade.resize(boundx,boundy);
        enableCrop();

        if (typeof(callback) === 'function') {
          callback.call(api);
        }
      };
      img.src = src;
    }
    //}}}
    function colorChangeMacro($obj,color,now) {
      var mycolor = color || options.bgColor;
      if (options.bgFade && supportsColorFade() && options.fadeTime && !now) {
        $obj.animate({
          backgroundColor: mycolor
        }, {
          queue: false,
          duration: options.fadeTime
        });
      } else {
        $obj.css('backgroundColor', mycolor);
      }
    }
    function interfaceUpdate(alt) //{{{
    // This method tweaks the interface based on options object.
    // Called when options are changed and at end of initialization.
    {
      if (options.allowResize) {
        if (alt) {
          Selection.enableOnly();
        } else {
          Selection.enableHandles();
        }
      } else {
        Selection.disableHandles();
      }

      Tracker.setCursor(options.allowSelect ? 'crosshair' : 'default');
      Selection.setCursor(options.allowMove ? 'move' : 'default');

      if (options.hasOwnProperty('setSelect')) {
        setSelect(options.setSelect);
        Selection.done();
        delete(options.setSelect);
      }

      if (options.hasOwnProperty('trueSize')) {
        xscale = options.trueSize[0] / boundx;
        yscale = options.trueSize[1] / boundy;
      }

      Shade.refresh();

      if (options.bgColor != bgcolor) {
        colorChangeMacro(
          options.shade? Shade.getShades(): $div,
          options.shade?
            (options.shadeColor || options.bgColor):
            options.bgColor
        );
        bgcolor = options.bgColor;
      }

      if (bgopacity != options.bgOpacity) {
        bgopacity = options.bgOpacity;
        if (options.shade) Shade.refresh();
          else Selection.setBgOpacity(bgopacity);
      }

      xlimit = options.maxSize[0] || 0;
      ylimit = options.maxSize[1] || 0;
      xmin = options.minSize[0] || 0;
      ymin = options.minSize[1] || 0;

      if (options.hasOwnProperty('outerImage')) {
        $img.attr('src', options.outerImage);
        delete(options.outerImage);
      }

      Selection.refresh();
    }
    //}}}
    //}}}

    if (Touch.support) $trk.bind('touchstart', Touch.newSelection);

    $hdl_holder.hide();
    interfaceUpdate(true);

    var api = {
      setImage: setImage,
      animateTo: animateTo,
      setSelect: setSelect,
      setOptions: setOptionsNew,
      tellSelect: tellSelect,
      tellScaled: tellScaled,
      setClass: setClass,

      disable: disableCrop,
      enable: enableCrop,
      cancel: cancelCrop,
      release: Selection.release,
      destroy: destroy,

      focus: KeyManager.watchKeys,

      getBounds: function () {
        return [boundx * xscale, boundy * yscale];
      },
      getWidgetSize: function () {
        return [boundx, boundy];
      },
      getScaleFactor: function () {
        return [xscale, yscale];
      },

      ui: {
        holder: $div,
        selection: $sel
      }
    };

    if ($.browser.msie) {
      $div.bind('selectstart', function () {
        return false;
      });
    }

    $origimg.data('Jcrop', api);
    return api;
  };
  $.fn.Jcrop = function (options, callback) //{{{
  {

    function attachWhenDone(from) //{{{
    {
      var opt = (typeof(options) === 'object') ? options : {};
      var loadsrc = opt.useImg || from.src;
      var img = new Image();
      img.onload = function () {
        function attachJcrop() {
          var api = $.Jcrop(from, opt);
          if (typeof(callback) === 'function') {
            callback.call(api);
          }
        }

        function attachAttempt() {
          if (!img.width || !img.height) {
            window.setTimeout(attachAttempt, 50);
          } else {
            attachJcrop();
          }
        }
        window.setTimeout(attachAttempt, 50);
      };
      img.src = loadsrc;
    }
    //}}}

    // Iterate over each object, attach Jcrop
    this.each(function () {
      // If we've already attached to this object
      if ($(this).data('Jcrop')) {
        // The API can be requested this way (undocumented)
        if (options === 'api') {
          return $(this).data('Jcrop');
        }
        // Otherwise, we just reset the options...
        else {
          $(this).data('Jcrop').setOptions(options);
        }
      }
      // If we haven't been attached, preload and attach
      else {
        attachWhenDone(this);
      }
    });

    // Return "this" so the object is chainable (jQuery-style)
    return this;
  };
  //}}}
  // Global Defaults {{{
  $.Jcrop.defaults = {

    // Basic Settings
    allowSelect: true,
    allowMove: true,
    allowResize: true,

    trackDocument: true,

    // Styling Options
    baseClass: 'jcrop',
    addClass: null,
    bgColor: 'black',
    bgOpacity: 0.6,
    bgFade: false,
    borderOpacity: 0.4,
    handleOpacity: 0.5,
    handleSize: 7,
    handleOffset: 5,

    aspectRatio: 0,
    keySupport: true,
    cornerHandles: true,
    sideHandles: true,
    drawBorders: true,
    dragEdges: true,
    fixedSupport: true,
    touchSupport: null,

    shade: false,

    boxWidth: 0,
    boxHeight: 0,
    boundary: 2,
    fadeTime: 400,
    animationDelay: 20,
    swingSpeed: 3,

    minSelect: [0, 0],
    maxSize: [0, 0],
    minSize: [0, 0],

    // Callbacks / Event Handlers
    onChange: function () {},
    onSelect: function () {},
    onDblClick: function () {},
    onRelease: function () {}
  };

  // }}}
}(jQuery));
;/**
* Copyright 2009 Tim Down.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var log4javascript_stub = (function ()
{
    var log4javascript; function ff() { return function () { }; }
    function copy(obj, props) { for (var i in props) { obj[i] = props[i]; } }
    var f = ff(); var Logger = ff(); copy(Logger.prototype, { addChild: f, getEffectiveAppenders: f, invalidateAppenderCache: f, getAdditivity: f, setAdditivity: f, addAppender: f, removeAppender: f, removeAllAppenders: f, log: f, setLevel: f, getLevel: f, getEffectiveLevel: f, trace: f, debug: f, info: f, warn: f, error: f, fatal: f, isEnabledFor: f, isTraceEnabled: f, isDebugEnabled: f, isInfoEnabled: f, isWarnEnabled: f, isErrorEnabled: f, isFatalEnabled: f, callAppenders: f, group: f, groupEnd: f, time: f, timeEnd: f, assert: f, parent: new Logger() }); var getLogger = function () { return new Logger(); }; function EventSupport() { }; copy(EventSupport.prototype, { setEventTypes: f, addEventListener: f, removeEventListener: f, dispatchEvent: f, eventTypes: [], eventListeners: {} }); function Log4JavaScript() { }
    Log4JavaScript.prototype = new EventSupport(); log4javascript = new Log4JavaScript(); log4javascript = { isStub: true, version: "1.4.1", edition: "log4javascript", setEventTypes: f, addEventListener: f, removeEventListener: f, dispatchEvent: f, eventTypes: [], eventListeners: {}, logLog: { setQuietMode: f, setAlertAllErrors: f, debug: f, displayDebug: f, warn: f, error: f }, handleError: f, setEnabled: f, isEnabled: f, setTimeStampsInMilliseconds: f, isTimeStampsInMilliseconds: f, evalInScope: f, setShowStackTraces: f, getLogger: getLogger, getDefaultLogger: getLogger, getNullLogger: getLogger, getRootLogger: getLogger, resetConfiguration: f, Level: ff(), LoggingEvent: ff(), Layout: ff(), Appender: ff() }; log4javascript.LoggingEvent.prototype = { getThrowableStrRep: f, getCombinedMessages: f }; log4javascript.Level.prototype = { toString: f, equals: f, isGreaterOrEqual: f }; var level = new log4javascript.Level(); copy(log4javascript.Level, { ALL: level, TRACE: level, DEBUG: level, INFO: level, WARN: level, ERROR: level, FATAL: level, OFF: level }); log4javascript.Layout.prototype = { defaults: {}, format: f, ignoresThrowable: f, getContentType: f, allowBatching: f, getDataValues: f, setKeys: f, setCustomField: f, hasCustomFields: f, setTimeStampsInMilliseconds: f, isTimeStampsInMilliseconds: f, getTimeStampValue: f, toString: f }; log4javascript.SimpleDateFormat = ff(); log4javascript.SimpleDateFormat.prototype = { setMinimalDaysInFirstWeek: f, getMinimalDaysInFirstWeek: f, format: f }
    log4javascript.PatternLayout = ff(); log4javascript.PatternLayout.prototype = new log4javascript.Layout(); log4javascript.Appender = ff(); log4javascript.Appender.prototype = new EventSupport(); copy(log4javascript.Appender.prototype, { layout: new log4javascript.PatternLayout(), threshold: log4javascript.Level.ALL, loggers: [], doAppend: f, append: f, setLayout: f, getLayout: f, setThreshold: f, getThreshold: f, setAddedToLogger: f, setRemovedFromLogger: f, group: f, groupEnd: f, toString: f }); log4javascript.SimpleLayout = ff(); log4javascript.SimpleLayout.prototype = new log4javascript.Layout(); log4javascript.NullLayout = ff(); log4javascript.NullLayout.prototype = new log4javascript.Layout(); log4javascript.XmlLayout = ff(); log4javascript.XmlLayout.prototype = new log4javascript.Layout(); copy(log4javascript.XmlLayout.prototype, { escapeCdata: f, isCombinedMessages: f }); log4javascript.JsonLayout = ff(); log4javascript.JsonLayout.prototype = new log4javascript.Layout(); copy(log4javascript.JsonLayout.prototype, { isReadable: f, isCombinedMessages: f }); log4javascript.HttpPostDataLayout = ff(); log4javascript.HttpPostDataLayout.prototype = new log4javascript.Layout(); log4javascript.PatternLayout = ff(); log4javascript.PatternLayout.prototype = new log4javascript.Layout(); log4javascript.AlertAppender = ff(); log4javascript.AlertAppender.prototype = new log4javascript.Appender(); log4javascript.BrowserConsoleAppender = ff(); log4javascript.BrowserConsoleAppender.prototype = new log4javascript.Appender(); log4javascript.AjaxAppender = ff(); log4javascript.AjaxAppender.prototype = new log4javascript.Appender(); copy(log4javascript.AjaxAppender.prototype, { getSessionId: f, setSessionId: f, isTimed: f, setTimed: f, getTimerInterval: f, setTimerInterval: f, isWaitForResponse: f, setWaitForResponse: f, getBatchSize: f, setBatchSize: f, isSendAllOnUnload: f, setSendAllOnUnload: f, setRequestSuccessCallback: f, setFailCallback: f, getPostVarName: f, setPostVarName: f, sendAll: f, defaults: { requestSuccessCallback: null, failCallback: null} }); function ConsoleAppender() { }
    ConsoleAppender.prototype = new log4javascript.Appender(); copy(ConsoleAppender.prototype, { create: f, isNewestMessageAtTop: f, setNewestMessageAtTop: f, isScrollToLatestMessage: f, setScrollToLatestMessage: f, getWidth: f, setWidth: f, getHeight: f, setHeight: f, getMaxMessages: f, setMaxMessages: f, isShowCommandLine: f, setShowCommandLine: f, isShowHideButton: f, setShowHideButton: f, isShowCloseButton: f, setShowCloseButton: f, getCommandLineObjectExpansionDepth: f, setCommandLineObjectExpansionDepth: f, isInitiallyMinimized: f, setInitiallyMinimized: f, isUseDocumentWrite: f, setUseDocumentWrite: f, group: f, groupEnd: f, clear: f, focus: f, focusCommandLine: f, focusSearch: f, getCommandWindow: f, setCommandWindow: f, executeLastCommand: f, getCommandLayout: f, setCommandLayout: f, evalCommandAndAppend: f, addCommandLineFunction: f, storeCommandHistory: f, unload: f }); ConsoleAppender.addGlobalCommandLineFunction = f; log4javascript.InPageAppender = ff(); log4javascript.InPageAppender.prototype = new ConsoleAppender(); copy(log4javascript.InPageAppender.prototype, { addCssProperty: f, hide: f, show: f, isVisible: f, close: f, defaults: { layout: new log4javascript.PatternLayout(), maxMessages: null} }); log4javascript.InlineAppender = log4javascript.InPageAppender; log4javascript.PopUpAppender = ff(); log4javascript.PopUpAppender.prototype = new ConsoleAppender(); copy(log4javascript.PopUpAppender.prototype, { isUseOldPopUp: f, setUseOldPopUp: f, isComplainAboutPopUpBlocking: f, setComplainAboutPopUpBlocking: f, isFocusPopUp: f, setFocusPopUp: f, isReopenWhenClosed: f, setReopenWhenClosed: f, close: f, hide: f, show: f, defaults: { layout: new log4javascript.PatternLayout(), maxMessages: null} }); return log4javascript;
})(); if (typeof window.log4javascript == "undefined") { var log4javascript = log4javascript_stub; }

var log = log4javascript.getDefaultLogger();
log.setLevel(log4javascript.Level.OFF);;var log4javascriptFactoryClass = function ()
{
    if ($.cookie('enable_log4javascript') != 'true')
        log4javascript.setEnabled(false);

    this.appender = new log4javascript.PopUpAppender();
    this.appender.setFocusPopUp(true);
    this.appender.setLayout(new log4javascript.PatternLayout("%d [%-5p] %-15c: %m{1}"));
}

log4javascriptFactoryClass.prototype.getLogger = function (name)
{
    var log = log4javascript.getLogger(name);
    log.setLevel(log4javascript.Level.ALL);

    log.addAppender(this.appender);

    return log;
}

var log4javascriptFactory = new log4javascriptFactoryClass();;/*
 *
 * Copyright (c) 2010 C. F., Wong (<a href="http://cloudgen.w0ng.hk">Cloudgen Examplet Store</a>)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
// version 1.02 
// fix the problem when precision has been set and the input start with decimal dot or comma ,e.g. precision set to 3 and input with ".1234"
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('f O={1d:v w("^[^\\@]+\\@[^\\@]+\\.(A[C-20-1m-1Q]|B[1A-1O-1G-1M]|C[1L-2m-2p-Z]|D[2t]|E[2s-U]|F[I-2d]|G[1A-2n-2o-2k]|H[2v]|I[2e-1m-T]|J[2f]|K[1u-2g]|L[A-2h-2c]|M[2b-27-Z]|N[26-28]|29|P[2a-2i-2j-2u]|2q|R[2l]|S[A-1u-2w-25]|T[24-1K-1N]|U[1J]|V[1P]|W[1I]|1E|Y[1D]|Z[1F]|1H|1Z|21|22|23|1Y|1X|1S|1R|1T|1U|1W|1V|2r|2x|2W|2X|2Y|2V|2U|2R)$","i")};(n($){$.15($.2S[":"],{1h:n(d,a,c){f e=v w(c[3],"g");f b=("19"===d.j)?d.r:d.2Z;6(b=="")?l:(e.30(b))}});$.1i.11=n(d){2(1g(d)!="3b"){6(7.1e(":19"))?7.12(d):7.1v(d)}6(7.1e(":19"))?7.12():7.1v()};14={1n:n(4){f 4=$.15({j:"k",q:5,k:\'.\',t:l},4);f y="";2(4.j=="k"){f e=(4.t)?"-?":"";2(4.q>0)y="^"+e+"\\\\d+$|^"+e+"\\\\d*"+4.k+"\\\\d{1,"+4.q+"}$";m y="^"+e+"\\\\d+$"}m 2(4.j=="17-18"){y="^\\\\d[\\\\d\\\\-]*\\\\d$"}m 2(4.j=="10"){y="^[A-1s-z]+$"}6 y},1l:n(d){f a=$(d).11();f c=p;f e=l;f e=v w("[\\s\\~\\!\\#\\$\\%\\^\\&\\*\\+\\=\\(\\)\\[\\]\\{\\}\\<\\>\\\\\\/\\;\\:\\,\\?\\|]+");2(a.1a(e)!=16){6 c}2(a.1a(/((\\.\\.)|(\\.\\-)|(\\.\\@)|(\\-\\.)|(\\-\\-)|(\\-\\@)|(\\@\\.)|(\\@\\-)|(\\@\\@))+/)!=16){6 c}2(a.X("\\\'")!=-1){6 c}2(a.X("\\"")!=-1){6 c}2(O.1d&&a.1a(O.1d)==16){6 c}6 e},1j:n(1b,4){f 4=$.15({j:"k",q:5,k:\'.\',t:l},4);f 1c=$(1b).11();f o=1c;2(4.j=="k"){2(o!=""){f g;f h=(4.t)?"\\\\-":"";f i="\\\\"+4.k;g=v w("[^\\\\d"+h+i+"]+","g");o=o.x(g,"");f h=(4.t)?"\\\\-?":"";2(4.q>0)g=v w("^("+h+"\\\\d*"+i+"\\\\d{1,"+4.q+"}).*");m g=v w("^("+h+"\\\\d+).*");o=o.x(g,"$1")}}m 2(4.j=="17-18"){o=o.x(/[^\\-\\d]+/g,"").x(/^\\-+/,"").x(/\\-+/,"-")}m 2(4.j=="10"){o=o.x(/[^A-1s-z]+/g,"")}2(o!=1c)$(1b).11(o)}};$.1i.2L=n(4,u){f 4=$.15({j:"k",q:5,k:".",t:l,1r:p},4);f k=4.k;u=1g u=="n"?u:n(){};7.2K(n(d){$(7).1p("1q-r",$(7).12());f a=d.1w?d.1w:d.1k?d.1k:0;2(a==13&&7.2P.2M()!="2H"){6 p}2((d.2A&&(a==2y||a==2B||a==2E||a==2D||a==33||a==32||a==3a||a==2T||a==2z||a==3c||a==Q))||(a==1x&&d.1t!=16&&d.1t==0))6 l;2(a<2Q||a>2G){2(4.j=="k"){2(4.t&&a==Q&&7.r.1z==0)6 l;2(a==k.2I(0)){2(4.q>0&&7.r.X(k)==-1)6 l;m 6 p}2(a!=8&&a!=9&&a!=13&&a!=35&&a!=36&&a!=37&&a!=39){6 p}6 l}m 2(4.j=="O"){2(a==8||a==9||a==13||(a>34&&a<38)||a==39||a==Q||a==1x||(a>1f&&a<1B)||(a>1y&&a<1C)||a==2F){6 l}2(a==1f&&7.r.X("@")==-1)6 l;6 p}m 2(4.j=="17-18"){2(a==Q&&7.r.1z==0)6 p;2(a==8||a==9||a==13||(a>34&&a<38)||a==39||a==Q){6 l}6 p}m 2(4.j=="10"){2(a==8||a==9||a==13||(a>34&&a<38)||a==39||(a>1f&&a<1B)||(a>1y&&a<1C))6 l}m 6 p}m{2(4.j=="10"){6 p}m 6 l}}).2J(n(){2(4.j=="O"){2(!14.1l(7)){u.1o(7)}}m{2(!$(7).1e(":1h("+14.1n(4)+")")){u.1o(7)}}}).2O(n(){$(7).2N()});2(4.1r){7.2C(n(d){2($(7).1p("1q-r")!=$(7).12())14.1j(7,4)})}6 7}})(31);',62,199,'||if||settings||return|this||||||||var||||type|decimal|true|else|function|newText|false|precision|value||allow_negative|wrongFormatHandler|new|RegExp|replace|result||||||||||||||||email||45|||||||indexOf|||alphabet|output|val||formatter|extend|null|phone|number|text|match|target|oldText|tldn|is|64|typeof|regex|fn|formatString|keyCode|isEmail|OQ|getRegex|apply|data|old|autofix|Za|which|EG|html|charCode|46|96|length|ABD|91|123|ETU|XN|AMW|OR|AERO|FS|AGKMSYZ|HJ|ACDF|TVWYZ|PRTVWZ|JM|ACEGINU|UWXZ|GOV|EDU|INFO|INT|MIL|JOBS|COOP|COM|ARPA|GL|ASIA|BIZ|CAT|CDF|VYZ|ACE|EGHK|GILOPRUZ|OM|AE|AC|VY|KMOR|DEL|EMOP|IMNPRWYZ|CIKR|HKL|NR|UWY|EOSUW|IK|IL|NP|ORUVX|QA|MOBI|CEGR|EJKMOZ|TWY|KMNRTU|ORT|MUSEUM|97|118|ctrlKey|65|keyup|88|120|95|57|input|charCodeAt|blur|keypress|format|toLowerCase|select|focus|nodeName|48|TRAVEL|expr|90|TEL|PRO|NAME|NET|ORG|innerHTML|exec|jQuery|67|99|||||||122|undefined|86'.split('|'),0,{}))
;(function(a){a.fn.styleSelect=function(c){var b={validateValue:function(){}};return a(this).not(".styled").each(function(){var d=a(this),h=d.attr("class"),k=d[0].disabled=d[0].disabled||d.find("option").length===0,e,f,m,l=a.extend(b,c),g=function(){var b=a(this),c=a(b.data("a")),d=a(!isNaN(this.selectedIndex)?"option:eq("+this.selectedIndex+")":"option:not([disabled]):first",b);b.data("text",d.text());b.data("val",d.val());this.isOpen=false;c.removeClass("active");a("span.text",c).text(d.text());if(d.attr("label")){a("span.text",c).prepend('<img src="'+d.attr("label")+'">');c.addClass("image")}a(c.data("options")).remove();a("body").unbind("mousedown."+b.attr("id"));a(document).unbind("keydown."+b.attr("id"));a(document).unbind("keypress."+b.attr("id"));c.cufon()},i=function(c){var b=a(a(this).parent().parent().data("select"));b[0].selectedIndex=a(this).index();b.trigger("update");b.trigger("change");clearTimeout(b[0].timeout);c.stopPropagation();e.cufon()},j=function(){var j=parseFloat(topOffsetFunc(a(this))),b=a(this),g=b.offset(),f=a("html body").offset(),c,e=a("<div class='options' />").addClass(h).data("select",b.data("select")).data("a",this).css({top:j+g.top-f.top+b.height()-1,left:g.left-f.left}).mousedown(function(a){a.stopPropagation()}).mouseenter(function(){clearTimeout(a(this).data("select").timeout);a("body").unbind("mousedown."+a(a(this).data("select")).attr("id"))}).mouseleave(function(){var b=a(a(this).data("select"));a("body").bind("mousedown."+b.attr("id"),function(){b.trigger("update")});clearTimeout(b[0].timeout);b[0].timeout=setTimeout(function(){b.trigger("update")},1e3)});a("html body > .options").each(function(){a(a(this).data("select")).change()});a(document).bind("keydown."+d.attr("id"),function(h){var e=h.which,f=a("html body > div.options"),d,g,c;if(f)if(a.inArray(e,[13,27,33,34,38,40])>-1){d=f.find("li");g=d.length;c=d.filter(".active").index();if(e===13)if(c>-1){d.eq(c).triggerHandler("mousedown.option");return false}else{a(f.data("select")).change();return false}else if(e===27){a(f.data("select")).change();return false}else if(e===38)c=c>0?c-1:g-1;else if(e===33)c=0;else if(e===40)c=c<d.length-1?c+1:0;else if(e===34)c=g-1;if(c>-1){f.find("li.active").removeClass("active");d.eq(c).addClass("active");f[0].scrollTop=d.eq(c).position().top}return false}b.cufon()});a(document).bind("keypress."+d.attr("id"),function(k){var j,e,b,f=-1,d,i,c=a("html body > div.options"),g=function(b){return a.trim(b.text()).substr(0,1).toUpperCase()===j},h=function(c){var b=-1;c.each(function(){if(g(a(this))){b=a(this).index();return false}});return b};if(c){j=String.fromCharCode(k.which).toUpperCase();b=c.find("li.active:first");e=g(b)?b.index():-1;i="li"+(e>-1?":gt("+e+")":"");d=h(c.find("li"));if(e>-1)f=h(c.find(i));d=Math.max(d,f);if(d>-1){b.removeClass("active");b=c.find("li:eq("+d+")").addClass("active");b.addClass("active");c[0].scrollTop=b.position().top;return false}}});b.data("options",e[0]);c=a("<ul />").appendTo(e);d=a(b.data("select"));d[0].isOpen=true;d.find("option").each(function(f){var e=a(this),g=a(this).attr("label")?'<img src="'+e.attr("label")+'">':"",b=a("<li><a>"+g+e.text()+"</a></li>").appendTo(c);if(this.disabled)b.addClass("disabled");else{f===d[0].selectedIndex&&b.addClass("active");b.mouseover(function(){a(this).addClass("over")}).mouseout(function(){a(this).removeClass("over")}).bind("mousedown.option",i)}});c.find("li:last").not(".active").addClass("last");c.find("li:odd").not(".active").addClass("odd");e.appendTo("html body").focus();c.css({width:b.width()-3})};e=a('<a class="button select" />').addClass(h+(k?" disabled":""));$leftContainer=a('<span class="l">&nbsp;</span>').appendTo(e);$centerContainer=a('<span class="c" />').appendTo(e);f=a('<span class="text" />').appendTo($centerContainer);$Bullet=a('<span class="bullet" />').appendTo($centerContainer);$rightContainer=a('<span class="r">&nbsp;</span>').appendTo(e);if(a.browser.webkit)f.width(d.width()-64);else f.width(d.width()-62);d.addClass("styled");this.timeout=0;this.isOpen=false;e.data("select",this);e.mouseenter(function(){a(this).addClass("over");clearTimeout(a(this).data("select").timeout)}).mouseleave(function(){a(this).removeClass("over");var b=a(a(this).data("select"));clearTimeout(b[0].timeout);b[0].timeout=setTimeout(function(){b.trigger("update")},1e3)}).mousedown(function(b){if(!a(this).data("select").disabled)if(!a(this).data("select").isOpen){b.stopPropagation();a(this).addClass("active");e.cufon();j.call(this)}});d.before(e).data("a",e[0]).bind("disable",function(){a(this)[0].disabled=true;a(a(this).data("a")).addClass("disabled")}).bind("enable",function(){a(this)[0].disabled=false;a(a(this).data("a")).removeClass("disabled")}).bind("error",function(){if(a(this).prev().find(".errorMark").length===0){a(this).triggerHandler("clear");a(this).prev().addClass("error").append("<span class='errorMark' />")}}).bind("confirm",function(){if(a(this).prev().find(".confirmedMark").length===0){a(this).triggerHandler("clear");a(this).prev().append("<span class='confirmedMark' />")}}).bind("clear",function(){a(this).prev().removeClass("error").find(".errorMark, .confirmedMark").remove()}).bind("reset",function(){this.selectedIndex=0;a(this).triggerHandler("clear");a(this).triggerHandler("update")}).bind("change",function(){setTimeout("styleSelectUpdated('"+a(this).attr("class")+"')",200);if(a(this).is(".validate"))if(l.validateValue(a(this)))a(this).triggerHandler("confirm");else a(this).triggerHandler("error");g.call(this)}).bind("update",g).hide();d.trigger("update")})}})(jQuery);function styleSelectUpdated(b){var a=b;a=a.substring(a.lastIndexOf("update"));a=a.substring(0,a.indexOf(" "));a="ddl-"+a.replace("update-","").trim();$("a.select.PandoraDropDown."+a).remove();$("div.options.PandoraDropDown."+a).remove();$("select.PandoraDropDown."+a).removeClass("styled");if($.browser.msie)setTimeout("otherStyleFunc('"+a+"')",300);else otherStyleFunc(a)}function otherStyleFunc(a){$("select.PandoraDropDown."+a).styleSelect()}function styleSelectReset(){$("a.select.PandoraDropDown").remove();$("div.options.PandoraDropDown").remove();$("select.PandoraDropDown").removeClass("styled");$("select.PandoraDropDown").styleSelect()}function topOffsetFunc(b){var a=0;if($(b).parent().find("select").attr("topoffset")!=null)a=$(b).parent().find("select").attr("topoffset");return a};$().ready(function () {
    $("select.PandoraDropDown").styleSelect();

    $('div.checkbox-label-container.radio').live('click', function () {
        $(this).parent().find('div.checkbox-label-container.radio div.checkbox-label').removeClass('checked').find('input').each(function () { $(this).removeAttr('checked'); });
        $(this).find('div.checkbox-label').addClass('checked').find('input').each(function () { $(this).attr('checked', 'cheked'); });
    });

    $('div.checkbox-label-container.check-box .checkbox-label').live('click', function () {        
        if ($(this).hasClass("checked") == true) {            
            $(this).removeClass('checked').find('input').each(function () { $(this).removeAttr('checked'); });
        } else {
            $(this).addClass('checked').find('input').each(function () { $(this).attr('checked', 'cheked'); });
        }
    });
});;$(document).ready(function () {
    if ($.browser.msie) {
        var bgfullscreen = false;
        if($('.background.fullscreen').length > 0)
        { bgfullscreen = true; }

        backgroundImageIE(bgfullscreen);
        if ($(".backgroundIEc").length > 0) 
        { backgroundImageIEc(bgfullscreen); }

        $(window).resize(function() { backgroundImageIE(bgfullscreen); if ($(".backgroundIEc").length > 0) { backgroundImageIEc(bgfullscreen); } });
    }
});


// for scaling the background image on IE
function backgroundImageIE(fullscreenBG) {
    // get window size
    var wHeight = $(window).height();
    var wWidth = $(window).width();

    // per default container is 100%
    $("#backgroundContainerIE").css("height", "100%").css("width", "100%");

    // set height
    if(($('#page').height() + $('#menu').height() + $('#top').height() + $('#footer').height() + 50) > wHeight) {
        wHeight = ($('#page').height() + $('#menu').height() + $('#top').height() + $('#footer').height() + 50);
    }
    // set width
    if (($('#page').width() + 40) > wWidth) {
        wWidth = ($('#page').width() + 40);
    }

    // set container height and width
    $("#backgroundContainerIE").css("height", wHeight).css("width", wWidth);

    // height & width for fullscreen
    if (fullscreenBG) {
        $("#backgroundIE").css("height", "auto").css("width", "100%");
        if($("#backgroundIE").height() < wHeight){
            $("#backgroundIE").css("height", "100%").css("width", "auto");
        }
    } else {
        if ($('#backgroundIE').width() > $(window).width()) {
            if ($(window).width() > 1000) {
                $('#backgroundIE').css('margin-left', -(($('#backgroundIE').width() - $(window).width())/2)).css('margin-right', -(($('#backgroundIE').width() - $(window).width())/2))
            }
        } else {
            
            $('#backgroundIE').css('margin-left', '0').css('margin-right', '0');
        }
    }
}

// for scaling the background image on IE on curtain
function backgroundImageIEc(fullscreenBG) {
    // get window size
    var wHeight = $(window).height();
    var wWidth = $(window).width();

    // per default container is 100%
    $("#backgroundContainerIE").css("height", "100%").css("width", "100%");

    // set height
    if(($('#page').height() + $('#menu').height() + $('#top').height() + $('#footer').height() + 50) > wHeight) {
        wHeight = ($('#page').height() + $('#menu').height() + $('#top').height() + $('#footer').height() + 50);
    }
    // set width
    if (($('#page').width() + 40) > wWidth) {
        wWidth = ($('#page').width() + 40);
    }

    // set container height and width
    $("#backgroundContainerIEc").css("height", wHeight).css("width", wWidth);


    // height & width for fullscreen
    if (fullscreenBG) {
        $("#backgroundIEc").css("height", "auto").css("width", "100%");
        if($("#backgroundIEc").height() < wHeight){
            $("#backgroundIEc").css("height", "100%").css("width", "auto");
        }
    } else {
        if ($('#backgroundIEc').width() > $(window).width()) {
            if ($(window).width() > 1000) {
                $('#backgroundIEc').css('margin-left', -(($('#backgroundIEc').width() - $(window).width())/2)).css('margin-right', -(($('#backgroundIEc').width() - $(window).width())/2))
            }
        } else {
            $('#backgroundIEc').css('margin-left', '0').css('margin-right', '0');
        }
    }
};var qq=qq||{};qq.extend=function(c,a){for(var b in a)c[b]=a[b]};qq.indexOf=function(b,c,a){if(b.indexOf)return b.indexOf(c,a);a=a||0;var d=b.length;if(a<0)a+=d;for(;a<d;a++)if(a in b&&b[a]===c)return a;return -1};qq.getUniqueId=function(){var a=0;return function(){return a++}}();qq.attach=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else a.attachEvent&&a.attachEvent("on"+b,c)};qq.detach=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,false);else a.attachEvent&&a.detachEvent("on"+b,c)};qq.preventDefault=function(a){if(a.preventDefault)a.preventDefault();else a.returnValue=false};qq.insertBefore=function(b,a){a.parentNode.insertBefore(b,a)};qq.remove=function(a){a.parentNode.removeChild(a)};qq.contains=function(a,b){if(a==b)return true;if(a.contains)return a.contains(b);else return !!(b.compareDocumentPosition(a)&8)};qq.toElement=function(){var a=document.createElement("div");return function(c){a.innerHTML=c;var b=a.firstChild;a.removeChild(b);return b}}();qq.css=function(b,a){if(a.opacity!=null)if(typeof b.style.opacity!="string"&&typeof b.filters!="undefined")a.filter="alpha(opacity="+Math.round(100*a.opacity)+")";qq.extend(b.style,a)};qq.hasClass=function(a,b){var c=new RegExp("(^| )"+b+"( |$)");return c.test(a.className)};qq.addClass=function(a,b){if(!qq.hasClass(a,b))a.className+=" "+b};qq.removeClass=function(a,b){var c=new RegExp("(^| )"+b+"( |$)");a.className=a.className.replace(c," ").replace(/^\s+|\s+$/g,"")};qq.setText=function(a,b){a.innerText=b;a.textContent=b};qq.children=function(c){var b=[],a=c.firstChild;while(a){a.nodeType==1&&b.push(a);a=a.nextSibling}return b};qq.getByClass=function(c,d){if(c.querySelectorAll)return c.querySelectorAll("."+d);for(var e=[],b=c.getElementsByTagName("*"),f=b.length,a=0;a<f;a++)qq.hasClass(b[a],d)&&e.push(b[a]);return e};qq.obj2url=function(a,b,g){var d=[],e="&",f=function(a,e){var c=b?/\[\]$/.test(b)?b:b+"["+e+"]":e;c!="undefined"&&e!="undefined"&&d.push(typeof a==="object"?qq.obj2url(a,c,true):Object.prototype.toString.call(a)==="[object Function]"?encodeURIComponent(c)+"="+encodeURIComponent(a()):encodeURIComponent(c)+"="+encodeURIComponent(a))};if(!g&&b){e=/\?/.test(b)?/\?$/.test(b)?"":"&":"?";d.push(b);d.push(qq.obj2url(a))}else if(Object.prototype.toString.call(a)==="[object Array]"&&typeof a!="undefined")for(var c=0,h=a.length;c<h;++c)f(a[c],c);else if(typeof a!="undefined"&&a!==null&&typeof a==="object")for(var c in a)f(a[c],c);else d.push(encodeURIComponent(b)+"="+encodeURIComponent(a));return d.join(e).replace(/^&/,"").replace(/%20/g,"+")};var qq=qq||{};qq.FileUploaderBasic=function(a){this._options={debug:false,action:"/server/upload",params:{},button:null,multiple:true,maxConnections:3,allowedExtensions:[],sizeLimit:0,minSizeLimit:0,onSubmit:function(){},onProgress:function(){},onComplete:function(){},onCancel:function(){},messages:{typeError:"{file} has invalid extension. Only {extensions} are allowed.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",onLeave:"The files are being uploaded, if you leave now the upload will be cancelled."},showMessage:function(a){alert(a)},disableWhileUploading:false};qq.extend(this._options,a);this._filesInProgress=0;this._handler=this._createUploadHandler();if(this._options.button)this._button=this._createUploadButton(this._options.button);this._preventLeaveInProgress()};qq.FileUploaderBasic.prototype={setParams:function(a){this._options.params=a},getInProgress:function(){return this._filesInProgress},_createUploadButton:function(a){var b=this;return new qq.UploadButton({element:a,multiple:this._options.multiple&&qq.UploadHandlerXhr.isSupported(),onChange:function(a){b._onInputChange(a)}})},_createUploadHandler:function(){var a=this,b;if(qq.UploadHandlerXhr.isSupported())b="UploadHandlerXhr";else b="UploadHandlerForm";var c=new qq[b]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(e,b,c,d){a._onProgress(e,b,c,d);a._options.onProgress(e,b,c,d)},onComplete:function(d,b,c){a._onComplete(d,b,c);a._options.onComplete(d,b,c)},onCancel:function(c,b){a._onCancel(c,b);a._options.onCancel(c,b)}});return c},_preventLeaveInProgress:function(){var a=this;qq.attach(window,"beforeunload",function(b){if(!a._filesInProgress)return;var b=b||window.event;b.returnValue=a._options.messages.onLeave;return a._options.messages.onLeave})},_onSubmit:function(){this._filesInProgress++},_onProgress:function(){},_onComplete:function(c,b,a){this._filesInProgress--;this._options.disableWhileUploading&&this._button.enable();a.error&&this._options.showMessage(a.error)},_onCancel:function(){this._filesInProgress--},_onInputChange:function(a){if(this._handler instanceof qq.UploadHandlerXhr)this._uploadFileList(a.files);else this._validateFile(a)&&this._uploadFile(a);this._options.disableWhileUploading&&this._button.disable();this._button.reset()},_uploadFileList:function(b){for(var a=0;a<b.length;a++)if(!this._validateFile(b[a]))return;for(var a=0;a<b.length;a++)this._uploadFile(b[a])},_uploadFile:function(c){var a=this._handler.add(c),b=this._handler.getName(a);if(this._options.onSubmit(a,b)!==false){this._onSubmit(a,b);this._handler.upload(a,this._options.params)}},_validateFile:function(a){var b,c;if(a.value)b=a.value.replace(/.*(\/|\\)/,"");else{b=a.fileName!=null?a.fileName:a.name;c=a.fileSize!=null?a.fileSize:a.size}if(!this._isAllowedExtension(b)){this._error("typeError",b);return false}else if(c===0){this._error("emptyError",b);return false}else if(c&&this._options.sizeLimit&&c>this._options.sizeLimit){this._error("sizeError",b);return false}else if(c&&c<this._options.minSizeLimit){this._error("minSizeError",b);return false}return true},_error:function(d,c){var b=this._options.messages[d];function a(c,a){b=b.replace(c,a)}a("{file}",this._formatFileName(c));a("{extensions}",this._options.allowedExtensions.join(", "));a("{sizeLimit}",this._formatSize(this._options.sizeLimit));a("{minSizeLimit}",this._formatSize(this._options.minSizeLimit));this._options.showMessage(b)},_formatFileName:function(a){if(a.length>33)a=a.slice(0,19)+"..."+a.slice(-13);return a},_isAllowedExtension:function(c){var d=-1!==c.indexOf(".")?c.replace(/.*[.]/,"").toLowerCase():"",a=this._options.allowedExtensions;if(!a.length)return true;for(var b=0;b<a.length;b++)if(a[b].toLowerCase()==d)return true;return false},_formatSize:function(a){var b=-1;do{a=a/1024;b++}while(a>99);return Math.max(a,.1).toFixed(1)+(["kB","MB","GB","TB","PB","EB"])[b]}};qq.FileUploader=function(a){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader"><div class="qq-upload-drop-area"><span>Drop files here to upload</span></div><div class="qq-upload-button">Upload a file</div><ul class="qq-upload-list"></ul></div>',fileTemplate:'<li><span class="qq-upload-file"></span><span class="qq-upload-spinner"></span><span class="qq-upload-size"></span><a class="qq-upload-cancel" href="#">Cancel</a><span class="qq-upload-failed-text">Failed</span></li>',classes:{button:"qq-upload-button",drop:"qq-upload-drop-area",dropActive:"qq-upload-drop-area-active",list:"qq-upload-list",file:"qq-upload-file",spinner:"qq-upload-spinner",size:"qq-upload-size",cancel:"qq-upload-cancel",success:"qq-upload-success",fail:"qq-upload-fail"}});qq.extend(this._options,a);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,"list");this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,"button"));this._bindCancelEvent();this._setupDragDrop()};qq.extend(qq.FileUploader.prototype,qq.FileUploaderBasic.prototype);qq.extend(qq.FileUploader.prototype,{_find:function(c,b){var a=qq.getByClass(c,this._options.classes[b])[0];if(!a)throw new Error("element not found "+b);return a},_setupDragDrop:function(){var b=this,a=this._find(this._element,"drop"),c=new qq.UploadDropZone({element:a,onEnter:function(c){qq.addClass(a,b._classes.dropActive);c.stopPropagation()},onLeave:function(a){a.stopPropagation()},onLeaveNotDescendants:function(){qq.removeClass(a,b._classes.dropActive)},onDrop:function(c){a.style.display="none";qq.removeClass(a,b._classes.dropActive);b._uploadFileList(c.dataTransfer.files)}});a.style.display="none";qq.attach(document,"dragenter",function(b){if(!c._isValidFileDrag(b))return;a.style.display="block"});qq.attach(document,"dragleave",function(b){if(!c._isValidFileDrag(b))return;var d=document.elementFromPoint(b.clientX,b.clientY);if(!d||d.nodeName=="HTML")a.style.display="none"})},_onSubmit:function(b,a){qq.FileUploaderBasic.prototype._onSubmit.apply(this,arguments);this._addToList(b,a)},_onProgress:function(f,g,c,a){qq.FileUploaderBasic.prototype._onProgress.apply(this,arguments);var e=this._getItemByFileId(f),d=this._find(e,"size");d.style.display="inline";var b;if(c!=a)b=Math.round(c/a*100)+"% from "+this._formatSize(a);else b=this._formatSize(a);qq.setText(d,b)},_onComplete:function(c,d,b){qq.FileUploaderBasic.prototype._onComplete.apply(this,arguments);var a=this._getItemByFileId(c);qq.remove(this._find(a,"cancel"));qq.remove(this._find(a,"spinner"));if(b.success)qq.addClass(a,this._classes.success);else qq.addClass(a,this._classes.fail)},_addToList:function(d,c){var a=qq.toElement(this._options.fileTemplate);a.qqFileId=d;var b=this._find(a,"file");qq.setText(b,this._formatFileName(c));this._find(a,"size").style.display="none";this._listElement.appendChild(a)},_getItemByFileId:function(b){var a=this._listElement.firstChild;while(a){if(a.qqFileId==b)return a;a=a.nextSibling}},_bindCancelEvent:function(){var a=this,b=this._listElement;qq.attach(b,"click",function(b){b=b||window.event;var c=b.target||b.srcElement;if(qq.hasClass(c,a._classes.cancel)){qq.preventDefault(b);var d=c.parentNode;a._handler.cancel(d.qqFileId);qq.remove(d)}})}});qq.UploadDropZone=function(a){this._options={element:null,onEnter:function(){},onLeave:function(){},onLeaveNotDescendants:function(){},onDrop:function(){}};qq.extend(this._options,a);this._element=this._options.element;this._disableDropOutside();this._attachEvents()};qq.UploadDropZone.prototype={_disableDropOutside:function(){if(!qq.UploadDropZone.dropOutsideDisabled){qq.attach(document,"dragover",function(a){if(a.dataTransfer){a.dataTransfer.dropEffect="none";a.preventDefault()}});qq.UploadDropZone.dropOutsideDisabled=true}},_attachEvents:function(){var a=this;qq.attach(a._element,"dragover",function(b){if(!a._isValidFileDrag(b))return;var c=b.dataTransfer.effectAllowed;if(c=="move"||c=="linkMove")b.dataTransfer.dropEffect="move";else b.dataTransfer.dropEffect="copy";b.stopPropagation();b.preventDefault()});qq.attach(a._element,"dragenter",function(b){if(!a._isValidFileDrag(b))return;a._options.onEnter(b)});qq.attach(a._element,"dragleave",function(b){if(!a._isValidFileDrag(b))return;a._options.onLeave(b);var c=document.elementFromPoint(b.clientX,b.clientY);if(qq.contains(this,c))return;a._options.onLeaveNotDescendants(b)});qq.attach(a._element,"drop",function(b){if(!a._isValidFileDrag(b))return;b.preventDefault();a._options.onDrop(b)})},_isValidFileDrag:function(c){var a=c.dataTransfer,b=navigator.userAgent.indexOf("AppleWebKit")>-1;return a&&a.effectAllowed!="none"&&(a.files||!b&&a.types.contains&&a.types.contains("Files"))}};qq.UploadButton=function(a){this._options={element:null,multiple:false,name:"file",onChange:function(){},hoverClass:"qq-upload-button-hover",focusClass:"qq-upload-button-focus",inactiveClass:"qq-upload-button-inactive"};qq.extend(this._options,a);this._element=this._options.element;this._active=true;qq.css(this._element,{position:"relative",overflow:"hidden",direction:"ltr"});this._input=this._createInput()};qq.UploadButton.prototype={getInput:function(){return this._input},disable:function(){this._active=false;this._input.setAttribute("disabled","disabled");qq.addClass(this._element,this._options.inactiveClass)},enable:function(){this._active=true;this._input.removeAttribute("disabled");qq.removeClass(this._element,this._options.inactiveClass)},reset:function(){this._input.parentNode&&qq.remove(this._input);qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput();!this._active&&this.disable()},_createInput:function(){var a=document.createElement("input");this._options.multiple&&a.setAttribute("multiple","multiple");a.setAttribute("type","file");a.setAttribute("name",this._options.name);qq.css(a,{position:"absolute",right:0,top:0,fontFamily:"Arial",fontSize:"118px",margin:0,padding:0,cursor:"pointer",opacity:0});this._element.appendChild(a);var b=this;qq.attach(a,"change",function(){b._options.onChange(a)});qq.attach(a,"mouseover",function(){qq.addClass(b._element,b._options.hoverClass)});qq.attach(a,"mouseout",function(){qq.removeClass(b._element,b._options.hoverClass)});qq.attach(a,"focus",function(){qq.addClass(b._element,b._options.focusClass)});qq.attach(a,"blur",function(){qq.removeClass(b._element,b._options.focusClass)});window.attachEvent&&a.setAttribute("tabIndex","-1");return a}};qq.UploadHandlerAbstract=function(a){this._options={debug:false,action:"/upload.php",maxConnections:999,onProgress:function(){},onComplete:function(){},onCancel:function(){}};qq.extend(this._options,a);this._queue=[];this._params=[]};qq.UploadHandlerAbstract.prototype={log:function(a){this._options.debug&&window.console&&console.log("[uploader] "+a)},add:function(){},upload:function(a,c){var d=this._queue.push(a),b={};qq.extend(b,c);this._params[a]=b;d<=this._options.maxConnections&&this._upload(a,this._params[a])},cancel:function(a){this._cancel(a);this._dequeue(a)},cancelAll:function(){for(var a=0;a<this._queue.length;a++)this._cancel(this._queue[a]);this._queue=[]},getName:function(){},getSize:function(){},getQueue:function(){return this._queue},_upload:function(){},_cancel:function(){},_dequeue:function(d){var c=qq.indexOf(this._queue,d);this._queue.splice(c,1);var a=this._options.maxConnections;if(this._queue.length>=a&&c<a){var b=this._queue[a-1];this._upload(b,this._params[b])}}};qq.UploadHandlerForm=function(){qq.UploadHandlerAbstract.apply(this,arguments);this._inputs={}};qq.extend(qq.UploadHandlerForm.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerForm.prototype,{add:function(a){a.setAttribute("name","qqfile");var b="qq-upload-handler-iframe"+qq.getUniqueId();this._inputs[b]=a;a.parentNode&&qq.remove(a);return b},getName:function(a){return this._inputs[a].value.replace(/.*(\/|\\)/,"")},_cancel:function(a){this._options.onCancel(a,this.getName(a));delete this._inputs[a];var b=document.getElementById(a);if(b){b.setAttribute("src","javascript:false;");qq.remove(b)}},_upload:function(a,g){var e=this._inputs[a];if(!e)throw new Error("file with passed id was not added, or already uploaded or cancelled");var f=this.getName(a),c=this._createIframe(a),d=this._createForm(c,g);d.appendChild(e);var b=this;this._attachLoadEvent(c,function(){b.log("iframe loaded");var d=b._getIframeContentJSON(c);b._options.onComplete(a,f,d);b._dequeue(a);delete b._inputs[a];setTimeout(function(){qq.remove(c)},1)});d.submit();qq.remove(d);return a},_attachLoadEvent:function(a,b){qq.attach(a,"load",function(){if(!a.parentNode)return;if(a.contentDocument&&a.contentDocument.body&&a.contentDocument.body.innerHTML=="false")return;b()})},_getIframeContentJSON:function(b){var c=b.contentDocument?b.contentDocument:b.contentWindow.document,a;this.log("converting iframe's innerHTML to JSON");this.log("innerHTML = "+c.body.innerHTML);try{a=eval("("+c.body.innerHTML+")")}catch(d){a={}}return a},_createIframe:function(b){var a=qq.toElement('<iframe src="javascript:false;" name="'+b+'" />');a.setAttribute("id",b);a.style.display="none";document.body.appendChild(a);return a},_createForm:function(c,d){var a=qq.toElement('<form method="post" enctype="multipart/form-data"></form>'),b=qq.obj2url(d,this._options.action);a.setAttribute("action",b);a.setAttribute("target",c.name);a.style.display="none";document.body.appendChild(a);return a}});qq.UploadHandlerXhr=function(){qq.UploadHandlerAbstract.apply(this,arguments);this._files=[];this._xhrs=[];this._loaded=[]};qq.UploadHandlerXhr.isSupported=function(){var a=document.createElement("input");a.type="file";return "multiple" in a&&typeof File!="undefined"&&typeof (new XMLHttpRequest).upload!="undefined"};qq.extend(qq.UploadHandlerXhr.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerXhr.prototype,{add:function(a){if(!(a instanceof File))throw new Error("Passed obj in not a File (in qq.UploadHandlerXhr)");return this._files.push(a)-1},getName:function(b){var a=this._files[b];return a.fileName!=null?a.fileName:a.name},getSize:function(b){var a=this._files[b];return a.fileSize!=null?a.fileSize:a.size},getLoaded:function(a){return this._loaded[a]||0},_upload:function(b,c){var g=this._files[b],d=this.getName(b),h=this.getSize(b);this._loaded[b]=0;var a=this._xhrs[b]=new XMLHttpRequest,e=this;a.upload.onprogress=function(a){if(a.lengthComputable){e._loaded[b]=a.loaded;e._options.onProgress(b,d,a.loaded,a.total)}};a.onreadystatechange=function(){a.readyState==4&&e._onComplete(b,a)};c=c||{};c["qqfile"]=d;var f=qq.obj2url(c,this._options.action);a.open("POST",f,true);a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.setRequestHeader("X-File-Name",encodeURIComponent(d));a.setRequestHeader("Content-Type","application/octet-stream");a.send(g)},_onComplete:function(a,d){if(!this._files[a])return;var c=this.getName(a),e=this.getSize(a);this._options.onProgress(a,c,e,e);if(d.status==200){this.log("xhr - server response received");this.log("responseText = "+d.responseText);var b;try{b=eval("("+d.responseText+")")}catch(f){b={}}this._options.onComplete(a,c,b)}else this._options.onComplete(a,c,{});this._files[a]=null;this._xhrs[a]=null;this._dequeue(a)},_cancel:function(a){this._options.onCancel(a,this.getName(a));this._files[a]=null;if(this._xhrs[a]){this._xhrs[a].abort();this._xhrs[a]=null}}});(function(a){var b=new function(){this.countRegexp=function(c,b){var a=c.match(b);return a?a.length:0};this.getStrength=function(e,h){var a=e.length;if(a<h)return 0;var f=this.countRegexp(e,/\d/g),c=this.countRegexp(e,/[a-z]/g),d=this.countRegexp(e,/[A-Z]/g),g=a-f-c-d;if(f==a||c==a||d==a||g==a)return 1;var b=0;if(f)b+=2;if(c)b+=d?4:3;if(d)b+=c?4:3;if(g)b+=5;if(a>10)b+=1;return b};this.getStrengthLevel=function(b,c){var a=this.getStrength(b,c);b=1;if(a<=0)b=1;else if(a>0&&a<=4)b=2;else if(a>4&&a<=8)b=3;else if(a>8&&a<=12)b=4;else if(a>12)b=5;return b}};a.fn.password_strength=function(d){var c=a.extend({container:null,bar:null,minLength:6,texts:{1:DictionaryItems.ChangeOfPassword.Weak,2:DictionaryItems.ChangeOfPassword.Weak,3:DictionaryItems.ChangeOfPassword.Weak,4:DictionaryItems.ChangeOfPassword.Medium,5:DictionaryItems.ChangeOfPassword.VerySecure},onCheck:null},d||{});return this.each(function(){var d=null,e=null;if(c.container)d=a(c.container);else{d=a("<span/>").attr("class","password_strength");a(this).after(d)}if(c.bar)e=a(c.bar);a(this).bind("keyup.password_strength",function(){var i=a(this).val(),f=b.getStrengthLevel(i,c.minLength);if(i.length>0){var h="password_strength_"+f,g="password_bar_"+f;!d.hasClass(h)&&f in c.texts&&d.text(c.texts[f]).attr("class","password_strength "+h);e&&!e.hasClass(g)&&e.attr("class","password_bar "+g)}else{d.text("").attr("class","password_strength");e&&e.attr("class","password_bar")}c.onCheck&&c.onCheck.call(this,f)});a(this).val()!=""&&a(this).trigger("keyup.password_strength")})}})(jQuery);/*
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
*/
if(typeof window.console!=="object"||typeof window.console.emulated==="undefined"){if(typeof window.console!=="object"||!(typeof window.console.log==="function"||typeof window.console.log==="object")){window.console={};window.console.log=window.console.debug=window.console.warn=window.console.trace=function(){};window.console.error=function(){for(var c="An error has occured. More information will be available in the console log.",a=0;a<arguments.length;++a){if(typeof arguments[a]!=="string")break;
c+="\n"+arguments[a]}if(typeof Error!=="undefined")throw Error(c);else throw c;}}else{if(typeof window.console.debug==="undefined")window.console.debug=function(){for(var c=["console.debug:"],a=0;a<arguments.length;a++)c.push(arguments[a]);window.console.log.apply(window.console,c)};if(typeof window.console.warn==="undefined")window.console.warn=function(){for(var c=["console.warn:"],a=0;a<arguments.length;a++)c.push(arguments[a]);window.console.log.apply(window.console,c)};if(typeof window.console.error===
"undefined")window.console.error=function(){for(var c=["console.error"],a=0;a<arguments.length;a++)c.push(arguments[a]);window.console.log.apply(window.console,c)};if(typeof window.console.trace==="undefined")window.console.trace=function(){window.console.error.apply(window.console,["console.trace does not exist"])}}window.console.emulated=true}
(function(c){if(c.History)window.console.warn("$.History has already been defined...");else{c.History={options:{debug:false},state:"",$window:null,$iframe:null,handlers:{generic:[],specific:{}},extractHash:function(a){return a.replace(/^[^#]*#/,"").replace(/^#+|#+$/,"")},getState:function(){return c.History.state},setState:function(a){var b=c.History;a=b.extractHash(a);b.state=a;return b.state},getHash:function(){return c.History.extractHash(window.location.hash||location.hash)},setHash:function(a){a=
c.History.extractHash(a);if(typeof window.location.hash!=="undefined"){if(window.location.hash!==a)window.location.hash=a}else if(location.hash!==a)location.hash=a;return a},go:function(a){var b=c.History;a=b.extractHash(a);var d=b.getHash(),f=b.getState();if(a!==d)b.setHash(a);else{a!==f&&b.setState(a);b.trigger()}return true},hashchange:function(){var a=c.History,b=a.getHash();a.go(b);return true},bind:function(a,b){var d=c.History;if(b){if(typeof d.handlers.specific[a]==="undefined")d.handlers.specific[a]=
[];d.handlers.specific[a].push(b)}else{b=a;d.handlers.generic.push(b)}return true},trigger:function(a){var b=c.History;if(typeof a==="undefined")a=b.getState();var d,f,g,e;if(typeof b.handlers.specific[a]!=="undefined"){e=b.handlers.specific[a];d=0;for(f=e.length;d<f;++d){g=e[d];g(a)}}e=b.handlers.generic;d=0;for(f=e.length;d<f;++d){g=e[d];g(a)}return true},construct:function(){var a=c.History;c(document).ready(function(){a.domReady()});return true},configure:function(a){var b=c.History;b.options=
c.extend(b.options,a);return true},domReadied:false,domReady:function(){var a=c.History;if(!a.domRedied){a.domRedied=true;a.$window=c(window);a.$window.bind("hashchange",this.hashchange);setTimeout(a.hashchangeLoader,200);return true}},nativeSupport:function(a){a=a||c.browser;var b=a.version,d=parseInt(b,10),f=b.split(/[^0-9]/g);b=parseInt(f[0],10);var g=parseInt(f[1],10);f=parseInt(f[2],10);var e=false;if((a.msie||0)&&d>=8)e=true;else if((a.webkit||0)&&d>=528)e=true;else if(a.mozilla)if(b>1)e=true;
else{if(b===1)if(g>9)e=true;else if(g===9)if(f>=2)e=true}else if(a.opera)if(b>10)e=true;else if(b===10)if(g>=60)e=true;return e},hashchangeLoader:function(){var a=c.History;if(a.nativeSupport())a.getHash()&&a.$window.trigger("hashchange");else{var b;if(c.browser.msie){a.$iframe=c('<iframe id="jquery-history-iframe" style="display: none;"></$iframe>').prependTo(document.body)[0];a.$iframe.contentWindow.document.open();a.$iframe.contentWindow.document.close();var d=false;b=function(){var f=a.getHash(),
g=a.getState(),e=a.extractHash(a.$iframe.contentWindow.document.location.hash);if(g!==f){if(!d){a.$iframe.contentWindow.document.open();a.$iframe.contentWindow.document.close();a.$iframe.contentWindow.document.location.hash=f}d=false;a.$window.trigger("hashchange")}else if(g!==e){d=true;a.setHash(e)}}}else b=function(){var f=a.getHash();a.getState()!==f&&a.$window.trigger("hashchange")};setInterval(b,200)}return true}};c.History.construct()}})(jQuery);
;$(function(){var m=Utils.isGiftCardsServer();document.netminersPushDirect=function(b){if(m)return;document.netminers.title=b;$netminers.bc=[];if($.cookie("debugNetminers")=="true"){var a=$("#netminersDataLog");if(!a.length){a=$("<div id='netminersDataLog' style='color: blue; text-align: center; font-size: 18px; padding: 5px 0px 5px 0px; line-height: 25px;'></div>");if($("div.topbar").length)a.insertBefore("div.topbar");else a.insertBefore("div#header")}a.append(b+"<br/>")}var c=b;document.netminers.title=b;if(!$netminers.standardOperationsPerformed){$netminers.standardOperationsPerformed=true;$netminers.push(["disableFormTracking",[[/giftcards\.pandora\.net/,[[/.*/,[/.*/i]]]]]],["enqueueUrlTasks"],["initInteractive"],["initFormTracking"],["setAccountId","pandora"],["enableFirstPartyCookie"],["setVersion","3","01"],["setSeparator",">"],["trackPage",function(a){a.take(c)}])}else $netminers.push(["postPageView",c])};document.netminersPush=function(b){var d=new NetminersTracker,c=Utils.SiteLanguage(false),a=d.BuildBreadcrumbs(window.location,$.cookie("userEmail"),c?c.toUpperCase():"");if(b)if(a)a=b(a);else return;a&&document.netminersPushDirect(a)};var j=function(a){var b=a.split(" > ");b=b.slice(0,b.length-1);var e=null,d=location.pathname,f=location.href,c=d.match(/^\/(?:\w{2}-\w{2}\/)?(.*)/im);if(c&&c.length>=2){if(c[1].toLowerCase()=="my-pandora/my-profile"){$("#content_1_ddlCountry").bind("change.netminers",function(){document.netminersPush(function(a){return a+" > Change Country"})});$("#content_1_ddlLanguage").bind("change.netminers",function(){document.netminersPush(function(a){return a+" > Change Language"})});return b.join(" > ")+"Pandora Club > Profile"}if(unescape(c[1].toLowerCase())=="my-pandora/my designs area/my-wishlist"){$.inArray("My Wishlist",b)!=-1&&$("li.product span.action-links a span.r").live("click.netminers",function(c){var b=$(c.currentTarget).parent().parent().children(":hidden").val();ProductInfoClass.GetProductByItemNumber(b,Utils.SiteLanguage(false),function(c){if(!c)return;else RemoveCallback(a,c,b)});return null});return a}if(unescape(c[1].toLowerCase())=="my-pandora/my-designs"){$("li.jcarousel-item span.action-links a.removeDesign").live("click.netminers",function(a){var b=$(a.currentTarget).parents("li").children("strong.heading").text().trim();document.netminersPush(function(c){var a=c.split(" > ");a=a.slice(0,a.length-1);return a.join(" > ")+" > Remove > "+b})});return a}if(unescape(c[1].toLowerCase())=="my-pandora/my designs area/my-jewellery"){$.inArray("My Jewelry",b)!=-1&&$("li.product span.action-links a span.r").live("click.netminers",function(c){var b=$(c.currentTarget).parent().parent().children(":hidden").val();ProductInfoClass.GetProductByItemNumber(b,Utils.SiteLanguage(false),function(c){if(!c)return;else RemoveCallback(a,c,b)});return null});return a}if(unescape(c[1].toLowerCase())=="my-pandora/my designs area/my-designs"){$("li.product span.action-links a.remove").live("click.netminers",function(a){var b=$(a.currentTarget).parents("li").children("strong").eq(0).text().trim();document.netminersPush(function(c){var a=c.split(" > ");a=a.slice(0,a.length-1);return a.join(" > ")+" > Remove > "+b})});return a}}$.inArray("My Wishlist",b)!=-1&&$("li.product span.action-links a span.r").live("click.netminers",function(c){var b=$(c.currentTarget).parent().parent().children(":hidden").val();ProductInfoClass.GetProductByItemNumber(b,Utils.SiteLanguage(false),function(c){if(!c)return;else RemoveCallback(a,c,b)});return null});$.inArray("My Jewelry",b)!=-1&&$("li.product span.action-links a span.r").live("click.netminers",function(c){var b=$(c.currentTarget).parent().parent().children(":hidden").val();ProductInfoClass.GetProductByItemNumber(b,Utils.SiteLanguage(false),function(c){if(!c)return;else RemoveCallback(a,c,b)});return null});return a};$("#mycarousel li.jcarousel-item :eq(2) :last").bind("click.netminers",function(a){var b=$(a.currentTarget).parents("li").children("strong.heading").text();document.netminersPush(function(c){var a=c.split(" > ");a=a.slice(0,a.length-1);return a.join(" > ")+" > Remove > "+b})});$("div.share li.shareEmail a").bind("click.netminers",function(){document.netminersPush(function(b){var a=b.split(" > ");a=a.slice(0,a.length-1);document.netminers.title=a.join(" > ")+" > Email";$netminers.push(["postPageView",document.netminers.title])})});$("div.share li.facebook a").bind("click.netminers",function(){document.netminersPush(function(b){var a=b.split(" > ");a=a.slice(0,a.length-1);document.netminers.title=a.join(" > ")+" > Facebook";$netminers.push(["postPageView",document.netminers.title])})});$("div.share li.twitter a").bind("click.netminers",function(){document.netminersPush(function(b){var a=b.split(" > ");a=a.slice(0,a.length-1);document.netminers.title=a.join(" > ")+" > Twitter";$netminers.push(["postPageView",document.netminers.title])})});$("div.pPagingList ul").live("click.netminers",function(c){var a=$(c.target).text(),b=a?a:"1";document.netminersPush(function(c){var a=c.split(" > ");a=a.slice(0,a.length-1);return a.join(" > ")+" > Page "+b})});$("div.overlay ul li:nth-child(1) a:not(.added)").bind("click.netminers",function(b){var d=window.location.pathname.split("/").length==5?"Jewelry > Result":"Jewelry > Show Product";b.preventDefault();var c=$(b.currentTarget).parents("li.product"),a=c.eq(0).attr("id").toUpperCase().substr(1);$.cookie("userEmail")&&ProductInfoClass.GetProductByItemNumber(a,Utils.SiteLanguage(false),function(b){if(!b)return;else document.netminersPush(function(f){var e=new NetminersTracker,c=f.split(" > ");c=c.slice(0,c.length-1);c[e.Indexes.Stone]=b.Stone;c[e.Indexes.Collection]=b.Collection;c[e.Indexes.Material]=b.Material;c[e.Indexes.Category]=b.Category;c[e.Indexes.PriceRange]=b.Price;c[e.Indexes.ProductID]=a;if($.inArray("Jewelry",c)==-1){document.netminers.title=c.join(" > ")+" > "+d+" > "+b.Name+" > Add to My Jewelry";$netminers.push(["postPageView",document.netminers.title])}else{document.netminers.title=c.join(" > ")+" > "+b.Name+" > Add to My Jewelry";$netminers.push(["postPageView",document.netminers.title])}})});return false});$("div.overlay ul li:nth-child(2) a:not(.added)").bind("click.netminers",function(b){var d=window.location.pathname.split("/").length==5?"Jewelry > Result":"Jewelry > Show Product";b.preventDefault();var c=$(b.currentTarget).parents("li.product"),a=c.eq(0).attr("id").toUpperCase().substr(1);$.cookie("userEmail")&&ProductInfoClass.GetProductByItemNumber(a,Utils.SiteLanguage(false),function(b){if(!b)return;else document.netminersPush(function(f){var e=new NetminersTracker,c=f.split(" > ");c=c.slice(0,c.length-1);c[e.Indexes.Stone]=b.Stone;c[e.Indexes.Collection]=b.Collection;c[e.Indexes.Material]=b.Material;c[e.Indexes.Category]=b.Category;c[e.Indexes.PriceRange]=b.Price;c[e.Indexes.ProductID]=a;if($.inArray("Jewelry",c)==-1){document.netminers.title=c.join(" > ")+" > "+d+" > "+b.Name+" > Add to My Wishlist";$netminers.push(["postPageView",document.netminers.title])}else{document.netminers.title=c.join(" > ")+" > "+b.Name+" > Add to My Wishlist";$netminers.push(["postPageView",document.netminers.title])}})});return false});$("a.addToMyWishlist").bind("click.netminers",function(){var b=/.*?\/.*?\/(jewellery|ranges|materials|stone|price)(?:\/(\w+)\/((?:\w|-)+)(?:\/?(\w+(?:-\w+)?)?))?/im,d=location.pathname,a=d.match(b);if(a==null)return;var c=a[4].toUpperCase();ProductInfoClass.GetProductByItemNumber(c,Utils.SiteLanguage(false),function(a){if(!a)return;else document.netminersPush(function(d){var c=new NetminersTracker,b=d.split(" > ");b=b.slice(0,b.length-1);b[c.Indexes.Stone]=a.Stone;b[c.Indexes.Collection]=a.Collection;b[c.Indexes.Material]=a.Material;b[c.Indexes.Category]=a.Category;b[c.Indexes.PriceRange]=a.Price;document.netminers.title=b.join(" > ")+" > "+a.Name+" > Add to My Wishlist";$netminers.push(["postPageView",document.netminers.title])})})});$("a.addToMyJewellery").bind("click.netminers",function(){var b=/.*?\/.*?\/(jewellery|ranges|materials|stone|price)(?:\/(\w+)\/((?:\w|-)+)(?:\/?(\w+(?:-\w+)?)?))?/im,d=location.pathname,a=d.match(b);if(a==null)return;var c=a[4].toUpperCase();ProductInfoClass.GetProductByItemNumber(c,Utils.SiteLanguage(false),function(a){if(!a)return;else document.netminersPush(function(d){var c=new NetminersTracker,b=d.split(" > ");b=b.slice(0,b.length-1);b[c.Indexes.Stone]=a.Stone;b[c.Indexes.Collection]=a.Collection;b[c.Indexes.Material]=a.Material;b[c.Indexes.Category]=a.Category;b[c.Indexes.PriceRange]=a.Price;document.netminers.title=b.join(" > ")+" > "+a.Name+" > Add to My Jewelry";$netminers.push(["postPageView",document.netminers.title])})})});$("a.add").bind("click.netminers",function(){var a=/.*?\/.*?\/(jewellery|ranges|materials|stone|price)(?:\/(\w+)\/((?:\w|-)+)(?:\/?([-\w]+)?))?/im,d=location.pathname,c=d.match(a),b=c[4].toUpperCase();ProductInfoClass.GetProductByItemNumber(b,Utils.SiteLanguage(false),function(a){if(!a)return;else document.netminersPush(function(d){var c=new NetminersTracker,b=d.split(" > ");b=b.slice(0,b.length-1);b[c.Indexes.Stone]=a.Stone;b[c.Indexes.Collection]=a.Collection;b[c.Indexes.Material]=a.Material;b[c.Indexes.Category]=a.Category;b[c.Indexes.PriceRange]=a.Price;document.netminers.title=b.join(" > ")+" > "+a.Name+" > Add to Basket";$netminers.push(["postPageView",document.netminers.title])})})});$("div.spot a.image-wrapper, div.spot div.spot-text h3 a, div.spot div.image a.pandoraPlayer").live("click",function(){var d=this;if($(this).closest(".spot").attr("data-enablenetminers").toLowerCase()=="false")return;var b=$(this).closest(".spot").attr("data-spottype"),a=$(this).closest(".spot").attr("data-spotpath"),c=function(){var c=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},b=function(a){var b=a.split(" ");return $.Enumerable.From(b).Select(function(a){return c(a)}).ToArray().join(" ")},a=$.Enumerable.From(location.pathname.split("/")).Select('$.replace("-", " ")').Where('$!=""').Select(function(a){return b(a)}).ToArray();return a.length<2?["Front Page"]:a.slice(1)};document.netminersPush(function(c){var e=NetminersTracker.GetStandardBreadcrumbs(c),d=e+" > "+b+" > "+a;return d})});$("div.members-box fieldset div.form-box a").bind("click.netminers",function(){document.netminersPush(function(b){var a=b.split(" > ");a=a.slice(0,a.length-1);return a.join(" > ")+" > Sign Up > Join > Pandora Club"})});$("div.wrapper div.flash-holder ul.flash-links a:eq(1)").bind("click.netminers",function(){document.netminersPush(function(b){var a=b.split(" > ");a=a.slice(0,a.length-1);return a.join(" > ")+" > Send"})});$("#content_1_rbGender").bind("change.netminers",function(){document.netminersPush(function(a){return a+" > Gender > "+$("#content_1_rbGender :selected").val()})});$("#content_1_ddlCountry").bind("change.netminers",function(){document.netminersPush(function(a){return a+" > Change Country"})});$("#content_1_ddlLanguage").bind("change.netminers",function(){document.netminersPush(function(a){return a+" > Change Language"})});$("#content_1_btnSaveProfile").bind("click.netminers",function(){$("#content_1_txtNewPassword").length&&$("#content_1_txtNewPassword").val()!=""&&document.netminersPush(function(a){return a+" > Change Password"})});$("#content_1_btnDelete").bind("click.netminers",function(){document.netminersPush(function(a){return a+" > Delete Profile"})});$("div#content_1_pEditFooter a.cancel").bind("click.netminers",function(){document.netminersPush(function(a){return a+" > Cancel"})});$("#content_1_btnSaveProfile").bind("click.netminers",function(){document.netminersPush(function(a){return a+" > Save"})});$("#frontpage-text").bind("click.netminers",function(){document.netminersPush(function(a){var b=$("#frontpage-text").attr("data-netminerstag");return a+" > "+b})});var k=/.*?\/.*?\/(jewellery|ranges|materials|stone|price)(?:\/(\w+)\/((?:\w|-)+)(?:\/?(.*)))?/im,f=null,l=location.pathname,o=location.href;if(l.match(k)){var b=l.match(k);if(b&&b.length>=3&&b[1]){var h=getUrlParams("MetalId"),g=getUrlParams("CategoryId"),e=getUrlParams("PriceRangeId"),i=getUrlParams("StoneId"),d="00000000-0000-0000-0000-000000000000";switch(b[1].toLowerCase()){case "jewellery":var n="";if(b[2])if(h&&h!=d||g&&g!=d||e&&e!=d||i&&i!=d){var a=new NetminersTracker,c=b[3];c=c.substring(0,1).toUpperCase()+c.substring(1).toLowerCase();ProductInfoClass.GetSelectionInfo({Category:g,Material:h,Stone:i,PriceRange:e,Locale:Utils.SiteLanguage(false)},function(d){a.bc[a.Indexes.Site]=location.host.toLowerCase();var e=Utils.SiteLanguage().split("-");if(e&&e.length==2){var g=e[1].toUpperCase(),i=e[0].toLowerCase();a.bc[a.Indexes.Country]=g;a.bc[a.Indexes.Language]=i;var b=a.Regions[g];if(b){a.bc[a.Indexes.Region]=b.Region;a.bc[a.Indexes.Market]=b.Market;a.bc[a.Indexes.Currency]=b.Currency}}if($.cookie("userEmail"))a.bc[a.Indexes.ClientID]=$.cookie("userEmail").toLowerCase();a.bc[a.Indexes.Material]=d.Material;a.bc[a.Indexes.Category]=d.Category;a.bc[a.Indexes.Collection]=c;a.bc[a.Indexes.Stone]=d.Stone;a.bc[a.Indexes.PriceRange]=d.PriceRange;var h=getUrlParams("Page");if(h)f="Jewelry > Result > Page "+h;else f="Jewelry > Result > Page 001";document.netminers.title=a.bc.join(" > ")+" > "+f});return null}}}if(b.length>=5&&b[4])ProductInfoClass.GetProductByItemNumber(b[4].toUpperCase(),Utils.SiteLanguage(false),function(a){if(!a)return;else document.netminersPush(function(e){var g=[],c=e.split(" > "),d=new NetminersTracker;c[d.Indexes.ProductID]=b[4].toUpperCase();c[d.Indexes.PriceRange]=a.Price;c[d.Indexes.Stone]=a.Stone;c[d.Indexes.Collection]=a.Collection;c[d.Indexes.Material]=a.Material;c[d.Indexes.Category]=a.Category;var f=" > Jewelry > Show Product > "+a.Name;return c.join(" > ")+f})});else document.netminersPush(j)}else document.netminersPush(j)});function flashTracking(a){document.netminersPush(function(e){var b=[],c=e.split(" > "),d=new NetminersTracker;b.push(c[d.Indexes.Site]);b.push(c[d.Indexes.Region]);b.push(c[d.Indexes.Market]);b.push(c[d.Indexes.Currency]);b.push(c[d.Indexes.ClientID]);b.push(c[d.Indexes.ProductID]);b.push(c[d.Indexes.Collection]);b.push(c[d.Indexes.Category]);b.push(c[d.Indexes.Material]);b.push(c[d.Indexes.Stone]);b.push(c[d.Indexes.PriceRange]);var f=b.join(" > ")+" > FrontPage > "+a;return f})}function RemoveCallback(d,b,e){var c=new NetminersTracker,a=d.split(" > ");a=a.slice(0,a.length-1);a[c.Indexes.Stone]=b.Stone;a[c.Indexes.Collection]=b.Collection;a[c.Indexes.Material]=b.Material;a[c.Indexes.Category]=b.Category;a[c.Indexes.PriceRange]=b.Price;a[c.Indexes.ProductID]=e;a=a.slice(0,a.length-1);document.netminers.title=a.join(" > ")+" > Remove > "+b.Name;$netminers.push(["postPageView",document.netminers.title])}function BYOB_Tracking(a,b){switch(a){case "Add Rings|Ringbuilder Result":case "Add Rings|Close":case "Remove":case "Copy":case "Information":case "Edit Title":return;case "Nearest Store":document.netminersPush(function(a){return a+" > Find store"});return}b=b||"[ProductID]";var c=a.split("|").join(" > ");document.netminersPush(function(e){var d=NetminersTracker.GetStandardBreadcrumbs(e,b);switch(a){case "New":d+=" > Explore > Inspiration > Create Combine > Bracelet Designer > New";break;case "Clear":d+=" > Explore > Inspiration > Create Combine > Bracelet Designer > Clear";break;case "Change Bracelet":d+=" > Explore > Inspiration > Create Combine > Bracelet Designer > Change";break;case "Add Bracelet":d+=" > Explore > Inspiration > Create Combine > Bracelet Designer > Add bracelet";break;case "Add Charms":case "Add Charms > Add charm":case "Add Charms|Add charm":d+=" > Explore > Inspiration > Create Combine > Bracelet Designer > Add charms";break;case "Add|Recommended charms":case "Add > Recommended charms":d+=" > Explore > Inspiration > Create Combine > Bracelet Designer > Add recommended charms";break;case "New Design":d+=" > Explore > Inspiration > Create Combine > Ring Designer > New";break;case "Reset Design":d+=" > Explore > Inspiration > Create Combine > Ring Designer > Clear";break;case "Add Rings":case "Add Rings|Add ring":d+=" > Explore > Inspiration > Create Combine > Ring Designer > Add rings";break;case "Add Recommended Ring":d+=" > Explore > Inspiration > Create Combine > Ring Designer > Add recommended rings";break;case "Print List":if($(".promotionStoresListUrl").length>0)return null;d+=" > Explore > Inspiration > Create Combine > Ring Designer > Print";break;default:d+=" > "+c}return d})}function getUrlParams(e){var b=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),c="[\\?&]"+b+"=([^&#]*)",d=new RegExp(c),a=d.exec(window.location.href);if(a==null)return "";else return a[1]}if(typeof document.netminers!="object")document.netminers={};var $netminers=$netminers||[],$$nm_queue_name=$$nm_queue_name||"$netminers",$$nm_instance_name=$$nm_instance_name||"tracker";(function(d,n){var o="407";if(typeof document.netminers!="object")document.netminers={};Array.from=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};Function.prototype.$bind=function(){var b=this,a=Array.from(arguments),c=a.shift();return function(){return b.apply(c,a.concat(Array.from(arguments)))}};Function.prototype.$bindAsEventListener=function(){var b=this,a=Array.from(arguments),c=a.shift();return function(d){return b.apply(c,[d||window.event].concat(a))}};String.prototype.trimcc=function(){return this.replace(/[\u0000-\u001f]|\u007f|\u007f|\u007f|\u0085|\u2028|\u2028|\2029|\ufff9|\ufffa|\ufffb|\u200e|\u200f/g,"")};String.prototype.trim=function(){return this.replace(/^[\s\xA0]+|[\s\xA0]+$/g,"")};String.prototype.escapeHTML=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.queryParams=function(){var b={},a=this.trim().match(/[^?#]*(#.*)?$/);if(a.length>0){var c=a[0],d=c.split("&");d.$forEach(function(c){var a;try{a=decodeURIComponent(c).split("=")}catch(d){a=unescape(c).split("=")}b[decodeURIComponent(a[0])]=a.length>1?a[1]:null})}return b};Object.$extend=function(a,b){for(var c in b)a[c]=b[c];return a};Object.$clone=function(a){return Object.$extend({},a)};Object.isUndefinedOrNull=function(a){return typeof a==="undefined"||a===null};var l={stop:function(a){a.cancelBubble=true;a.returnValue=false}};if(!Array.prototype.$forEach)Array.prototype.$forEach=function(b){for(var c=this.length,d=arguments[1],a=0;a<c;a++)a in this&&b.call(d,this[a],a,this)};document.netminers.setCookie=function(b,c,a){document.cookie=b+"="+escape(c)+(a?"; expires="+a.toGMTString():"")+"; path=/"};document.netminers.removeCookie=function(a){document.cookie=a+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/"};document.netminers.getCookie=function(e){var b=document.cookie,c=e+"=",a=b.indexOf("; "+c);if(a==-1){a=b.indexOf(c);if(a!==0)return null}else a+=2;var d=document.cookie.indexOf(";",a);if(d==-1)d=b.length;return unescape(b.substring(a+c.length,d))};var h={};h.getValues=function(e,f){for(var b=(f||document).getElementsByTagName("meta"),c=[],a=0;a<b.length;a++){var d=b[a].getAttribute("name");d&&d.toLowerCase()==e.toLowerCase()&&c.push(b[a].getAttribute("content"))}return c};function g(d){var d=d;this.async=true;this.syncTimeout=!!(window.attachEvent&&!window.opera)?1e4:250;this.timerHandle=null;this.bcRemove=new RegExp("");this.trackingTopDomain=null;this.trackingSubDomain=null;this.trackingPath=null;this.rdl=false;this.allowDynamicScripts=true;this.dbg=false;this.syncFirst=true;this.enableRemoteDebugging=true;var b=window;try{var g=window.top.location.href;b=window.top}catch(f){}if(top.frames.length!=0)b=document;this.interactive=/\$\$nm|nminteractive/.test(b.location.href.toLowerCase());this.persistInteractive=/\$\$nm=p|nminteractive=p/.test(b.location.href.toLowerCase());this.allowVerbose=false;this.uid=0;this.useFirstParty=false;this.syncTasks={trackPage:true,postCommerceResetItem:true,postCommerceEmptyBasket:true,delay:true};this.fieldSubmitDelay=0;this.getElementsByClass=function(b,a,c){var e=[];if(!a||a===null)a=document;if(typeof a=="string")a=document.getElementById(a);if(!b||b===null)b="*";if(!c||c===null)c="*";var d=a.getElementsByTagName(c),g=d.length,f=new RegExp("(^|\\s)"+b+"(\\s|$)");for(i=0,j=0;i<g;i++)if(f.test(d[i].className)){e[j]=d[i];j++}return e};this.it=function(a){if(!a)return "";for(var c="",b=0;b<a.childNodes.length;b++)switch(a.childNodes.item(b).nodeType){case 1:c+=this.it(a.childNodes.item(b));break;case 3:c+=a.childNodes.item(b).nodeValue}return c};this.cb=function(a){return a.replace(new RegExp("[s]+"+this.srcBcSep+"[s]+")," "+this.srcBcSep+" ")};this.te=function(a){for(var b=0;b<a.length;b++)a[b]=a[b].trim();return a};this.attachEvent=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else a.attachEvent&&a.attachEvent("on"+b,c)};this.detachEvent=function(a,b,c,d){if(a.removeEventListener)a.removeEventListener(b,c,d);else a.detachEvent&&a.detachEvent("on"+b,c)};this.stopPropagation=function(a){if(a.stopPropagation){a.preventDefault();a.stopPropagation()}a.cancelBubble=true;a.returnValue=false};this.disableFormTracking=function(a){this.formDisableRules=a};this.setFieldSubmitDelay=function(a){this.fieldSubmitDelay=a};this.ignoreFormField=function(l,a,b){for(var f=0;f<this.formDisableRules.length;f++){var c=this.formDisableRules[f],m=c[0];if(m.test(l))if(c.length>1)for(var h=c[1],g=0;g<h.length;g++){var e=h[g],i=e[0];if(a&&(i.test(a.id)||i.test(a.name)))if(e.length>1)for(var j=e[1],d=0;d<j.length;d++){var k=j[d];if(b&&(k.test(b.id)||k.test(b.name)))return true}else return true}else return true}return false};this.initFormTracking=function(){var b=[],c;this.formDisableRules=this.formDisableRules||[];b=b.concat(Array.from(document.getElementsByTagName("input")));b=b.concat(Array.from(document.getElementsByTagName("select")));b=b.concat(Array.from(document.getElementsByTagName("textarea")));for(c=0;c<b.length;c++){var a=b[c],e=a.tagName.toLowerCase(),f=a.type?a.type.toLowerCase():"";if(e=="input"&&/text|file|password|checkbox|radio/.test(f)||/select|textarea/.test(e))if(!this.ignoreFormField(document.location.href,a.form,a))this.observeFieldChanges(a,e,f);else this.out("*&nbsp;Disable field = "+a.id+"/"+a.name+" ("+(a.type||a.tagName)+")","#dd8888",true)}var g=Array.from(document.getElementsByTagName("form"));for(c=0;c<g.length;c++){var d=g[c];this.attachEvent(d,"submit",this.onFormChange.$bind(this,d,true));this.attachEvent(d,"reset",this.onFormChange.$bind(this,d,false))}};this.onFormChange=function(a,c,d){var b=[];b.push(a.name?a.name.length>0?a.name:"n/a":"n/a");b.push(a.id?a.id.length>0?a.id:"n/a":"n/a");b.push(a.action);b=b.join(" "+this.destBcSep+" ");if(c){this.tasks.push(["postEvent","Form","Submit",b]);if(this.fieldSubmitDelay>0){setTimeout(this.delayedSubmit.$bind(this,a),this.fieldSubmitDelay);l.stop(d)}}else this.tasks.push(["postEvent","Form","Reset",b])};this.delayedSubmit=function(a){a.submit()};this.observeFieldChanges=function(a,c,b){if(c=="input"&&(b=="radio"||b=="file"||b=="checkbox"))this.attachEvent(a,"change",this.onFieldChanged.$bindAsEventListener(this,a,c,b,true));else{this.attachEvent(a,"blur",this.onFieldChanged.$bindAsEventListener(this,a,c,b,false));this.attachEvent(a,"focus",this.onFieldFocusChanged.$bindAsEventListener(this,a,c,b))}};this.TrackFieldChange=function(a){var b=a.tagName.toLowerCase(),c=a.type?a.type.toLowerCase():"";this.onFieldChanged(a,b,c,true);return true};this.onFieldChanged=function(g,a,b,d,e){if(this.lastFocusedField||e){var c="";if(b=="input"&&d=="checkbox")c=a.value?a.value:a.checked?"checked":"unchecked";else if(b=="input"&&(d=="radio"||d=="file"))c=a.value;else if(b=="textarea"||b=="input"&&/text|password/.test(d))if(d=="password")c="***";else c=a.value;else if(b=="select"){c=null;if(a.selectedIndex>-1)c=a.options[a.selectedIndex].text}if(e||c!=this.lastFocusedField.value){b=[];b.push(a.form?a.form.name?a.form.name.length>0?a.form.name:"n/a":"n/a":"n/a");b.push(a.form?a.form.id?a.form.id.length>0?a.form.id:"n/a":"n/a":"n/a");b.push(d||b);b.push(a.name?a.name.length>0?a.name:"n/a":"n/a");b.push(a.id?a.id.length>0?a.id:"n/a":"n/a");var f=[];f.push(a.form?a.form.name?a.form.name.length>0?a.form.name:"n/a":"n/a":"n/a");f.push(a.form?a.form.id?a.form.id.length>0?a.form.id:"n/a":"n/a":"n/a");this.tasks.push(["postFieldChange",b.join(" "+this.destBcSep+" "),c])}}this.lastFocusedField=null};this.onFieldFocusChanged=function(e,a,c,b){this.lastFocusedField=this.lastFocusedField||{};this.lastFocusedField.object=a;this.lastFocusedField.value="";var d=false;if(c=="input"&&b=="checkbox"){this.lastFocusedField.value=a.value?a.value:a.checked?"checked":"unchecked";d=true}else if(c=="input"&&(b=="radio"||b=="text"||b=="file"||b=="password")||b=="textarea"){this.lastFocusedField.value=a.value;d=true}else if(c=="select"){if(a.selectedIndex>-1)this.lastFocusedField.value=a.options[a.selectedIndex].text;d=true}};this.addFieldEventDelay=function(f,b,d,g){for(var e=0;e<f.length;e++){var c=document.getElementById(f[e]);if(Object.isUndefinedOrNull(c))continue;for(var a=0;a<b.length;a++){d=d||c["on"+b[a]];c["on"+b[a]]=null;this.attachEvent(c,b[a],this.manageSubmitDelay.$bindAsEventListener(this,c,b[a],d,g||this.fieldSubmitDelay))}}};this.manageSubmitDelay=function(a,b,f,c,d){var e=c(a,this,false);if(e===true){b.blur();setTimeout(this.newSubmitHandler.$bind(this,Object.$clone(a),b,c),d);this.stopPropagation(a);return false}a.returnValue=true;return true};this.newSubmitHandler=function(b,c,d){var a=[];a.push(b,this,true);d.apply(c,a)};this.execute=function(a){if(typeof a=="function")a(this);else this.out("execute() missing method","#ff0000",false)};this.setSyncTimeout=function(a){this.syncTimeout=a};this.setAccountId=function(a){this.accountId=a};this.setTrackingPath=function(a){this.trackingPath=a};this.setTrackingSubDomain=function(a){this.trackingSubDomain=a};this.setTrackingTopDomain=function(a){this.trackingTopDomain=a};this.enableInteractive=function(a,b){this.allowVerbose=b||false;this.interactive=true;if(a)this.persistInteractive=a};this.enableDebug=function(){this.dbg=true};this.disableDebug=function(){this.dbg=false};this.setSeparator=function(a){this.srcBcSep=a};this.disableDynamicScripts=function(){this.allowDynamicScripts=false};this.enableDynamicScripts=function(){this.allowDynamicScripts=true};this.enableCommerceTracking=function(b){b(this,a,e)};this.postDownload=function(a,b){this.postEvent("Download","MouseLeft",a,b)};this.postFieldChange=function(b,a){this.postEvent("Field","Change",b,a,isNaN(parseFloat(a))?null:parseFloat(a))};this.postExitLink=function(a,b){this.postEvent("Exit","SameWindow",a,b)};this.postExitLinkNewWindow=function(a,b){this.postEvent("Exit","NewWindow",a,b)};this.postOther=function(a){this.postEvent("Other","",a)};this.postSurveyAnswer=function(){var a=Array.from(arguments);s=a.shift();while(a.length>1){q=a.shift();c=a.shift();this.postEvent("Survey","ParameterAnswer","s_name="+encodeURIComponent(s)+"&q_text="+encodeURIComponent(q)+"&c_text="+encodeURIComponent(c),"","")}};this.postCommerceAddItem=function(d,a,b,c){this.postEvent("Commerce","AddItem",a,d,b,c)};this.postCommerceResetItem=function(b,a){this.postEvent("Commerce","ResetItem",a,b)};this.postCommerceEmptyBasket=function(){this.postEvent("Commerce","Reset")};this.allowTrimDuplicatesFromBreadcrumb=function(){this.rdl=true};this.clipParam=function(a,b,c){var g=a.length+b.length+c.length,d=900,f=700,e=250;if(g>d+f+e){if(c.length>e)c=c.substr(0,e-1)+"*";g=a.length+b.length;if(g>d+f)b=b.substr(0,f-1)+"*";if(a.length>d)a=a.substr(0,d-1)+"*"}return {pv:a,url:b,ref:c}};this.communicate=function(c,d,b,f){if(!c)c=this.accountId;if(!d)d="netminers.dk";if(!b)b="/tracker/put.aspx";else if(b.charAt(0)!="/")b="/"+this.trackingPath;var a;if(this.allowDynamicScripts){a=document.createElement("script");a.language="javascript"}else{a=new Image;a.style.display="none"}a.src=document.location.protocol+"//"+c+"."+d+b+"?"+f;var e=document.getElementsByTagName("body");if(e.length===0)e=document.getElementsByTagName("head");e[0].appendChild(a);this.out("Communicate: (Using &lt;"+a.tagName+"/&gt; element) "+a.src,"#880000");return a};this.postEvent=function(e,g,a,b,d,h){try{this.bc=[];if(typeof a=="function"){a(this);a=this.bc.join(" "+this.destBcSep+" ")}var c=document.location.href,l;a=a?a.trimcc():a;b=b?b.trimcc():b;if(typeof h!="undefined"){c+=c.indexOf("?")!=-1?"&":"?";c+="_np_e="+encodeURIComponent("en2="+encodeURIComponent(h))}switch(e){case "PageView":a=this.applyVerRev(a)}var i=this.clipParam(a||"",c,"");a=i.pv;c=i.url;b=b&&b!==null?b.substr(0,250):b;if(this.interactive){this.out("*&nbsp;action type="+e,"#dd8888",false);this.out("*&nbsp;ation subtype="+g,"#dd8888",false);this.out("*&nbsp;name="+(a?a:""),"#dd8888",false);this.out("*&nbsp;text="+(b?b:""),"#dd8888",false);this.out("*&nbsp;number="+(d?d:""),"#dd8888",false);this.out("*&nbsp;url="+c,"#dd8888",true)}var j=this.communicate(this.trackingSubDomain,this.trackingTopDomain,this.trackingPath,"action="+e+"&sub="+(g||"")+"&n="+Math.random()+"&nav="+encodeURIComponent(c)+"&cid="+this.accountId+"&ti1="+encodeURIComponent(a||"")+(b?"&tva="+encodeURIComponent(b||""):"")+(d?"&num="+encodeURIComponent(""+(d||"")):""));if(!this.async||this.syncFirst){if(this.syncFirst){this.syncFirst=false;this.async=false;this.triggerScheduler(this.syncTimeout)}var k=this.onStateChange.$bind(this);this.attachEvent(j,"readystatechange",k);this.endObserveReadyState=function(){this.detachEvent(j,"readystatechange",k)};return {endObserveReadyState:this.endObserveReadyState.$bind(this)}}}catch(f){this.reportDebugInfo(f);if(this.dbg)throw f;}};this.onStateChange=function(a){var b=a||window.event;/loaded|complete/.test(b.srcElement.readyState)&&this.taskCompleted()};this.delay=function(a){setTimeout(this.taskCompleted.$bind(this),a)};this.readValue=function(a){this.out("*&nbsp;"+a+"="+this[a],"#dd8888",true)};this.disableRemoteDebugging=function(){this.enableRemoteDebugging=false};this.reportDebugInfo=function(c){if(!this.enableRemoteDebugging)return;try{var a=[];try{a.push(this.accountId||"no acc")}catch(b){a.push("no acc")}try{a.push(this.ver)}catch(b){a.push("no ver")}try{a.push(Math.round(this.rev/100,0))}catch(b){a.push("no gen")}try{a.push(this.rev%100)}catch(b){a.push("no rev")}try{a.push(c.name)}catch(b){}try{a.push(c.number)}catch(b){}try{a.push(c.message)}catch(b){}this.communicate("debug","netminers.dk","/tracker/put.aspx","action=Other&cid=debug&n="+Math.random()+"&nav="+encodeURIComponent(document.location.href)+"&ti1="+encodeURIComponent(a.join(" > "))+"&tva=&num=");this.out("Error: "+a.join(","),"#ff0000",true)}catch(d){if(this.dbg)throw d;}};this.out=function(c,d,a){if(!this.interactive)return;a=a||false;if(!a||a&&this.allowVerbose){if(!this.domDebugOut){this.domDebugOut=document.createElement("div");this.domDebugOut.style.backgroundColor="#ffffff";this.domDebugOut.style.fontFamily="Arial";this.domDebugOut.style.fontSize="9px";this.domDebugOut.style.textAlign="left";this.domDebugOut.style.lineHeight="9px";this.domDebugOut.style.padding="10px 10px 10px 10px";document.getElementsByTagName("body")[0].appendChild(this.domDebugOut);this.out("<hr/>");this.out("<b>Netminers log:</b>","#002c45")}var b=document.createElement("div");b.style.color=d||"#000000";b.innerHTML=c;this.domDebugOut.appendChild(b)}};this.push=function(){this.tasks.push.apply(this.tasks,arguments)};this.scheduler=function(e){e&&this.out("Task delayed: Time-out elapsed ("+this.syncTimeout+" sec)","#ff0000");if(this.tasks.length===0){this.triggerScheduler(200);return}if(typeof this.taskInfo=="object"){this.taskInfo.endObserveReadyState();this.taskInfo=null}var a,c;while(this.tasks.length>0){this.async=true;var b=this.tasks.splice(0,1)[0];if(typeof b[0]=="boolean")this.async=!b.shift();a=b.shift();if(this.syncTasks[a])this.async=!this.syncTasks[a];c=Array.from(b);try{!this.async&&this.triggerScheduler(this.syncTimeout,true);this.out("Task name: "+a+"("+c.join(",")+")",this.async?"#0000ff":"#0088ff");this.taskInfo=this[a].apply(this,c)}catch(d){this.reportDebugInfo(d);if(this.dbg)throw d;}if(!this.async)return}this.triggerScheduler(50)};this.triggerScheduler=function(a,b){this.timerHandle=setTimeout(this.scheduler.$bind(this,b),a)};this.taskCompleted=function(){this.timerHandle!==null&&clearTimeout(this.timerHandle);this.scheduler()};this.enqueueUrlTasks=function(){var g=document.location.href.queryParams();if(g.$$nmq)for(var e=g.$$nmq.split(";"),d=0;d<e.length;d++){for(var f=e[d].split(","),a=[],c=0;c<f.length;c++){var b=decodeURIComponent(f[c]);if(b.indexOf("function(")===0){var h;eval("method="+b);a.push(h)}else a.push(b)}a.length>0&&this.tasks.push(a)}};this.initInteractive=function(){if(this.persistInteractive)for(var b=document.links,a=0;a<document.links.length;a++)if(document.links[a].href.indexOf("?")!=-1)document.links[a].href+="&$$nm=p";else document.links[a].href+="?$$nm=p"};this.visitNumber=function(b){this.vc=b;if(this.useFirstParty){var a=new Date;a.setTime(a.getTime()+100*365*24*60*60*1e3);document.netminers.setCookie("$nmvc",b,a)}};this.lastVisit=function(b){this.lv=b;if(this.useFirstParty){var a=new Date;a.setTime(a.getTime()+100*365*24*60*60*1e3);document.netminers.setCookie("$nmlv",b,a)}};this.setUID=function(b){if(this.useFirstParty){var a=new Date;a.setTime(a.getTime()+100*365*24*60*60*1e3);document.netminers.setCookie("$nmuid",b,a)}};this.getFirstPartyCookie=function(){this.uid=parseInt(document.netminers.getCookie("$nmuid"),10);this.vc=parseInt(document.netminers.getCookie("$nmvc"),10);this.lv=parseInt(document.netminers.getCookie("$nmlv"),10);this.out("*&nbsp;uid (C)="+this.uid,"#dd8888",true);this.out("*&nbsp;visitCount (C)="+this.vc,"#dd8888",true);this.out("*&nbsp;lastVisit (C)="+this.lv,"#dd8888",true)};this.detectCookiePolicy=function(){var a=new Date;a.setTime(a.getTime()+365*24*60*60*1e3);document.netminers.setCookie("$nm$","true",a);this.useFirstParty=document.netminers.getCookie("$nm$")=="true";document.netminers.removeCookie("$nm$")};this.enableFirstPartyCookie=function(){this.detectCookiePolicy();this.useFirstParty&&this.getFirstPartyCookie()};this.tasks=[];this.tasks=this.tasks.concat(d)}function a(){this.emptyBasket=function(){if(a.ignore)return;this.push([true,"postCommerceEmptyBasket"])}}a.ignore=false;a.report=function(b){for(var c='<table style="position: absolute; top: 10px; right: 10px; width:250px; border: 1px solid red; background-color:white; color: black; font-famlity: tahoma; font-size: 11px;"><tr><td colspan=4 align=left style="font-family: Times New Roman; font-size:14px; color: black">Netminers E-commerce:</td></tr><tr><td align=left>SKU</td><td align=left>Name</td><td align=right>Units</td><td align=right>Unit Price</td></tr>',a=0;a<b.length;a++)c+="<tr><td align=left>"+b[a].getSKU().escapeHTML()+"</td><td align=left>"+b[a].getName().escapeHTML()+"</td><td align=right>"+b[a].getUnits()+"</td><td align=right>"+b[a].getPrice()+"</td></tr>";c+="</table>";var d=document.createElement("div");d.innerHTML=c;document.getElementsByTagName("body")[0].appendChild(d)};a.prototype=new g;function e(){this.toString=function(){return "SKU: "+this.getSKU()+"\nUnits: "+this.getUnits()+"\nPrice: "+this.getPrice()};this.getItemInfo=function(){this.SKU=this.getSKU();this.Units=this.getUnits();this.Price=this.getPrice();this.Name=this.getName()};this.observeInput=function(){this.observeUpdateItem();this.observeRemoveItem();this.observeAddItem()};this.onAddItem=function(){if(a.ignore)return;var b;this.getItemInfo();if(arguments.length>=2&&typeof arguments[0]=="boolean"&&arguments[0])(arguments[1]||window.event).keyCode==13&&this.push(["postCommerceAddItem",this.SKU,this.Name,this.Price,this.Units]);else this.push(["postCommerceAddItem",this.SKU,this.Name,this.Price,this.Units])};this.onChangeItem=function(){if(a.ignore)return;this.getItemInfo();if(arguments.length==2&&typeof arguments[0]=="boolean"&&arguments[0]){if((arguments[1]||window.event).keyCode==13){this.onRemoveItem();this.onAddItem();a.ignore=true}}else{this.onRemoveItem();this.onAddItem()}};this.onRemoveItem=function(){if(a.ignore)return;this.getItemInfo();this.push([true,"postCommerceResetItem",this.SKU,this.Name])}}e.prototype=new a;function f(){this.bc=[];var a=typeof document.netminers=="object"&&document.netminers.title?document.netminers.title:"";this.srcBcSep=">";this.destBcSep=">";this.bind=false;this.take=function(a,d){if(!a||a===null)return;var b;if(typeof a.innerHTML!="undefined")a=this.it(a).trim();else if(typeof a=="object"&&a.length){for(b=0;b<a.length;b++)this.take(a[b],d);return}var c=a.split(d||this.srcBcSep);for(b=0;b<c.length;b++)this.bc[this.bc.length]=c[b]};this.takeById=function(a,b){this.take(document.getElementById(a),b)};this.takeFirst=function(e,f,g){var b=this.getElementsByClass(e,f,g);if(b!==null&&b.length>0)if(arguments.length>3){for(var c=[],h=0,a=0,d=3;d<arguments.length;d++){if(a==1){c[a]=b[0];a++}c[a]=arguments[d];a++}this.takeFirst.apply(this,c)}else this.take(b[0])};this.takeAll=function(c,d,e){var a=this.getElementsByClass(c,d,e);if(a!==null&&a.length>0)for(var b=0;b<a.length;b++)this.take(a[b])};this.takeFirstTag=function(a){this.takeFirst(null,null,a)};this.takeAllFirst=function(e,f,g,c,d){for(var b=this.getElementsByClass(e,f,g),a=0;a<b.length;a++)this.takeFirst(c,b[a],d)};this.remove=function(){for(var c=0;c<arguments.length;c++){var a=arguments[c];if(typeof a=="number")this.bc.splice(a,1);else if(typeof a=="string")for(var d=new RegExp(a),b=0;b<this.bc.length;b++)d.test(this.bc[b])&&remove(b)}};this.removeLast=function(){return this.bc.splice(this.bc.length-1,1)};this.update=function(b,a){this.bc[b]=a};this.smooth=function(b){for(var a=0;a<this.bc.length;a++)this.bc[a]=this.smoothWords(this.bc[a],b||false)};this.smoothWords=function(b,d){var c=b.split(" ");b="";for(var a=0;a<c.length;a++){if(a>0)b+=" ";if(d&&a>0)b+=c[a];else b+=c[a].charAt(0).toUpperCase()+c[a].substr(1).toLowerCase()}return b};this.read=function(a){return this.bc[a]};this.readLast=function(){return this.bc[this.bc.length-1]};this.swap=function(a,b){if(this.bc.length<=a&&this.bc.length<=b)return;var c=this.bc[a];this.bc[a]=this.bc[b];this.bc[b]=c};this.insert=function(b,a){this.bc.splice(b,0,a)};this.reverse=function(){this.bc.reverse()};this.takeMeta=function(b,c,d){var a=Array.from(arguments);b=null;if(typeof a[0]!="string")b=a.shift();c=a.shift();d=a.shift();var e=h.getValues(c,b);if(e.length>0)this.take(e[0]);else this.take(d)};this.removeDuplicateLevels=function(){for(var c=[],b=null,a=0;a<this.bc.length;a++)if(this.bc[a].trim().length>0)if((b!==null&&b.toLowerCase())!=this.bc[a].trim().toLowerCase()){b=this.bc[a].trim();c[c.length]=b}this.bc=c};this.setVersion=function(a,b){this.ver=a;this.rev=b};this.applyVerRev=function(a){return "!"+this.ver+"."+o+this.rev+"!"+a};this.postPageView=function(a){this.postEvent("PageView","",a)};this.postFlashEvent=function(a){this.postEvent("PageView","Flash",a)};this.enableServerBinding=function(){this.bind=true};this.disablePageTracking=function(){document.netminers.trackPage=false};this.trackPage=function(l,q){try{this.srcBcSep=q||this.srcBcSep;var c=document.location.href;if(typeof document.netminers.trackPage=="boolean"&&document.netminers.trackPage===false||c.toLowerCase().indexOf("nmtrackpage=false")!=-1)return null;l&&l(this);if(document.netminers.additionalSuperContext)this.bc=this.te(this.cb(document.netminers.additionalSuperContext).split(this.srcBcSep)).concat(this.bc);if(document.netminers.additionalSubContext)this.bc=this.bc.concat(this.te(this.cb(document.netminers.additionalSubContext).split(this.srcBcSep)));if(a!=="")this.bc=this.cb(a.replace(this.bcRemove,"")).trim().split(this.srcBcSep);this.rdl&&this.removeDuplicateLevels();a=this.bc.join(" "+this.destBcSep+" ");var e=c;try{var m=top.document.location.href;e=m.indexOf("nm_extag")!=-1?m:e}catch(g){}if(a==="")a=document.title;var b="",j=document.cookie;if(j.indexOf("nm_exref")!=-1){var r=j.split(";");for(i=0;i<j.length;i++){var n=r[i],o=n.indexOf("nm_exref");if(o!=-1)b=n.substr(o+9)}document.cookie="nm_exref="}if(b===""){b=document.referrer;try{b=top.document.referrer}catch(g){}}var f=e.indexOf("nm_extag="),d="";if(f!=-1){f+=9;var p=e.indexOf("&",f);d=p==-1?e.substr(f):e.substr(f,p-f);d=encodeURIComponent(d)}a.trimcc();a=this.applyVerRev(a);var h=[a,d,b,c];a=encodeURIComponent(a);c=encodeURIComponent(c.trimcc());b=encodeURIComponent(b.trimcc());d=encodeURIComponent(d.trimcc());var k=this.clipParam(a,c,b);a=k.pv;c=k.url;b=k.ref;this.out("*&nbsp;breadcrumb="+h.shift(),"#dd8888",false);this.out("*&nbsp;extags="+h.shift(),"#dd8888",true);this.out("*&nbsp;referrer="+h.shift(),"#dd8888",true);this.out("*&nbsp;url="+h.shift(),"#dd8888",false);this.out("*&nbsp;uid="+this.uid,"#dd8888",true);var s=this.communicate(this.trackingSubDomain,this.trackingTopDomain,this.trackingPath,"action=log&n="+Math.random()+"&nav="+c+"&cid="+this.accountId+(b.length>0?"&ref="+b:"")+"&ti1="+a+(d.length>0?"&ext="+d:"")+(this.bind?"&bind=true":"")+(this.firstParty?"&fp=true":"")+(this.uid?"&uid="+this.uid:"")+(this.vc?"&vc="+this.vc:"")+(this.lv?"&lv="+this.lv:""));this.attachEvent(s,"readystatechange",this.onStateChange.$bind(this));this.syncFirst=true}catch(g){this.reportDebugInfo(g);if(this.dbg)throw g;}this.title=decodeURIComponent(a);a="";return this.title};this.start=function(){this.triggerScheduler(1)}}f.prototype=new g(d||$netminers);var b=new f;document.netminers[n]=b;if(window.attachEvent)window.attachEvent("onload",b.start.$bind(b,d));else if(window.addEventListener)window.addEventListener("load",b.start.$bind(b,d),true);else{var k=window.onload;if(typeof k!="function")window.onload=b.start.$bind(b,d);else{var m=b.start.$bind(b,d);window.onload=function(){m();k()}}}})(window[$$nm_queue_name],$$nm_instance_name);window[$$nm_queue_name]=document.netminers[$$nm_instance_name];Array.prototype.clean=function(b){for(var a=0;a<this.length;a++)if(this[a]==b){this.splice(a,1);a--}return this};var NetminersTracker=function(){this.bc=["[Site]","[Region]","[Market]","[Currency]","[Client ID]","[Product ID]","[Collection]","[Category]","[Material]","[Stone]","[Price Range]"];this.Regions={AE:{Region:"Europe",Market:"Middle East",Currency:"AED"},AE:{Region:"Europe",Market:"Middle East",Currency:"AED"},AT:{Region:"Europe",Market:"CWE",Currency:"EUR"},AU:{Region:"Asia",Market:"Australia",Currency:"AUD"},BE:{Region:"Europe",Market:"Europe",Currency:"EUR"},BE:{Region:"Europe",Market:"Europe",Currency:"EUR"},BR:{Region:"South America",Market:"South America",Currency:"BRL"},CA:{Region:"North America",Market:"North America",Currency:"CAD"},CA:{Region:"North America",Market:"North America",Currency:"CAD"},CH:{Region:"Europe",Market:"CWE",Currency:"CHF"},CH:{Region:"Europe",Market:"CWE",Currency:"CHF"},CN:{Region:"Asia",Market:"PAP",Currency:"CNY"},CN:{Region:"Asia",Market:"PAP",Currency:"CNY"},CZ:{Region:"Europe",Market:"CEE",Currency:"CZK"},DE:{Region:"Europe",Market:"CWE",Currency:"EUR"},DK:{Region:"Europe",Market:"Nordic",Currency:"DKK"},EE:{Region:"Europe",Market:"CEE",Currency:"EEK"},ES:{Region:"Europe",Market:"Europe",Currency:"EUR"},FI:{Region:"Europe",Market:"Nordic",Currency:"EUR"},FR:{Region:"Europe",Market:"Europe",Currency:"EUR"},GB:{Region:"Europe",Market:"Europe",Currency:"DKK"},GR:{Region:"Europe",Market:"CCE",Currency:"DKK"},HK:{Region:"Asia",Market:"PAP",Currency:"HKD"},HK:{Region:"North America",Market:"North America",Currency:"BMD"},HU:{Region:"Europe",Market:"CEE",Currency:"HUF"},IE:{Region:"Europe",Market:"Europe",Currency:"EUR"},IL:{Region:"Europe",Market:"Middle East",Currency:"ILS"},IT:{Region:"Europe",Market:"CWE",Currency:"EUR"},JM:{Region:"North America",Market:"Jamaica",Currency:"JMD"},LT:{Region:"Europe",Market:"CEE",Currency:"LTL"},MX:{Region:"North America",Market:"North America",Currency:"MXN"},NL:{Region:"Europe",Market:"CWE",Currency:"EUR"},NO:{Region:"Europe",Market:"Nordic",Currency:"NOK"},NZ:{Region:"Asia",Market:"Australia",Currency:"NZD"},PL:{Region:"Europe",Market:"CEE",Currency:"PLN"},PT:{Region:"Europe",Market:"Europe",Curr
