text: function colourNameToHex(a){tcolour=a.replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace("#","");var b={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",redux:"#01a3e3",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"undefined"!==b[tcolour.toLowerCase()]?b[tcolour.toLowerCase()]:a}function redux_color_validate(a){var b=jQuery(a).val();return colourNameToHex(b)!==b.replace("#","")?colourNameToHex(b):b}function redux_color_rgba_validate(a){var b=jQuery(a).val();return b}function redux_add_file(a,b){a.preventDefault();var c,d=jQuery(this);return c?void c.open():(c=wp.media({multiple:!1,library:{},title:d.data("choose"),button:{text:d.data("update")}}),c.on("select",function(){var a=c.state().get("selection").first();if(c.close(),"undefined"==typeof redux.media[jQuery(b).attr("data-id")]&&(redux.media[jQuery(b).attr("data-id")]={},redux.media[jQuery(b).attr("data-id")].mode="image"),redux.media[jQuery(b).attr("data-id")].mode===!1||a.attributes.type===redux.media[jQuery(b).attr("data-id")].mode){b.find(".upload").val(a.attributes.url),b.find(".upload-id").val(a.attributes.id),b.find(".upload-height").val(a.attributes.height),b.find(".upload-width").val(a.attributes.width),redux_change(jQuery(b).find(".upload-id"));var d=a.attributes.url;if("undefined"!=typeof a.attributes.sizes&&"undefined"!=typeof a.attributes.sizes.thumbnail)d=a.attributes.sizes.thumbnail.url;else if("undefined"!=typeof a.attributes.sizes){var e=a.attributes.height;for(var f in a.attributes.sizes){var g=a.attributes.sizes[f];g.height<e&&(e=g.height,d=g.url)}}else d=a.attributes.icon;b.find(".upload-thumbnail").val(d),b.find(".upload").hasClass("noPreview")||b.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+d+'">').slideDown("fast"),b.find(".remove-image").removeClass("hide"),b.find(".redux-background-properties").slideDown()}}),void c.open())}function redux_remove_file(a){if(a.find(".remove-image").addClass("hide")){a.find(".remove-image").addClass("hide"),a.find(".upload").val(""),a.find(".upload-id").val(""),a.find(".upload-height").val(""),a.find(".upload-width").val(""),a.find(".upload-thumbnail").val(""),redux_change(jQuery(a).find(".upload-id")),a.find(".redux-background-properties").hide();var b=a.find(".screenshot");b.slideUp(),a.find(".remove-file").unbind(),jQuery(".section-upload .upload-notice").length>0&&jQuery(".media_upload_button").remove()}}function verifyPos(a,b){if(a=a.replace(/^\s+|\s+$/gm,""),""===a||-1==a.search(" "))return b===!0?"top left":"bottom right";var c=a.split(" "),d=b?"top":"bottom";("top"==c[0]||"center"==c[0]||"bottom"==c[0])&&(d=c[0]);var e=b?"left":"right";return("left"==c[1]||"center"==c[1]||"right"==c[1])&&(e=c[1]),d+" "+e}function getContrastColour(a){if(retVal="#444444",""!==a){a=a.replace("#","");var b=parseInt(a.substr(0,2),16),c=parseInt(a.substr(2,2),16),d=parseInt(a.substr(4,2),16),e=(299*b+587*c+114*d)/1e3;retVal=e>=128?"#444444":"#ffffff"}return retVal}function verify_fold(a){jQuery(document).ready(function(b){if(!a.hasClass("redux-info")&&!a.hasClass("redux-typography")){var c=a.parents(".redux-field:first").data("id"),d=a.val();if(redux.folds[c]&&redux.folds[c].children){var e={};b.each(redux.folds[c].children,function(a,f){b.each(f,function(b,f){e[f]||(e[f]={show:!1,hidden:!1}),(a==d||e[f]===!0)&&(e[f].show=!0),e[f].show===!0&&jQuery("#"+c).parents("tr:first").hasClass("hiddenFold")&&(e[f].show=!1),e[f].show===!0&&jQuery("#"+redux.folds[c].parent).hasClass("hiddenFold")&&(e[f].show=!1),e[f].hidden=jQuery("#"+f).parents("tr:first").hasClass("hiddenFold")})}),b.each(e,function(a){var b=jQuery("#"+a).parents("tr:first");e[a].show===!0?b.fadeIn("medium",function(){b.removeClass("hiddenFold"),redux.folds[a]&&redux.folds[a].children}):e[a].hidden===!1&&b.fadeOut("medium",function(){b.addClass("hiddenFold"),redux.folds[a].children})})}}})}function redux_change(a){if(jQuery("body").trigger("check_dependencies",a),a.hasClass("compiler")&&jQuery("#redux-compiler-hook").val(1),a.hasClass("foldParent"),window.onbeforeunload=confirmOnPageExit,jQuery(a).parents("fieldset.redux-field:first").hasClass("redux-field-error")){jQuery(a).parents("fieldset.redux-field:first").removeClass("redux-field-error"),jQuery(a).parent().find(".redux-th-error").slideUp();var b=jQuery(a).closest(".redux-group-tab").attr("id"),c=!0;jQuery("#"+b+" .redux-field-error").each(function(){c=!1}),c&&(jQuery("#"+b+"_li .redux-menu-error").hide(),jQuery("#"+b+"_li .redux-group-tab-link-a").removeClass("hasError"))}jQuery("#redux-save-warn").slideDown()}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){return a}function c(a){return decodeURIComponent(a.replace(e," "))}function d(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return f.json?JSON.parse(a):a}catch(b){}}var e=/\+/g,f=a.cookie=function(e,g,h){if(void 0!==g){if(h=a.extend({},f.defaults,h),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=f.json?JSON.stringify(g):String(g),document.cookie=[f.raw?e:encodeURIComponent(e),"=",f.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}for(var k=f.raw?b:c,l=document.cookie.split("; "),m=e?void 0:{},n=0,o=l.length;o>n;n++){var p=l[n].split("="),q=k(p.shift()),r=k(p.join("="));if(e&&e===q){m=d(r);break}e||(m[q]=d(r))}return m};f.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)?(a.cookie(b,"",a.extend({},c,{expires:-1})),!0):!1}}),function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=G,this.elements={target:a},this._id=T+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:F,attr:e,onTooltip:F,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=F}function f(a){return a===G||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?F:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?F:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==F,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,G,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||F)&&(b.title=F))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===E?{ready:E}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(S,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)for(d in this.checks[c])(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return W.concat("").join(a?"-"+a+" ":" ")}function l(c){return c&&{type:c.type,pageX:c.pageX,pageY:c.pageY,target:c.target,relatedTarget:c.relatedTarget,scrollX:c.scrollX||a.pageXOffset||b.body.scrollLeft||b.documentElement.scrollLeft,scrollY:c.scrollY||a.pageYOffset||b.body.scrollTop||b.documentElement.scrollTop}||{}}function m(a,b){return b>0?setTimeout(d.proxy(a,this),b):void a.call(this)}function n(a){return this.tooltip.hasClass(bb)?F:(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),void(this.timers.show=m.call(this,function(){this.toggle(E,a)},this.options.show.delay)))}function o(a){if(this.tooltip.hasClass(bb))return F;var b=d(a.relatedTarget),c=b.closest(X)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=m.call(this,function(){this.toggle(F,a)},this.options.hide.delay,this)}function p(a){return this.tooltip.hasClass(bb)||!this.options.hide.inactive?F:(clearTimeout(this.timers.inactive),void(this.timers.inactive=m.call(this,function(){this.hide(a)},this.options.hide.inactive)))}function q(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function r(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(ib+" "))+ib,function(){var a=z.api[d.attr(this,V)];a&&!a.disabled&&e.apply(a,arguments)})}function s(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):G,p="html5"===f.metadata.type&&o?o[f.metadata.name]:G,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(E,{},z.defaults,f,"object"==typeof q?h(q):G,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===F||!j)return F;k.content.text=j}if(i.container.length||(i.container=m),i.target===F&&(i.target=n),k.show.target===F&&(k.show.target=n),k.show.solo===E&&(k.show.solo=i.container.closest("body")),k.hide.target===F&&(k.hide.target=n),k.position.viewport===E&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new B(i.at,E),i.my=new B(i.my),a.data(T))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===F)return F;return a.attr(U,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(db,l).attr("title",""),g=new e(a,k,c,!!j),a.data(T,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(T))&&a.destroy(!0)}),g}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function u(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+tb.join(f+" ")+f).split(" "),h=0;if(sb[b])return a.css(sb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return sb[b]=d,e}function v(a,b){return Math.ceil(parseFloat(u(a,b)))}function w(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}function x(a,b){this.options=b,this._ns="-modal",this.init(this.qtip=a)}function y(a){this._ns="ie6",this.init(this.qtip=a)}var z,A,B,C,D,E=!0,F=!1,G=null,H="x",I="y",J="width",K="height",L="top",M="left",N="bottom",O="right",P="center",Q="flipinvert",R="shift",S={},T="qtip",U="data-hasqtip",V="data-qtip-id",W=["ui-widget","ui-tooltip"],X="."+T,Y="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Z=T+"-fixed",$=T+"-default",_=T+"-focus",ab=T+"-hover",bb=T+"-disabled",cb="_replacedByqTip",db="oldtitle",eb={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c.getElementsByTagName("i")[0];);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||F};A=e.prototype,A._when=function(a){return d.when.apply(d,a)},A.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=g.tooltip=b=d("<div/>",{id:this._id,"class":[T,$,e.style.classes,T+"-pos-"+e.position.my.abbrev()].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":F,"aria-describedby":this._id+"-content","aria-hidden":E}).toggleClass(bb,this.disabled).attr(V,this.id).data(T,this).appendTo(k.container).append(g.content=d("<div />",{"class":T+"-content",id:this._id+"-content","aria-atomic":E})),this.rendered=-1,this.positioning=E,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,F))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,F)),this.rendered=E,this._setWidget(),d.each(S,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=F,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(E,f.event,F),c.hiddenDuringWait=F}),z.api[this.id]=this,this},A.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=E;var a=this.target,b=a.attr(db);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(T).removeAttr(V).removeAttr(U).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(db),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=G,delete z.api[this.id]}}return this.destroyed?this.target:(a===E&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},C=A.checks={builtin:{"^id$":function(a,b,c,e){var f=c===E?z.nextid:c,g=T+"-"+f;f!==F&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),void this._updateTitle(c)):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new B(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(E)||this.toggle(E))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass($,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},A.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var fb=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,gb=/^prerender|show\.ready/i;A.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=F,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&gb.test(b))return void delete a[b];var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=fb.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=E,d.each(a,d.proxy(j,this)),this.positioning=F,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?G:this.cache.event),this},A._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=E,a.then(function(a){return e.waiting=F,c._update(a,b)},G,function(a){return c._update(a,b)})):a===F||!a&&""!==a?F:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){a.images&&a.images.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):F},A._waitForContent=function(a){var b=this.cache;return b.waiting=E,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=F}).promise()},A._updateContent=function(a,b){this._update(a,this.elements.content,b)},A._updateTitle=function(a,b){this._update(a,this.elements.title,b)===F&&this._removeTitle(F)},A._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("<div />",{"class":T+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("<div />",{id:b,"class":T+"-title","aria-atomic":E})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},A._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=G,a!==F&&this.reposition())},A.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=E;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(F),s=i.outerHeight(F),t=0,u=0,v=i.css("position"),w={left:0,top:0},x=i[0].offsetWidth>0,y=c&&"scroll"===c.type,z=d(a),A=o[0].ownerDocument,B=this.mouse;if(d.isArray(k)&&2===k.length)m={x:M,y:L},w={left:k[0],top:k[1]};else if("mouse"===k)m={x:M,y:L},!B||!B.pageX||!p.mouse&&c&&c.pageX?c&&c.pageX||((!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?c=h.origin:(!c||c&&("resize"===c.type||"scroll"===c.type))&&(c=h.event)):c=B,"static"!==v&&(w=o.offset()),A.body.offsetWidth!==(a.innerWidth||A.documentElement.clientWidth)&&(g=d(b.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&y&&B&&(w.left-=(B.scrollX||0)-z.scrollLeft(),w.top-=(B.scrollY||0)-z.scrollTop());else{if("event"===k?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):c.target||(h.target=this.elements.target):"event"!==k&&(h.target=d(k.jquery?k:this.elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=eb.iOS?a.innerWidth:k.width(),u=eb.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):S.imagemap&&k.is("area")?f=S.imagemap(this,k,m,S.viewport?q:F):S.svg&&k&&k[0].ownerSVGElement?f=S.svg(this,k,m,S.viewport?q:F):(t=k.outerWidth(F),u=k.outerHeight(F),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(eb.iOS>3.1&&eb.iOS<4.1||eb.iOS>=4.3&&eb.iOS<4.33||!eb.iOS&&"fixed"===v)&&(w.left-=z.scrollLeft(),w.top-=z.scrollTop()),(!f||f&&f.adjustable!==F)&&(w.left+=m.x===O?t:m.x===P?t/2:0,w.top+=m.y===N?u:m.y===P?u/2:0)}return w.left+=p.x+(l.x===O?-r:l.x===P?-r/2:0),w.top+=p.y+(l.y===N?-s:l.y===P?-s/2:0),S.viewport?(w.adjusted=S.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===F||!x||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),eb.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=F,this):this},A.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!eb.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var hb=(B=A.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,P).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?I:H}).prototype;hb.invert=function(a,b){this[a]=this[a]===M?O:this[a]===O?M:b||this[a]},hb.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===I||this.forceY&&"center"!==b?b+" "+a:a+" "+b},hb.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},hb.clone=function(){return new B(this.string(),this.forceY)},A.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=l(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=E),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",m=this.options[k],n=(this.options[a?"hide":"show"],this.options.position),o=this.options.content,p=this.tooltip.css("width"),q=this.tooltip.is(":visible"),r=a||1===m.target.length,s=!c||m.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!q),h=!g.is(":animated")&&q===a&&s,i=h?G:!!this._trigger(k,[90]),this.destroyed?this:(i!==F&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=l(this.mouse),d.isFunction(o.text)&&this._updateContent(o.text,F),d.isFunction(o.title)&&this._updateTitle(o.title,F),!D&&"mouse"===n.target&&n.adjust.mouse&&(d(b).bind("mousemove."+T,this._storeMouse),D=E),p||g.css("width",g.outerWidth(F)),this.reposition(c,arguments[2]),p||g.css("width",""),m.solo&&("string"==typeof m.solo?d(m.solo):d(X,m.solo)).not(g).not(m.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,D&&!d(X+'[tracking="true"]:visible',m.solo).not(g).length&&(d(b).unbind("mousemove."+T),D=F),this.blur(c)),j=d.proxy(function(){a?(eb.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof m.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),m.effect===F||r===F?(g[k](),j()):d.isFunction(m.effect)?(g.stop(1,1),m.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&m.target.trigger("qtip-"+this.id+"-inactive"),this))},A.show=function(a){return this.toggle(E,a)},A.hide=function(a){return this.toggle(F,a)},A.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(X),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=z.zindex+b.length;return c.hasClass(_)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+_).qtip("blur",a)),c.addClass(_)[0].style.zIndex=f),this},A.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(_),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},A.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(bb):this.disabled):"boolean"!=typeof a&&(a=E),this.rendered&&this.tooltip.toggleClass(bb,a).attr("aria-disabled",a),this.disabled=!!a,this)},A.enable=function(){return this.disable(F)},A._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("<a />",{"class":"qtip-close "+(this.options.style.widget?"":T+"-icon"),title:g,"aria-label":g}).prepend(d("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(bb)||a.hide(b),F})},A._updateButton=function(a){if(!this.rendered)return F;var b=this.elements.button;a?this._createButton():b.remove()},A._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(bb);c.removeClass(bb),bb=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(bb,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass($,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(T+"-icon",!a)},A._storeMouse=function(a){(this.mouse=l(a)).type="mousemove"},A._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},A._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var ib="."+T;d(function(){r(X,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(Z)&&!c.hasClass(bb)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(ab,b)}),r("["+V+"]",Y,p)}),A._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||G,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=F,!e.isDefaultPrevented()},A._bindEvents=function(a,b,c,e,f,g){if(e.add(c).length===e.length){var h=[];b=d.map(b,function(b){var c=d.inArray(b,a);return c>-1?void h.push(a.splice(c,1)[0]):b}),h.length&&this._bind(c,h,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)})}this._bind(c,a,f),this._bind(e,b,g)},A._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?F:(this.cache.event=l(a),this.cache.target=a?d(a.target):[c],clearTimeout(this.timers.show),void(this.timers.show=m.call(this,function(){this.render("object"==typeof a||e.show.ready)},e.show.delay)))}var e=this.options,f=e.show.target,g=e.hide.target,h=e.show.event?d.trim(""+e.show.event).split(" "):[],i=e.hide.event?d.trim(""+e.hide.event).split(" "):[];/mouse(over|enter)/i.test(e.show.event)&&!/mouse(out|leave)/i.test(e.hide.event)&&i.push("mouseleave"),this._bind(f,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=E}),this._bindEvents(h,i,f,g,b,function(){clearTimeout(this.timers.show)}),(e.show.ready||e.prerender)&&b.call(this,a)},A._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),m=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(Z)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(bb)&&this.tooltip[0].offsetWidth>0,e=b.parents(X).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",p),this._bind(i.add(g),z.inactiveEvents,p,"-inactive")),this._bindEvents(r,s,h,i,n,o),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(bb)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:m,"resize",q),f.adjust.scroll&&this._bind(m.add(f.container),"scroll",q)},A._unassignEvents=function(){var c=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],a,b];
  this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a})))},z=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=G,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],T):G;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,T);if(!a)return E;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),F;a.set(b,e)}}),g!==G?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(E,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===F||c.length<1||z.api[c]?z.nextid++:c,b=s(d(this),c,k),b===F?E:(z.api[c]=b,d.each(S,function(){"initialize"===this.initialize&&this(b)}),void b._assignInitialEvents(j))}))},d.qtip=e,z.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,db):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(db,b))}return d.fn["attr"+cb].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+cb].apply(this,arguments));return a||b.filter("["+db+"]").attr("title",function(){return d.attr(this,db)}).removeAttr(db),b}},function(a,b){if(!b||d.fn[a+cb])return E;var c=d.fn[a+cb]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+cb]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(U))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+cb].apply(this,arguments)}),z.version="2.2.0",z.nextid=0,z.inactiveEvents=Y,z.zindex=15e3,z.defaults={prerender:F,id:F,overwrite:E,suppress:E,content:{text:E,attr:"title",title:F,button:F},position:{my:"top left",at:"bottom right",target:F,container:F,viewport:F,adjust:{x:0,y:0,mouse:E,scroll:E,resize:E,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:F})}},show:{target:F,event:"mouseenter",effect:E,delay:90,solo:F,ready:F,autofocus:F},hide:{target:F,event:"mouseleave",effect:E,delay:0,fixed:F,inactive:F,leave:"window",distance:F},style:{classes:"",widget:F,width:F,height:F,def:E},events:{render:G,move:G,show:G,hide:G,toggle:G,visible:G,hidden:G,focus:G,blur:G}};var jb,kb="margin",lb="border",mb="color",nb="background-color",ob="transparent",pb=" !important",qb=!!b.createElement("canvas").getContext,rb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,sb={},tb=["Webkit","O","Moz","ms"];if(qb)var ub=a.devicePixelRatio||1,vb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),wb=ub/vb;else var xb=function(a,b,c){return"<qtipvml:"+a+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(b||"")+' style="behavior: url(#default#VML); '+(c||"")+'" />'};d.extend(w.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("<div />",{"class":T+"-tip"}).prependTo(a.tooltip),qb?(b=d("<canvas />").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=xb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===L||a.y===P&&this.element.position().top+this.size[1]/2+this.options.offset<b.outerHeight(E))},_parseCorner:function(a){var b=this.qtip.options.position.my;return a===F||b===F?a=F:a===E?a=new B(b.string()):a.string||(a=new B(a),a.fixed=E),a},_parseWidth:function(a,b,c){var d=this.qtip.elements,e=lb+t(b)+"Width";return(c?v(c,e):v(d.content,e)||v(this._useTitle(a)&&d.titlebar||d.content,e)||v(d.tooltip,e))||0},_parseRadius:function(a){var b=this.qtip.elements,c=lb+t(a.y)+t(a.x)+"Radius";return eb.ie<9?0:v(this._useTitle(a)&&b.titlebar||b.content,c)||v(b.tooltip,c)||0},_invalidColour:function(a,b,c){var d=a.css(b);return!d||c&&d===a.css(c)||rb.test(d)?F:d},_parseColours:function(a){var b=this.qtip.elements,c=this.element.css("cssText",""),e=lb+t(a[a.precedance])+t(mb),f=this._useTitle(a)&&b.titlebar||b.content,g=this._invalidColour,h=[];return h[0]=g(c,nb)||g(f,nb)||g(b.content,nb)||g(b.tooltip,nb)||c.css(nb),h[1]=g(c,e,mb)||g(f,e,mb)||g(b.content,e,mb)||g(b.tooltip,e,mb)||b.tooltip.css(e),d("*",c).add(c).css("cssText",nb+":"+ob+pb+";"+lb+":0"+pb+";"),h},_calculateSize:function(a){var b,c,d,e=a.precedance===I,f=this.options.width,g=this.options.height,h="c"===a.abbrev(),i=(e?f:g)*(h?.5:1),j=Math.pow,k=Math.round,l=Math.sqrt(j(i,2)+j(g,2)),m=[this.border/i*l,this.border/g*l];return m[2]=Math.sqrt(j(m[0],2)-j(this.border,2)),m[3]=Math.sqrt(j(m[1],2)-j(this.border,2)),b=l+m[2]+m[3]+(h?0:m[0]),c=b/l,d=[k(c*f),k(c*g)],e?d:d.reverse()},_calculateTip:function(a,b,c){c=c||1,b=b||this.size;var d=b[0]*c,e=b[1]*c,f=Math.ceil(d/2),g=Math.ceil(e/2),h={br:[0,0,d,e,d,0],bl:[0,0,d,0,0,e],tr:[0,e,d,0,d,e],tl:[0,0,0,e,d,e],tc:[0,e,f,0,d,e],bc:[0,0,d,0,f,e],rc:[0,0,d,g,0,e],lc:[d,0,d,e,0,g]};return h.lt=h.br,h.rt=h.bl,h.lb=h.tr,h.rb=h.tl,h[a.abbrev()]},_drawCoords:function(a,b){a.beginPath(),a.moveTo(b[0],b[1]),a.lineTo(b[2],b[3]),a.lineTo(b[4],b[5]),a.closePath()},create:function(){var a=this.corner=(qb||eb.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=a.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(b,c){if(!this.enabled)return this;var e,f,g,h,i,j,k,l,m=this.qtip.elements,n=this.element,o=n.children(),p=this.options,q=this.size,r=p.mimic,s=Math.round;b||(b=this.qtip.cache.corner||this.corner),r===F?r=b:(r=new B(r),r.precedance=b.precedance,"inherit"===r.x?r.x=b.x:"inherit"===r.y?r.y=b.y:r.x===r.y&&(r[b.precedance]=b[b.precedance])),f=r.precedance,b.precedance===H?this._swapDimensions():this._resetDimensions(),e=this.color=this._parseColours(b),e[1]!==ob?(l=this.border=this._parseWidth(b,b[b.precedance]),p.border&&1>l&&!rb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==E?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===I?[s(r.x===M?l:r.x===O?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===L?k[1]-q[1]:0)]:[s(r.x===M?k[0]-q[0]:0),s(r.y===L?l:r.y===N?k[1]-q[1]-l:(k[1]-q[1])/2)],qb?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,wb),i=this._calculateTip(r,this.size,wb),o.attr(J,k[0]*wb).attr(K,k[1]*wb),o.css(J,k[0]).css(K,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*wb,j[1]*wb),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===eb.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(P)>-1),left:j[0]-j[2]*Number(f===H),top:j[1]-j[2]*Number(f===I),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(xb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==F&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return F;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===H&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===P?(h=c===I?M:L,j[h]="50%",j[kb+"-"+h]=-Math.round(b[c===I?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===H?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===R&&j.precedance===b&&k[d]&&j[c]!==P?j.precedance=j.precedance===H?I:H:a!==R&&k[d]&&(j[b]=j[b]===P?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===P?p[kb+"-"+b]=o[a]=g[kb+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=F),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:F,top:F,x:0,y:0},p={};this.corner.fixed!==E&&(e(m,H,I,M,O),e(n,I,H,L,N),j.string()===i.corner.string()||i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,F)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===R&&!!k.left)&&f(H,M,O),(o.top=n===R&&!!k.top)&&f(I,L,N),this.element.css(p).toggle(!(o.x&&o.y||j.x===P&&o.y||j.y===P&&o.x)),d.left-=g.left.charAt?g.user:m!==R||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==R||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),jb=S.tip=function(a){return new w(a,a.options.style.tip)},jb.initialize="render",jb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=E)}},C.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(E,z.defaults,{style:{tip:{corner:E,mimic:F,width:6,height:6,border:E,offset:0}}});var yb,zb,Ab="qtip-modal",Bb="."+Ab;zb=function(){function a(a){if(d.expr[":"].focusable)return d.expr[":"].focusable;var b,c,e,f=!isNaN(d.attr(a,"tabindex")),g=a.nodeName&&a.nodeName.toLowerCase();return"area"===g?(b=a.parentNode,c=b.name,a.href&&c&&"map"===b.nodeName.toLowerCase()?(e=d("img[usemap=#"+c+"]")[0],!!e&&e.is(":visible")):!1):/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||f:f}function c(a){k.length<1&&a.length?a.not("body").blur():k.first().focus()}function e(a){if(i.is(":visible")){var b,e=d(a.target),h=f.tooltip,j=e.closest(X);b=j.length<1?F:parseInt(j[0].style.zIndex,10)>parseInt(h[0].style.zIndex,10),b||e.closest(X)[0]===h[0]||c(e),g=a.target===k[k.length-1]}}var f,g,h,i,j=this,k={};d.extend(j,{init:function(){return i=j.elem=d("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return F}}).hide(),d(b.body).bind("focusin"+Bb,e),d(b).bind("keydown"+Bb,function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)}),i.bind("click"+Bb,function(a){f&&f.options.show.modal.blur&&f.hide(a)}),j},update:function(b){f=b,k=b.options.show.modal.stealfocus!==F?b.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(a,e,g){var k=(d(b.body),a.tooltip),l=a.options.show.modal,m=l.effect,n=e?"show":"hide",o=i.is(":visible"),p=d(Bb).filter(":visible:not(:animated)").not(k);return j.update(a),e&&l.stealfocus!==F&&c(d(":focus")),i.toggleClass("blurs",l.blur),e&&i.appendTo(b.body),i.is(":animated")&&o===e&&h!==F||!e&&p.length?j:(i.stop(E,F),d.isFunction(m)?m.call(i,e):m===F?i[n]():i.fadeTo(parseInt(g,10)||90,e?1:0,function(){e||i.hide()}),e||i.queue(function(a){i.css({left:"",top:""}),d(Bb).length||i.detach(),a()}),h=e,f.destroyed&&(f=G),j)}}),j.init()},zb=new zb,d.extend(x.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=zb.elem,b.addClass(Ab).css("z-index",z.modal_zindex+d(Bb).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(zb.elem[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(Bb),f=z.modal_zindex+e.length,g=parseInt(b[0].style.zIndex,10);zb.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+_).qtip("blur",a.originalEvent),b.addClass(_)[0].style.zIndex=f,zb.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),void a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(Bb).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this)):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:void zb.toggle(this.qtip,!!b,c)},destroy:function(){this.qtip.tooltip.removeClass(Ab),this.qtip._unbind(this.qtip.tooltip,this._ns),zb.toggle(this.qtip,F),delete this.qtip.elements.overlay}}),yb=S.modal=function(a){return new x(a,a.options.show.modal)},yb.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=E))},z.modal_zindex=z.zindex-200,yb.initialize="render",C.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(E,z.defaults,{show:{modal:{on:F,effect:E,blur:E,stealfocus:E,escape:E}}}),S.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=v[a],t=w[a],u=c===R,x=m===f?j:m===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=r[f]+s[f]-(o?0:n[f]),A=z-k,B=k+j-(h===J?p:q)-z,C=x-(v.precedance===a||m===v[b]?y:0)-(t===P?i/2:0);return u?(C=(m===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-n[f]+s[f],k-C,Math.min(Math.max(-n[f]+s[f]+(h===J?p:q),k+C),d[f],"center"===m?k-x:1e9))):(e*=c===Q?2:0,A>0&&(m!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(m!==g||A>0)&&(d[f]-=(m===P?-C:C)+e,l.invert(a,g)),d[f]<r&&-d[f]>B&&(d[f]=k,l=v.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s,t=e.target,u=c.elements.tooltip,v=e.my,w=e.at,x=e.adjust,y=x.method.split(" "),z=y[0],A=y[1]||y[0],B=e.viewport,C=e.container,D=c.cache,E={left:0,top:0};return B.jquery&&t[0]!==a&&t[0]!==b.body&&"none"!==x.method?(n=C.offset()||E,o="static"===C.css("position"),k="fixed"===u.css("position"),p=B[0]===a?B.width():B.outerWidth(F),q=B[0]===a?B.height():B.outerHeight(F),r={left:k?0:B.scrollLeft(),top:k?0:B.scrollTop()},s=B.offset()||E,("shift"!==z||"shift"!==A)&&(l=v.clone()),E={left:"none"!==z?j(H,I,z,x.x,M,O,J,f,h):0,top:"none"!==A?j(I,H,A,x.y,L,N,K,g,i):0},l&&D.lastClass!==(m=T+"-pos-"+l.abbrev())&&u.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),E):E},S.polys={polygon:function(a,b){var c,d,e,f={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:F},g=0,h=[],i=1,j=1,k=0,l=0;for(g=a.length;g--;)c=[parseInt(a[--g],10),parseInt(a[g+1],10)],c[0]>f.position.right&&(f.position.right=c[0]),c[0]<f.position.left&&(f.position.left=c[0]),c[1]>f.position.bottom&&(f.position.bottom=c[1]),c[1]<f.position.top&&(f.position.top=c[1]),h.push(c);if(d=f.width=Math.abs(f.position.right-f.position.left),e=f.height=Math.abs(f.position.bottom-f.position.top),"c"===b.abbrev())f.position={left:f.position.left+f.width/2,top:f.position.top+f.height/2};else{for(;d>0&&e>0&&i>0&&j>0;)for(d=Math.floor(d/2),e=Math.floor(e/2),b.x===M?i=d:b.x===O?i=f.width-d:i+=Math.floor(d/2),b.y===L?j=e:b.y===N?j=f.height-e:j+=Math.floor(e/2),g=h.length;g--&&!(h.length<2);)k=h[g][0]-f.position.left,l=h[g][1]-f.position.top,(b.x===M&&k>=i||b.x===O&&i>=k||b.x===P&&(i>k||k>f.width-i)||b.y===L&&l>=j||b.y===N&&j>=l||b.y===P&&(j>l||l>f.height-j))&&h.splice(g,1);f.position={left:h[0][0],top:h[0][1]}}return f},rect:function(a,b,c,d){return{width:Math.abs(c-a),height:Math.abs(d-b),position:{left:Math.min(a,c),top:Math.min(b,d)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(a,b,c,d,e){var f=S.polys._angles[e.abbrev()],g=0===f?0:c*Math.cos(f*Math.PI),h=d*Math.sin(f*Math.PI);return{width:2*c-Math.abs(g),height:2*d-Math.abs(h),position:{left:a+g,top:b+h},adjustable:F}},circle:function(a,b,c,d){return S.polys.ellipse(a,b,c,c,d)}},S.svg=function(a,c,e){for(var f,g,h,i,j,k,l,m,n,o,p,q=d(b),r=c[0],s=d(r.ownerSVGElement),t=1,u=1,v=!0;!r.getBBox;)r=r.parentNode;if(!r.getBBox||!r.parentNode)return F;f=s.attr("width")||s.width()||parseInt(s.css("width"),10),g=s.attr("height")||s.height()||parseInt(s.css("height"),10);var w=(parseInt(c.css("stroke-width"),10)||0)/2;switch(w&&(t+=w/f,u+=w/g),r.nodeName){case"ellipse":case"circle":o=S.polys.ellipse(r.cx.baseVal.value,r.cy.baseVal.value,(r.rx||r.r).baseVal.value+w,(r.ry||r.r).baseVal.value+w,e);break;case"line":case"polygon":case"polyline":for(n=r.points||[{x:r.x1.baseVal.value,y:r.y1.baseVal.value},{x:r.x2.baseVal.value,y:r.y2.baseVal.value}],o=[],m=-1,k=n.numberOfItems||n.length;++m<k;)l=n.getItem?n.getItem(m):n[m],o.push.apply(o,[l.x,l.y]);o=S.polys.polygon(o,e);break;default:o=r.getBoundingClientRect(),o={width:o.width,height:o.height,position:{left:o.left,top:o.top}},v=!1}return p=o.position,s=s[0],v&&(s.createSVGPoint&&(h=r.getScreenCTM(),n=s.createSVGPoint(),n.x=p.left,n.y=p.top,i=n.matrixTransform(h),p.left=i.x,p.top=i.y),s.viewBox&&(j=s.viewBox.baseVal)&&j.width&&j.height&&(t*=f/j.width,u*=g/j.height)),p.left+=q.scrollLeft(),p.top+=q.scrollTop(),o},S.imagemap=function(a,b,c){b.jquery||(b=d(b));var e,f,g,h,i,j=b.attr("shape").toLowerCase().replace("poly","polygon"),k=d('img[usemap="#'+b.parent("map").attr("name")+'"]'),l=d.trim(b.attr("coords")),m=l.replace(/,$/,"").split(",");if(!k.length)return F;if("polygon"===j)h=S.polys.polygon(m,c);else{if(!S.polys[j])return F;for(g=-1,i=m.length,f=[];++g<i;)f.push(parseInt(m[g],10));h=S.polys[j].apply(this,f.concat(c))}return e=k.offset(),e.left+=Math.ceil((k.outerWidth(F)-k.width())/2),e.top+=Math.ceil((k.outerHeight(F)-k.height())/2),h.position.left+=e.left,h.position.top+=e.top,h};var Cb,Db='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';d.extend(y.prototype,{_scroll:function(){var b=this.qtip.elements.overlay;b&&(b[0].style.top=d(a).scrollTop()+"px")},init:function(c){var e=c.tooltip;d("select, object").length<1&&(this.bgiframe=c.elements.bgiframe=d(Db).appendTo(e),c._bind(e,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=d("<div/>",{id:T+"-rcontainer"}).appendTo(b.body),c.elements.overlay&&c.elements.overlay.addClass("qtipmodal-ie6fix")&&(c._bind(a,["scroll","resize"],this._scroll,this._ns,this),c._bind(e,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var a,b,c=this.qtip.tooltip,d={height:c.outerHeight(F),width:c.outerWidth(F)},e=this.qtip.plugins.tip,f=this.qtip.elements.tip;b=parseInt(c.css("borderLeftWidth"),10)||0,b={left:-b,top:-b},e&&f&&(a="x"===e.corner.precedance?[J,M]:[K,L],b[a[1]]-=f[a[0]]()),this.bgiframe.css(b).css(d)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var a,b,c,d,e=this.qtip.tooltip,f=this.qtip.options.style,g=this.qtip.options.position.container;return this.qtip.drawing=1,f.height&&e.css(K,f.height),f.width?e.css(J,f.width):(e.css(J,"").appendTo(this.redrawContainer),b=e.width(),1>b%2&&(b+=1),c=e.css("maxWidth")||"",d=e.css("minWidth")||"",a=(c+d).indexOf("%")>-1?g.width()/100:0,c=(c.indexOf("%")>-1?a:1)*parseInt(c,10)||b,d=(d.indexOf("%")>-1?a:1)*parseInt(d,10)||0,b=c+d?Math.min(Math.max(b,d),c):b,e.css(J,Math.round(b)).appendTo(g)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([a,this.qtip.tooltip],this._ns)}}),Cb=S.ie6=function(a){return 6===eb.ie?new y(a):F},Cb.initialize="render",C.ie6={"^content|style$":function(){this.redraw()}}})}(window,document),function(a){a.fn.typeWatch=function(b){function c(b,c){var d=a(b.el).val();(d.length>=f.captureLength&&d.toUpperCase()!=b.text||c&&d.length>=f.captureLength)&&(b.text=d.toUpperCase(),b.cb.call(b.el,d))}function d(b){var d=b.type.toUpperCase();if(a.inArray(d,f.inputTypes)>=0){var e={timer:null,text:a(b).val().toUpperCase(),cb:f.callback,el:b,wait:f.wait};f.highlight&&a(b).focus(function(){this.select()});var g=function(b){var d=e.wait,g=!1,h=this.type.toUpperCase();"undefined"!=typeof b.keyCode&&13==b.keyCode&&"TEXTAREA"!=h&&a.inArray(h,f.inputTypes)>=0&&(d=1,g=!0);var i=function(){c(e,g)};clearTimeout(e.timer),e.timer=setTimeout(i,d)};a(b).on("keydown paste cut input",g)}}var e=["TEXT","TEXTAREA","PASSWORD","TEL","SEARCH","URL","EMAIL","DATETIME","DATE","MONTH","WEEK","TIME","DATETIME-LOCAL","NUMBER","RANGE"],f=a.extend({wait:750,callback:function(){},highlight:!0,captureLength:2,inputTypes:e},b);return this.each(function(){d(this)})}}(jQuery),function(a){var b,c="ui-state-active",d="ui-state-hover",e="ui-state-disabled",f=a.ui.keyCode,g=f.UP,h=f.DOWN,i=f.RIGHT,j=f.LEFT,k=f.PAGE_UP,l=f.PAGE_DOWN,m=f.HOME,n=f.END,o=a.browser.msie,p=a.browser.mozilla?"DOMMouseScroll":"mousewheel",q=".uispinner",r=[g,h,i,j,k,l,m,n,f.BACKSPACE,f.DELETE,f.TAB];a.widget("ui.spinner",{options:{min:null,max:null,allowNull:!1,group:"",point:".",prefix:"",suffix:"",places:null,defaultStep:1,largeStep:10,mouseWheel:!0,increment:"slow",className:null,showOn:"always",width:95,upIconClass:"ui-icon-triangle-1-n",downIconClass:"ui-icon-triangle-1-s",format:function(a,b){var c=this,d=/(\d+)(\d{3})/,e=(isNaN(a)?0:Math.abs(a)).toFixed(b)+"";for(e=e.replace(".",c.point);d.test(e)&&c.group;e=e.replace(d,"$1"+c.group+"$2"));return(0>a?"-":"")+c.prefix+e+c.suffix},parse:function(a){var b=this;return"."==b.group&&(a=a.replace(".","")),"."!=b.point&&(a=a.replace(b.point,".")),parseFloat(a.replace(/[^0-9\-\.]/g,""))}},_create:function(){var a=this,b=a.element,c=b.attr("type");return!b.is("input")||"text"!=c&&"number"!=c?void console.error("Invalid target for ui.spinner"):(a._procOptions(!0),a._createButtons(b),void(b.is(":enabled")||a.disable()))},_createButtons:function(e){function p(){return G&&(a(this).removeClass(c),H._stopSpin(),G=!1),!1}function s(){if(!I.disabled){var b=H.element[0],d=this===x?1:-1;b.focus(),b.select(),a(this).addClass(c),G=!0,H._startSpin(d)}return!1}function t(a){function b(){B=0,a()}if(B){if(a===C)return;clearTimeout(B)}C=a,B=setTimeout(b,100)}function u(a,b){if(F)return!1;var c=String.fromCharCode(b||a),d=H.options;return c>="0"&&"9">=c||"-"==c?!1:H.places>0&&c==d.point||c==d.group?!1:!0}function v(a){for(var b=0;b<r.length;b++)if(r[b]==a)return!0;return!1}function w(a){return"auto"==a?0:parseInt(a)}var x,y,z,A,B,C,D,E,F,G,H=this,I=H.options,J=I.className,K=I.width,L=I.showOn,M=a.support.boxModel,N=e.outerHeight(),O=(H.oMargin=w(e.css("margin-right")),H.wrapper=e.wrap('<span class="spinner-wrpr" />').css({width:(H.oWidth=M?e.width():e.outerWidth())-K,marginRight:"30px",marginLeft:"30px",textAlign:"center","float":"none",marginTop:0}).after('<span class="ui-spinner ui-widget"></span>').next()),P=H.btnContainer=a('<div class="ui-spinner-buttons"><div class="ui-spinner-up ui-spinner-button ui-state-default ui-corner-tr"><span class="ui-icon '+I.upIconClass+'"> </span></div><div class="ui-spinner-down ui-spinner-button ui-state-default ui-corner-br"><span class="ui-icon '+I.downIconClass+'"> </span></div></div>'),Q="rtl"==e[0].dir;J&&O.addClass(J),O.append(P.css({height:N,left:0,top:0})),z=H.buttons=P.find(".ui-spinner-button"),z.css({width:"30px",height:N-(M?z.outerHeight()-z.height():0)}),z.eq(0).css({right:"0"}),z.eq(1).css({left:"0"}),x=z[0],y=z[1],A=z.find(".ui-icon"),P.width("105px"),"always"!=L&&P.css("opacity",0),("hover"==L||"both"==L)&&z.add(e).bind("mouseenter"+q,function(){t(function(){D=!0,H.focused&&"hover"!=L||H.showButtons()})}).bind("mouseleave"+q,function(){t(function(){D=!1,H.focused&&"hover"!=L||H.hideButtons()})}),z.hover(function(){H.buttons.removeClass(d),I.disabled||a(this).addClass(d)},function(){a(this).removeClass(d)}).mousedown(s).mouseup(p).mouseout(p),o&&z.dblclick(function(){return I.disabled||(H._change(),H._doSpin((this===x?1:-1)*I.step)),!1}).bind("selectstart",function(){return!1}),e.bind("keydown"+q,function(b){var d,e,f,o=b.keyCode;if(b.ctrl||b.alt)return!0;if(v(o)&&(F=!0),E)return!1;switch(o){case g:case k:d=1,e=o==k;break;case h:case l:d=-1,e=o==l;break;case i:case j:d=o==i^Q?1:-1;break;case m:return f=H.options.min,null!=f&&H._setValue(f),!1;case n:return f=H.options.max,f=H.options.max,null!=f&&H._setValue(f),!1}return d?(E||I.disabled||(keyDir=d,a(d>0?x:y).addClass(c),E=!0,H._startSpin(d,e)),!1):void 0}).bind("keyup"+q,function(a){if(a.ctrl||a.alt)return!0;switch(v(f)&&(F=!1),a.keyCode){case g:case i:case k:case h:case j:case l:return z.removeClass(c),H._stopSpin(),E=!1,!1}}).bind("keypress"+q,function(a){return u(a.keyCode,a.charCode)?!1:void 0}).bind("change"+q,function(){H._change()}).bind("focus"+q,function(){function a(){H.element.select()}o?a():setTimeout(a,0),H.focused=!0,b=H,D||"focus"!=L&&"both"!=L||H.showButtons()}).bind("blur"+q,function(){H.focused=!1,D||"focus"!=L&&"both"!=L||H.hideButtons()})},_procOptions:function(a){var b,c=this,d=c.element,e=c.options,f=e.min,g=e.max,h=e.step,i=e.places,j=-1;"slow"==e.increment?e.increment=[{count:1,mult:1,delay:250},{count:3,mult:1,delay:100},{count:0,mult:1,delay:50}]:"fast"==e.increment&&(e.increment=[{count:1,mult:1,delay:250},{count:19,mult:1,delay:100},{count:80,mult:1,delay:20},{count:100,mult:10,delay:20},{count:0,mult:100,delay:20}]),null==f&&null!=(b=d.attr("min"))&&(f=parseFloat(b)),null==g&&null!=(b=d.attr("max"))&&(g=parseFloat(b)),h||null==(b=d.attr("step"))||"any"!=b&&(h=parseFloat(b),e.largeStep*=h),e.step=h=h||e.defaultStep,null==i&&-1!=(b=h+"").indexOf(".")&&(i=b.length-b.indexOf(".")-1),c.places=i,null!=g&&null!=f&&(f>g&&(f=g),j=Math.max(Math.max(j,e.format(g,i,d).length),e.format(f,i,d).length)),a&&(c.inputMaxLength=d[0].maxLength),b=c.inputMaxLength,b>0&&(j=j>0?Math.min(b,j):b,b=Math.pow(10,j)-1,(null==g||g>b)&&(g=b),b=-(b+1)/10+1,(null==f||b>f)&&(f=b)),j>0&&d.attr("maxlength",j),e.min=f,e.max=g,c._change(),d.unbind(p+q),e.mouseWheel&&d.bind(p+q,c._mouseWheel)},_mouseWheel:function(c){var d=a.data(this,"spinner");return!d.options.disabled&&d.focused&&b===d?(d._change(),d._doSpin(((c.wheelDelta||-c.detail)>0?1:-1)*d.options.step),!1):void 0},_setTimer:function(a,b,c){function d(){e._spin(b,c)}var e=this;e._stopSpin(),e.timer=setInterval(d,a)},_stopSpin:function(){this.timer&&(clearInterval(this.timer),this.timer=0)},_startSpin:function(a,b){var c=this,d=c.options,e=d.increment;c._change(),c._doSpin(a*(b?c.options.largeStep:c.options.step)),e&&e.length>0&&(c.counter=0,c.incCounter=0,c._setTimer(e[0].delay,a,b))},_spin:function(a,b){var c=this,d=c.options.increment,e=d[c.incCounter];c._doSpin(a*e.mult*(b?c.options.largeStep:c.options.step)),c.counter++,c.counter>e.count&&c.incCounter<d.length-1&&(c.counter=0,e=d[++c.incCounter],c._setTimer(e.delay,a,b))},_doSpin:function(a){var b=this,c=b.curvalue;null==c&&(c=(a>0?b.options.min:b.options.max)||0),b._setValue(c+a)},_parseValue:function(){var a=this.element.val();return a?this.options.parse(a,this.element):null},_validate:function(a){var b=this.options,c=b.min,d=b.max;return null!=a||b.allowNull||(a=null!=this.curvalue?this.curvalue:c||d||0),null!=d&&a>d?d:null!=c&&c>a?c:a},_change:function(){{var a=this,b=a._parseValue();a.options.min,a.options.max}a.selfChange||(isNaN(b)&&(b=a.curvalue),a._setValue(b,!0))},_setOption:function(b,c){a.Widget.prototype._setOption.call(this,b,c),this._procOptions()},increment:function(){this._doSpin(this.options.step)},decrement:function(){this._doSpin(-this.options.step)},showButtons:function(a){var b=this.btnContainer.stop();a?b.css("opacity",1):b.fadeTo("fast",1)},hideButtons:function(a){var b=this.btnContainer.stop();a?b.css("opacity",0):b.fadeTo("fast",0),this.buttons.removeClass(d)},_setValue:function(a,b){var c=this;c.curvalue=a=c._validate(a),c.element.val(null!=a?c.options.format(a,c.places,c.element):""),b||(c.selfChange=!0,c.element.change(),c.selfChange=!1)},value:function(a){return arguments.length?(this._setValue(a),this.element):this.curvalue},enable:function(){this.buttons.removeClass(e),this.element[0].disabled=!1,a.Widget.prototype.enable.call(this)},disable:function(){this.buttons.addClass(e).removeClass(d),this.element[0].disabled=!0,a.Widget.prototype.disable.call(this)},destroy:function(){this.wrapper.remove(),this.element.unbind(q).css({width:this.oWidth,marginRight:this.oMargin}),a.Widget.prototype.destroy.call(this)}})}(jQuery),function(a){function b(){var a="!@#$%^&*()+=[]\\';,/{}|\":<>?~`.-_";return a+=" "}function c(){var a="¬€£¦";return a}function d(b,c,d){b.each(function(){var b=a(this);b.bind("keyup change paste",function(a){var e="";a.originalEvent&&a.originalEvent.clipboardData&&a.originalEvent.clipboardData.getData&&(e=a.originalEvent.clipboardData.getData("text/plain")),setTimeout(function(){h(b,c,d,e)},0)}),b.bind("keypress",function(a){var e=a.charCode?a.charCode:a.which;if(!(g(e)||a.ctrlKey||a.metaKey)){var f=String.fromCharCode(e),h=b.selection(),i=h.start,j=h.end,k=b.val(),l=k.substring(0,i)+f+k.substring(j),m=c(l,d);m!=l&&a.preventDefault()}})})}function e(b,c){var d=parseFloat(a(b).val()),e=a(b);return isNaN(d)?void e.val(""):(f(c.min)&&d<c.min&&e.val(""),void(f(c.max)&&d>c.max&&e.val("")))}function f(a){return!isNaN(a)}function g(a){return a>=32?!1:10==a?!1:13==a?!1:!0}function h(a,b,c,d){var e=a.val();""==e&&d.length>0&&(e=d);var f=b(e,c);if(e!=f){var g=a.alphanum_caret();a.val(f),a.alphanum_caret(e.length==f.length+1?g-1:g)}}function i(b,c){"undefined"==typeof c&&(c=D);var d,e={};return d="string"==typeof b?F[b]:"undefined"==typeof b?{}:b,a.extend(e,c,d),"undefined"==typeof e.blacklist&&(e.blacklistSet=x(e.allow,e.disallow)),e}function j(b){var c,d={};return c="string"==typeof b?G[b]:"undefined"==typeof b?{}:b,a.extend(d,E,c),d}function k(a,b,c){return c.maxLength&&a.length>=c.maxLength?!1:c.allow.indexOf(b)>=0?!0:c.allowSpace&&" "==b?!0:c.blacklistSet.contains(b)?!1:!c.allowNumeric&&K[b]?!1:!c.allowUpper&&u(b)?!1:!c.allowLower&&v(b)?!1:!c.allowCaseless&&w(b)?!1:!c.allowLatin&&L.contains(b)?!1:c.allowOtherCharSets?!0:K[b]||L.contains(b)?!0:!1}function l(a,b,c){if(K[b])return n(a,c)?!1:p(a,c)?!1:o(a,c)?!1:q(a+b,c)?!1:r(a+b,c)?!1:!0;if(c.allowPlus&&"+"==b&&""==a)return!0;if(c.allowMinus&&"-"==b&&""==a)return!0;if(b==I&&c.allowThouSep&&A(a,b))return!0;if(b==J){if(a.indexOf(J)>=0)return!1;if(c.allowDecSep)return!0}return!1}function m(a){return a+="",a.replace(/[^0-9]/g,"").length}function n(a,b){var c=b.maxDigits;if(""==c||isNaN(c))return!1;var d=m(a);return d>=c?!0:!1}function o(a,b){var c=b.maxDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(-1==d)return!1;var e=a.substring(d),f=m(e);return f>=c?!0:!1}function p(a,b){var c=b.maxPreDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(d>=0)return!1;var e=m(a);return e>=c?!0:!1}function q(a,b){if(!b.max||b.max<0)return!1;var c=parseFloat(a);return c>b.max?!0:!1}function r(a,b){if(!b.min||b.min>0)return!1;var c=parseFloat(a);return c<b.min?!0:!1}function s(a,b){if("string"!=typeof a)return a;var c,d=a.split(""),e=[],f=0;for(f=0;f<d.length;f++){c=d[f];var g=e.join("");k(g,c,b)&&e.push(c)}return e.join("")}function t(a,b){if("string"!=typeof a)return a;var c,d=a.split(""),e=[],f=0;for(f=0;f<d.length;f++){c=d[f];var g=e.join("");l(g,c,b)&&e.push(c)}return e.join("")}function u(a){var b=a.toUpperCase(),c=a.toLowerCase();return a==b&&b!=c?!0:!1}function v(a){var b=a.toUpperCase(),c=a.toLowerCase();return a==c&&b!=c?!0:!1}function w(a){return a.toUpperCase()==a.toLowerCase()?!0:!1
  }function x(a,b){var c=new B(H+b),d=new B(a),e=c.subtract(d);return e}function y(){var a,b="0123456789".split(""),c={},d=0;for(d=0;d<b.length;d++)a=b[d],c[a]=!0;return c}function z(){var a="abcdefghijklmnopqrstuvwxyz",b=a.toUpperCase(),c=new B(a+b);return c}function A(a){if(0==a.length)return!1;var b=a.indexOf(J);if(b>=0)return!1;var c=a.indexOf(I);if(0>c)return!0;var d=a.lastIndexOf(I),e=a.length-d-1;if(3>e)return!1;var f=m(a.substring(c));return f%3>0?!1:!0}function B(a){this.map="string"==typeof a?C(a):{}}function C(a){var b,c={},d=a.split(""),e=0;for(e=0;e<d.length;e++)b=d[e],c[b]=!0;return c}a.fn.alphanum=function(a){var b=i(a),c=this;return d(c,s,b),this},a.fn.alpha=function(a){var b=i("alpha"),c=i(a,b),e=this;return d(e,s,c),this},a.fn.numeric=function(a){var b=j(a),c=this;return d(c,t,b),c.blur(function(){e(this,a)}),this};var D={allow:"",disallow:"",allowSpace:!0,allowNumeric:!0,allowUpper:!0,allowLower:!0,allowCaseless:!0,allowLatin:!0,allowOtherCharSets:!0,maxLength:0/0},E={allowPlus:!1,allowMinus:!0,allowThouSep:!0,allowDecSep:!0,allowLeadingSpaces:!1,maxDigits:0/0,maxDecimalPlaces:0/0,maxPreDecimalPlaces:0/0,max:0/0,min:0/0},F={alpha:{allowNumeric:!1},upper:{allowNumeric:!1,allowUpper:!0,allowLower:!1,allowCaseless:!0},lower:{allowNumeric:!1,allowUpper:!1,allowLower:!0,allowCaseless:!0}},G={integer:{allowPlus:!1,allowMinus:!0,allowThouSep:!1,allowDecSep:!1},positiveInteger:{allowPlus:!1,allowMinus:!1,allowThouSep:!1,allowDecSep:!1}},H=b()+c(),I=",",J=".",K=y(),L=z();B.prototype.add=function(a){var b=this.clone();for(var c in a.map)b.map[c]=!0;return b},B.prototype.subtract=function(a){var b=this.clone();for(var c in a.map)delete b.map[c];return b},B.prototype.contains=function(a){return this.map[a]?!0:!1},B.prototype.clone=function(){var a=new B;for(var b in this.map)a.map[b]=!0;return a},a.fn.alphanum.backdoorAlphaNum=function(a,b){var c=i(b);return s(a,c)},a.fn.alphanum.backdoorNumeric=function(a,b){var c=j(b);return t(a,c)},a.fn.alphanum.setNumericSeparators=function(a){1==a.thousandsSeparator.length&&1==a.decimalSeparator.length&&(I=a.thousandsSeparator,J=a.decimalSeparator)}}(jQuery),function(a){function b(a,b){if(a.createTextRange){var c=a.createTextRange();c.move("character",b),c.select()}else null!=a.selectionStart&&(a.focus(),a.setSelectionRange(b,b))}function c(a){if("selection"in document){var b=a.createTextRange();try{b.setEndPoint("EndToStart",document.selection.createRange())}catch(c){return 0}return b.text.length}return null!=a.selectionStart?a.selectionStart:void 0}a.fn.alphanum_caret=function(d,e){return"undefined"==typeof d?c(this.get(0)):this.queue(function(c){if(isNaN(d)){var f=a(this).val().indexOf(d);e===!0?f+=d.length:"undefined"!=typeof e&&(f+=e),b(this,f)}else b(this,d);c()})}}(jQuery),function(a){var b=function(a){return a?a.ownerDocument.defaultView||a.ownerDocument.parentWindow:window},c=function(b){var c=a.Range.current(b).clone(),d=a.Range(b).select(b);return c.overlaps(d)?(c.compare("START_TO_START",d)<1?(startPos=0,c.move("START_TO_START",d)):(fromElementToCurrent=d.clone(),fromElementToCurrent.move("END_TO_START",c),startPos=fromElementToCurrent.toString().length),endPos=c.compare("END_TO_END",d)>=0?d.toString().length:startPos+c.toString().length,{start:startPos,end:endPos}):null},d=function(d){var e=b(d);if(void 0!==d.selectionStart)return document.activeElement&&document.activeElement!=d&&d.selectionStart==d.selectionEnd&&0==d.selectionStart?{start:d.value.length,end:d.value.length}:{start:d.selectionStart,end:d.selectionEnd};if(e.getSelection)return c(d,e);try{if("input"==d.nodeName.toLowerCase()){var f=b(d).document.selection.createRange(),g=d.createTextRange();g.setEndPoint("EndToStart",f);var h=g.text.length;return{start:h,end:h+f.text.length}}var i=c(d,e);if(!i)return i;var j=a.Range.current().clone(),k=j.clone().collapse().range,l=j.clone().collapse(!1).range;return k.moveStart("character",-1),l.moveStart("character",-1),0!=i.startPos&&""==k.text&&(i.startPos+=2),0!=i.endPos&&""==l.text&&(i.endPos+=2),i}catch(m){return{start:d.value.length,end:d.value.length}}},e=function(a,c,d){var e=b(a);if(a.setSelectionRange)void 0===d?(a.focus(),a.setSelectionRange(c,c)):(a.select(),a.selectionStart=c,a.selectionEnd=d);else if(a.createTextRange){var f=a.createTextRange();f.moveStart("character",c),d=d||c,f.moveEnd("character",d-a.value.length),f.select()}else if(e.getSelection){var h=e.document,i=e.getSelection(),j=h.createRange(),k=[c,void 0!==d?d:c];g([a],k),j.setStart(k[0].el,k[0].count),j.setEnd(k[1].el,k[1].count),i.removeAllRanges(),i.addRange(j)}else if(e.document.body.createTextRange){var j=document.body.createTextRange();j.moveToElementText(a),j.collapse(),j.moveStart("character",c),j.moveEnd("character",void 0!==d?d:c),j.select()}},f=function(a,b,c,d){"number"==typeof c[0]&&c[0]<b&&(c[0]={el:d,count:c[0]-a}),"number"==typeof c[1]&&c[1]<=b&&(c[1]={el:d,count:c[1]-a})},g=function(a,b,c){var d,e;c=c||0;for(var h=0;a[h];h++)d=a[h],3===d.nodeType||4===d.nodeType?(e=c,c+=d.nodeValue.length,f(e,c,b,d)):8!==d.nodeType&&(c=g(d.childNodes,b,c));return c};jQuery.fn.selection=function(a,b){return void 0!==a?this.each(function(){e(this,a,b)}):d(this[0])},a.fn.selection.getCharElement=g}(jQuery),function(a){a.fn.extend({select2SortableOrder:function(){var b=this.filter("[multiple]");return b.each(function(){var b=a(this);if("object"!=typeof b.data("select2"))return!1;var c,d=b.siblings(".select2-container"),e=[];b.find("option").each(function(){!this.selected&&e.push(this)}),c=a(d.find('.select2-choices li[class!="select2-search-field"]').map(function(){if(!this)return void 0;var c=a(this).data("select2Data").id;return b.find('option[value="'+c+'"]')[0]})),c.push.apply(c,e),b.children().remove(),b.append(c)}),b},select2Sortable:function(){var b=Array.prototype.slice.call(arguments,0);if($this=this.filter("[multiple]"),validMethods=["destroy"],0===b.length||"object"==typeof b[0]){var c={bindOrder:"formSubmit",sortableOptions:{placeholder:"ui-state-highlight",items:"li:not(.select2-search-field)",tolerance:"pointer"}},d=a.extend(c,b[0]);"object"!=typeof $this.data("select2")&&$this.select2(),$this.each(function(){var b=a(this),c=b.siblings(".select2-container").find(".select2-choices");switch(c.sortable(d.sortableOptions),d.bindOrder){case"sortableStop":c.on("sortstop.select2sortable",function(){b.select2SortableOrder()}),b.on("change",function(){a(this).select2SortableOrder()});break;default:b.closest("form").unbind("submit.select2sortable").on("submit.select2sortable",function(){b.select2SortableOrder()})}})}else{if(-1==a.inArray(b[0],validMethods))throw"Unknown method: "+b[0];"destroy"===b[0]&&$this.select2SortableDestroy()}return $this},select2SortableDestroy:function(){var b=this.filter("[multiple]");return b.each(function(){var b=a(this),c=b.parent().find(".select2-choices");b.closest("form").unbind("submit.select2sortable"),c.unbind("sortstop.select2sortable"),c.sortable("destroy")}),b}})}(jQuery),jQuery&&function(a){function b(b,c){var d=a('<div class="minicolors" />'),e=a.minicolors.defaults;b.data("minicolors-initialized")||(c=a.extend(!0,{},e,c),d.addClass("minicolors-theme-"+c.theme).toggleClass("minicolors-with-opacity",c.opacity),void 0!==c.position&&a.each(c.position.split(" "),function(){d.addClass("minicolors-position-"+this)}),b.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",c).prop("size",7).wrap(d).after('<div class="minicolors-panel minicolors-slider-'+c.control+'"><div class="minicolors-slider"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider"><div class="minicolors-picker"></div></div><div class="minicolors-grid"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),c.inline||(b.after('<span class="minicolors-swatch"><span class="minicolors-swatch-color"></span></span>'),b.next(".minicolors-swatch").on("click",function(a){a.preventDefault(),b.focus()})),b.parent().find(".minicolors-panel").on("selectstart",function(){return!1}).end(),c.inline&&b.parent().addClass("minicolors-inline"),h(b,!1),b.data("minicolors-initialized",!0))}function c(a){var b=a.parent();a.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),b.before(a).remove()}function d(a){var b=a.parent(),c=b.find(".minicolors-panel"),d=a.data("minicolors-settings");!a.data("minicolors-initialized")||a.prop("disabled")||b.hasClass("minicolors-inline")||b.hasClass("minicolors-focus")||(e(),b.addClass("minicolors-focus"),c.stop(!0,!0).fadeIn(d.showSpeed,function(){d.show&&d.show.call(a.get(0))}))}function e(){a(".minicolors-input").each(function(){var b=a(this),c=b.data("minicolors-settings"),d=b.parent();c.inline||d.find(".minicolors-panel").fadeOut(c.hideSpeed,function(){d.hasClass("minicolors-focus")&&c.hide&&c.hide.call(b.get(0)),d.removeClass("minicolors-focus")})})}function f(a,b,c){var d,e,f,h,i=a.parents(".minicolors").find(".minicolors-input"),j=i.data("minicolors-settings"),k=a.find("[class$=-picker]"),l=a.offset().left,m=a.offset().top,n=Math.round(b.pageX-l),o=Math.round(b.pageY-m),p=c?j.animationSpeed:0;b.originalEvent.changedTouches&&(n=b.originalEvent.changedTouches[0].pageX-l,o=b.originalEvent.changedTouches[0].pageY-m),0>n&&(n=0),0>o&&(o=0),n>a.width()&&(n=a.width()),o>a.height()&&(o=a.height()),a.parent().is(".minicolors-slider-wheel")&&k.parent().is(".minicolors-grid")&&(d=75-n,e=75-o,f=Math.sqrt(d*d+e*e),h=Math.atan2(e,d),0>h&&(h+=2*Math.PI),f>75&&(f=75,n=75-75*Math.cos(h),o=75-75*Math.sin(h)),n=Math.round(n),o=Math.round(o)),a.is(".minicolors-grid")?k.stop(!0).animate({top:o+"px",left:n+"px"},p,j.animationEasing,function(){g(i,a)}):k.stop(!0).animate({top:o+"px"},p,j.animationEasing,function(){g(i,a)})}function g(a,b){function c(a,b){var c,d;return a.length&&b?(c=a.offset().left,d=a.offset().top,{x:c-b.offset().left+a.outerWidth()/2,y:d-b.offset().top+a.outerHeight()/2}):null}var d,e,f,g,h,j,k,m=a.val(),o=a.attr("data-opacity"),p=a.parent(),r=a.data("minicolors-settings"),s=p.find(".minicolors-swatch"),t=p.find(".minicolors-grid"),u=p.find(".minicolors-slider"),v=p.find(".minicolors-opacity-slider"),w=t.find("[class$=-picker]"),x=u.find("[class$=-picker]"),y=v.find("[class$=-picker]"),z=c(w,t),A=c(x,u),B=c(y,v);if(b.is(".minicolors-grid, .minicolors-slider")){switch(r.control){case"wheel":g=t.width()/2-z.x,h=t.height()/2-z.y,j=Math.sqrt(g*g+h*h),k=Math.atan2(h,g),0>k&&(k+=2*Math.PI),j>75&&(j=75,z.x=69-75*Math.cos(k),z.y=69-75*Math.sin(k)),e=n(j/.75,0,100),d=n(180*k/Math.PI,0,360),f=n(100-Math.floor(A.y*(100/u.height())),0,100),m=q({h:d,s:e,b:f}),u.css("backgroundColor",q({h:d,s:e,b:100}));break;case"saturation":d=n(parseInt(z.x*(360/t.width()),10),0,360),e=n(100-Math.floor(A.y*(100/u.height())),0,100),f=n(100-Math.floor(z.y*(100/t.height())),0,100),m=q({h:d,s:e,b:f}),u.css("backgroundColor",q({h:d,s:100,b:f})),p.find(".minicolors-grid-inner").css("opacity",e/100);break;case"brightness":d=n(parseInt(z.x*(360/t.width()),10),0,360),e=n(100-Math.floor(z.y*(100/t.height())),0,100),f=n(100-Math.floor(A.y*(100/u.height())),0,100),m=q({h:d,s:e,b:f}),u.css("backgroundColor",q({h:d,s:e,b:100})),p.find(".minicolors-grid-inner").css("opacity",1-f/100);break;default:d=n(360-parseInt(A.y*(360/u.height()),10),0,360),e=n(Math.floor(z.x*(100/t.width())),0,100),f=n(100-Math.floor(z.y*(100/t.height())),0,100),m=q({h:d,s:e,b:f}),t.css("backgroundColor",q({h:d,s:100,b:100}))}a.val(l(m,r.letterCase))}b.is(".minicolors-opacity-slider")&&(o=r.opacity?parseFloat(1-B.y/v.height()).toFixed(2):1,r.opacity&&a.attr("data-opacity",o)),s.find("SPAN").css({backgroundColor:m,opacity:o}),i(a,m,o)}function h(a,b){var c,d,e,f,g,h,j,k=a.parent(),o=a.data("minicolors-settings"),p=k.find(".minicolors-swatch"),s=k.find(".minicolors-grid"),t=k.find(".minicolors-slider"),u=k.find(".minicolors-opacity-slider"),v=s.find("[class$=-picker]"),w=t.find("[class$=-picker]"),x=u.find("[class$=-picker]");switch(c=l(m(a.val(),!0),o.letterCase),c||(c=l(m(o.defaultValue,!0),o.letterCase)),d=r(c),b||a.val(c),o.opacity&&(e=""===a.attr("data-opacity")?1:n(parseFloat(a.attr("data-opacity")).toFixed(2),0,1),isNaN(e)&&(e=1),a.attr("data-opacity",e),p.find("SPAN").css("opacity",e),g=n(u.height()-u.height()*e,0,u.height()),x.css("top",g+"px")),p.find("SPAN").css("backgroundColor",c),o.control){case"wheel":h=n(Math.ceil(.75*d.s),0,s.height()/2),j=d.h*Math.PI/180,f=n(75-Math.cos(j)*h,0,s.width()),g=n(75-Math.sin(j)*h,0,s.height()),v.css({top:g+"px",left:f+"px"}),g=150-d.b/(100/s.height()),""===c&&(g=0),w.css("top",g+"px"),t.css("backgroundColor",q({h:d.h,s:d.s,b:100}));break;case"saturation":f=n(5*d.h/12,0,150),g=n(s.height()-Math.ceil(d.b/(100/s.height())),0,s.height()),v.css({top:g+"px",left:f+"px"}),g=n(t.height()-d.s*(t.height()/100),0,t.height()),w.css("top",g+"px"),t.css("backgroundColor",q({h:d.h,s:100,b:d.b})),k.find(".minicolors-grid-inner").css("opacity",d.s/100);break;case"brightness":f=n(5*d.h/12,0,150),g=n(s.height()-Math.ceil(d.s/(100/s.height())),0,s.height()),v.css({top:g+"px",left:f+"px"}),g=n(t.height()-d.b*(t.height()/100),0,t.height()),w.css("top",g+"px"),t.css("backgroundColor",q({h:d.h,s:d.s,b:100})),k.find(".minicolors-grid-inner").css("opacity",1-d.b/100);break;default:f=n(Math.ceil(d.s/(100/s.width())),0,s.width()),g=n(s.height()-Math.ceil(d.b/(100/s.height())),0,s.height()),v.css({top:g+"px",left:f+"px"}),g=n(t.height()-d.h/(360/t.height()),0,t.height()),w.css("top",g+"px"),s.css("backgroundColor",q({h:d.h,s:100,b:100}))}a.data("minicolors-initialized")&&i(a,c,e)}function i(a,b,c){var d=a.data("minicolors-settings"),e=a.data("minicolors-lastChange");e&&e.hex===b&&e.opacity===c||(a.data("minicolors-lastChange",{hex:b,opacity:c}),d.change&&(d.changeDelay?(clearTimeout(a.data("minicolors-changeTimeout")),a.data("minicolors-changeTimeout",setTimeout(function(){d.change.call(a.get(0),b,c)},d.changeDelay))):d.change.call(a.get(0),b,c)),a.trigger("change").trigger("input"))}function j(b){var c=m(a(b).val(),!0),d=t(c),e=a(b).attr("data-opacity");return d?(void 0!==e&&a.extend(d,{a:parseFloat(e)}),d):null}function k(b,c){var d=m(a(b).val(),!0),e=t(d),f=a(b).attr("data-opacity");return e?(void 0===f&&(f=1),c?"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat(f)+")":"rgb("+e.r+", "+e.g+", "+e.b+")"):null}function l(a,b){return"uppercase"===b?a.toUpperCase():a.toLowerCase()}function m(a,b){return a=a.replace(/[^A-F0-9]/gi,""),3!==a.length&&6!==a.length?"":(3===a.length&&b&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),"#"+a)}function n(a,b,c){return b>a&&(a=b),a>c&&(a=c),a}function o(a){var b={},c=Math.round(a.h),d=Math.round(255*a.s/100),e=Math.round(255*a.b/100);if(0===d)b.r=b.g=b.b=e;else{var f=e,g=(255-d)*e/255,h=(f-g)*(c%60)/60;360===c&&(c=0),60>c?(b.r=f,b.b=g,b.g=g+h):120>c?(b.g=f,b.b=g,b.r=f-h):180>c?(b.g=f,b.r=g,b.b=g+h):240>c?(b.b=f,b.r=g,b.g=f-h):300>c?(b.b=f,b.g=g,b.r=g+h):360>c?(b.r=f,b.g=g,b.b=f-h):(b.r=0,b.g=0,b.b=0)}return{r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b)}}function p(b){var c=[b.r.toString(16),b.g.toString(16),b.b.toString(16)];return a.each(c,function(a,b){1===b.length&&(c[a]="0"+b)}),"#"+c.join("")}function q(a){return p(o(a))}function r(a){var b=s(t(a));return 0===b.s&&(b.h=360),b}function s(a){var b={h:0,s:0,b:0},c=Math.min(a.r,a.g,a.b),d=Math.max(a.r,a.g,a.b),e=d-c;return b.b=d,b.s=0!==d?255*e/d:0,b.h=0!==b.s?a.r===d?(a.g-a.b)/e:a.g===d?2+(a.b-a.r)/e:4+(a.r-a.g)/e:-1,b.h*=60,b.h<0&&(b.h+=360),b.s*=100/255,b.b*=100/255,b}function t(a){return a=parseInt(a.indexOf("#")>-1?a.substring(1):a,16),{r:a>>16,g:(65280&a)>>8,b:255&a}}a.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",hide:null,hideSpeed:100,inline:!1,letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default"}},a.extend(a.fn,{minicolors:function(f,g){switch(f){case"destroy":return a(this).each(function(){c(a(this))}),a(this);case"hide":return e(),a(this);case"opacity":return void 0===g?a(this).attr("data-opacity"):(a(this).each(function(){h(a(this).attr("data-opacity",g))}),a(this));case"rgbObject":return j(a(this),"rgbaObject"===f);case"rgbString":case"rgbaString":return k(a(this),"rgbaString"===f);case"settings":return void 0===g?a(this).data("minicolors-settings"):(a(this).each(function(){var b=a(this).data("minicolors-settings")||{};c(a(this)),a(this).minicolors(a.extend(!0,b,g))}),a(this));case"show":return d(a(this).eq(0)),a(this);case"value":return void 0===g?a(this).val():(a(this).each(function(){h(a(this).val(g))}),a(this));default:return"create"!==f&&(g=f),a(this).each(function(){b(a(this),g)}),a(this)}}}),a(document).on("mousedown.minicolors touchstart.minicolors",function(b){a(b.target).parents().add(b.target).hasClass("minicolors")||e()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(b){var c=a(this);b.preventDefault(),a(document).data("minicolors-target",c),f(c,b,!0)}).on("mousemove.minicolors touchmove.minicolors",function(b){var c=a(document).data("minicolors-target");c&&f(c,b)}).on("mouseup.minicolors touchend.minicolors",function(){a(this).removeData("minicolors-target")}).on("mousedown.minicolors touchstart.minicolors",".minicolors-swatch",function(b){var c=a(this).parent().find(".minicolors-input");b.preventDefault(),d(c)}).on("focus.minicolors",".minicolors-input",function(){var b=a(this);b.data("minicolors-initialized")&&d(b)}).on("blur.minicolors",".minicolors-input",function(){var b=a(this),c=b.data("minicolors-settings");b.data("minicolors-initialized")&&(b.val(m(b.val(),!0)),""===b.val()&&b.val(m(c.defaultValue,!0)),b.val(l(b.val(),c.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(b){var c=a(this);if(c.data("minicolors-initialized"))switch(b.keyCode){case 9:e();break;case 13:case 27:e(),c.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var b=a(this);b.data("minicolors-initialized")&&h(b,!0)}).on("paste.minicolors",".minicolors-input",function(){var b=a(this);b.data("minicolors-initialized")&&setTimeout(function(){h(b,!0)},1)})}(jQuery),jQuery(document).ready(function(){jQuery(".ace-editor").each(function(a,b){var c=b,d=jQuery(b).attr("data-editor"),e=ace.edit(d);e.setTheme("ace/theme/"+jQuery(b).attr("data-theme")),e.getSession().setMode("ace/mode/"+jQuery(b).attr("data-mode")),e.on("change",function(){jQuery("#"+c.id).val(e.getSession().getValue()),redux_change(jQuery(b))})})}),function(a){"use strict";a.reduxBackground=a.reduxBackground||{},a(document).ready(function(){a.reduxBackground.init()}),a.reduxBackground.init=function(){a(".redux-container-background .remove-image, .redux-container-background .remove-file").unbind("click").on("click",function(){return a.reduxBackground.removeImage(a(this).parents("fieldset.redux-field:first")),a.reduxBackground.preview(a(this)),!1}),a(".redux-container-background .background_upload_button").unbind().on("click",function(b){a.reduxBackground.addImage(b,a(this).parents("fieldset.redux-field:first"))}),a(".redux-background-input").on("change",function(){a.reduxBackground.preview(a(this))}),a(".redux-container-background .redux-color").wpColorPicker({change:function(b,c){redux_change(a(this)),a("#"+b.target.id+"-transparency").removeAttr("checked"),a(this).val(c.color.toString()),a.reduxBackground.preview(a(this))}})},a.reduxBackground.preview=function(b){var c=b.parents(".redux-container-background:first"),d=a(c).find(".background-preview");if(d){var e=c.data("id")+"][",f="height:"+d.height()+"px;";a(c).find(".redux-background-input").each(function(){var b=a(this).serializeArray();b=b[0],b&&-1!=b.name.indexOf("[background-")&&""!==b.value&&(b.name=b.name.split(e),b.name=b.name[1].replace("]",""),f+="background-image"==b.name?b.name+':url("'+b.value+'");':b.name+":"+b.value+";")}),d.attr("style",f).fadeIn()}},a.reduxBackground.addImage=function(b,c){b.preventDefault();var d,e=jQuery(this);return d?void d.open():(d=wp.media({multiple:!1,library:{},title:e.data("choose"),button:{text:e.data("update")}}),d.on("select",function(){var b=d.state().get("selection").first();if(d.close(),console.log(b.attributes.type),"image"===b.attributes.type){c.find(".upload").val(b.attributes.url),c.find(".upload-id").val(b.attributes.id),c.find(".upload-height").val(b.attributes.height),c.find(".upload-width").val(b.attributes.width),redux_change(jQuery(c).find(".upload-id"));var e=b.attributes.url;if("undefined"!=typeof b.attributes.sizes&&"undefined"!=typeof b.attributes.sizes.thumbnail)e=b.attributes.sizes.thumbnail.url;else if("undefined"!=typeof b.attributes.sizes){var f=b.attributes.height;for(var g in b.attributes.sizes){var h=b.attributes.sizes[g];h.height<f&&(f=h.height,e=h.url)}}else e=b.attributes.icon;c.find(".upload-thumbnail").val(e),c.find(".upload").hasClass("noPreview")||c.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+e+'">').slideDown("fast"),c.find(".remove-image").removeClass("hide"),c.find(".redux-background-input-properties").slideDown(),a.reduxBackground.preview(c.find(".upload"))}}),void d.open())},a.reduxBackground.removeImage=function(a){if(a.find(".remove-image").addClass("hide")){a.find(".remove-image").addClass("hide"),a.find(".upload").val(""),a.find(".upload-id").val(""),a.find(".upload-height").val(""),a.find(".upload-width").val(""),redux_change(jQuery(a).find(".upload-id")),a.find(".redux-background-input-properties").hide();var b=a.find(".screenshot");b.slideUp(),a.find(".remove-file").unbind(),jQuery(".section-upload .upload-notice").length>0&&jQuery(".background_upload_button").remove()}}}(jQuery),jQuery(document).ready(function(){jQuery(".redux-border-top, .redux-border-right, .redux-border-bottom, .redux-border-left, .redux-border-all").numeric({allowMinus:!1}),jQuery(".redux-border-style").select2({triggerChange:!0,allowClear:!0}),jQuery(".redux-border-input").on("change",function(){var a=jQuery(this).parents(".redux-field:first").find(".field-units").val();0!==jQuery(this).parents(".redux-field:first").find(".redux-border-units").length&&(a=jQuery(this).parents(".redux-field:first").find(".redux-border-units option:selected").val());var b=jQuery(this).val();"undefined"!=typeof a&&b&&(b+=a),jQuery(this).hasClass("redux-border-all")?jQuery(this).parents(".redux-field:first").find(".redux-border-value").each(function(){jQuery(this).val(b)}):jQuery("#"+jQuery(this).attr("rel")).val(b)}),jQuery(".redux-border-units").on("change",function(){jQuery(this).parents(".redux-field:first").find(".redux-border-input").change()})}),jQuery(document).ready(function(){jQuery(".buttonset").each(function(){jQuery(this).is(":checkbox")&&jQuery(this).find(".buttonset-item").button(),jQuery(".buttonset").buttonset()})}),function(a){"use strict";a.redux=a.redux||{};a(document).ready(function(){a.redux.color()}),a.redux.color=function(){a(".redux-color-init").wpColorPicker({change:function(b){redux_change(a(this)),a("#"+b.target.id+"-transparency").removeAttr("checked")},clear:function(){redux_change(a(this).parent().find(".redux-color-init"))}}),a(".redux-color").on("focus",function(){a(this).data("oldcolor",a(this).val())}),a(".redux-color").on("keyup",function(){var b=a(this).val(),c=redux_color_validate(this),d="#"+a(this).attr("id");"transparent"===b?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),a(d+"-transparency").attr("checked","checked")):(a(d+"-transparency").removeAttr("checked"),c&&c!==a(this).val()&&a(this).val(c))}),a(".redux-color").on("blur",function(){var b=a(this).val(),c="#"+a(this).attr("id");"transparent"===b?(a(this).parent().parent().find(".wp-color-result").css("background-color","transparent"),a(c+"-transparency").attr("checked","checked")):(redux_color_validate(this)===b&&0!==b.indexOf("#")&&a(this).val(a(this).data("oldcolor")),a(c+"-transparency").removeAttr("checked"))}),a(".redux-color").on("keydown",function(){a(this).data("oldkeypress",a(this).val())}),a(".color-transparency").on("click",function(){a(this).is(":checked")?(a("#"+a(this).data("id")).val("transparent"),a("#"+a(this).data("id")).parent().parent().find(".wp-color-result").css("background-color","transparent")):"transparent"===a("#"+a(this).data("id")).val()&&a("#"+a(this).data("id")).val("")})}}(jQuery),function(a){"use strict";a.redux=a.redux||{};a(document).ready(function(){a.redux.color_rgba()}),a.redux.color_rgba=function(){a(".redux-color_rgba-init").minicolors({animationSpeed:50,animationEasing:"swing",inline:!1,letterCase:"lowercase",position:"bottom left",theme:"default",opacity:!0,change:function(b,c){redux_change(a(this)),a("#"+a(this).data("id")+"-transparency").removeAttr("checked"),a("#"+a(this).data("id")+"-alpha").val(c)}}),a(".redux-color_rgba").on("focus",function(){a(this).data("oldcolor",a(this).val())}),a(".redux-color_rgba").on("keyup",function(){var b=a(this).val(),c=redux_color_rgba_validate(this),d="#"+a(this).attr("id");"transparent"===b?(a("#"+a(this).data("id")).parent().parent().find(".minicolors-swatch-color").attr("style",""),a(d+"-transparency").attr("checked","checked")):(a(d+"-transparency").removeAttr("checked"),c&&c!==a(this).val()&&a(this).val(c))}),a(".redux-color_rgba").on("blur",function(){var b=a(this).val(),c="#"+a(this).attr("id");"transparent"===b?(a("#"+a(this).data("id")).parent().parent().find(".minicolors-swatch-color").attr("style",""),a(c+"-transparency").attr("checked","checked")):(redux_color_validate(this)===b&&0!==b.indexOf("#")&&a(this).val(a(this).data("oldcolor")),a(c+"-transparency").removeAttr("checked"))}),a(".redux-color_rgba").on("keydown",function(){a(this).data("oldkeypress",a(this).val())}),a(".color_rgba-transparency").on("click",function(){var b=a(this).parent().parent().data("id"),c=a(this).parent().parent().find(".minicolors-swatch-color").css("opacity").substring(0,4);a(this).is(":checked")?(a("#"+a(this).data("id")).attr("data-opacity","0.00"),a("#"+b+"-alpha").val("0.00"),a("#"+a(this).data("id")).parent().parent().find(".minicolors-swatch-color").css("display","none")):(a("#"+a(this).data("id")).attr("data-opacity",c),a("#"+b+"-alpha").val(c),a("#"+a(this).data("id")).parent().parent().find(".minicolors-swatch-color").css("display",""))}),a(".redux-color_rgba").on("focus",function(){var b=a(this).parent().find(".minicolors-swatch-color").css("opacity").substring(0,4);a(this).attr("data-opacity",b),a("#"+a(this).parent().parent().data("id")+"-alpha").val(b),a(this).parent().find(".minicolors-swatch-color").css("display","")})}}(jQuery),jQuery(document).ready(function(){jQuery(".redux-datepicker").each(function(){jQuery(this).datepicker()})}),jQuery(document).ready(function(){jQuery(".redux-dimensions-height, .redux-dimensions-width").numeric({}),jQuery(".redux-dimensions-units").select2({width:"resolve",triggerChange:!0,allowClear:!0}),jQuery(".redux-dimensions-input").on("change",function(){var a=jQuery(this).parents(".redux-field:first").find(".field-units").val();0!==jQuery(this).parents(".redux-field:first").find(".redux-dimensions-units").length&&(a=jQuery(this).parents(".redux-field:first").find(".redux-dimensions-units option:selected").val()),jQuery("#"+jQuery(this).attr("rel")).val("undefined"!=typeof a?jQuery(this).val()+a:jQuery(this).val())}),jQuery(".redux-dimensions-units").on("change",function(){jQuery(this).parents(".redux-field:first").find(".redux-dimensions-input").change()})}),function(a){"use strict";a.gallery=a.gallery||{},a(document).ready(function(){a.gallery()}),a.gallery=function(){a("body").on({click:function(b){var c=a(this).closest("fieldset");if("clear-gallery"===b.currentTarget.id){{c.find(".gallery_values").val("")}return void c.find(".screenshot").html("")}if("undefined"!=typeof wp&&wp.media&&wp.media.gallery){b.preventDefault();var d,e=(a(this),c.find(".gallery_values").val());d=e?'[gallery ids="'+e+'"]':'[gallery ids="0"]';var f=wp.media.gallery.edit(d);return f.state("gallery-edit").on("update",function(a){c.find(".screenshot").html("");var b,d,e="",f=a.models.map(function(a){return b=a.toJSON(),d="undefined"!=typeof b.sizes.thumbnail?b.sizes.thumbnail.url:b.url,e="<a class='of-uploaded-image' href='"+d+"'><img class='redux-option-image' src='"+d+"' alt='' /></a>",c.find(".screenshot").append(e),a.id});c.find(".gallery_values").val(f.join(",")),redux_change(c.find(".gallery_values"))}),!1}}},".gallery-attachments")}}(jQuery),function(a){"use strict";a.redux.group=a.group||{},a(document).ready(function(){a.redux.group()}),a.redux.group=function(){a("#redux-groups-accordion").accordion({header:"> div > h3",collapsible:!0,active:!1,heightStyle:"content",icons:{header:"ui-icon-plus",activeHeader:"ui-icon-minus"}}).sortable({axis:"y",handle:"h3",stop:function(b,c){c.item.children("h3").triggerHandler("focusout");var d=a("input.slide-sort");d.each(function(b){a(this).val(b)})}}),a('.redux-groups-accordion-group input[data-title="true"]').on("keyup",function(b){a(this).closest(".redux-groups-accordion-group").find(".redux-groups-header").text(b.target.value),a(this).closest(".redux-groups-accordion-group").find(".slide-title").val(b.target.value)}),a(".redux-groups-remove").live("click",function(){redux_change(a(this)),a(this).parent().find('input[type="text"]').val(""),a(this).parent().find('input[type="hidden"]').val(""),a(this).parent().parent().slideUp("medium",function(){a(this).remove()})}),a(".redux-groups-add").click(function(){var b=a(this).prev().find(".redux-dummy").clone(!0).show(),c=a(this).parent().find(".redux-dummy-slide-count"),d=c.val();c.val(parseInt(d)+1),a(this).prev().append(b),a(b).removeClass("redux-dummy"),a(b).find('input[type="text"], input[type="hidden"], textarea , select').each(function(){var c=a(this).data("name"),e=a(this).attr("id");"undefined"!=typeof e&&e!==!1&&a(this).attr("id",a(this).attr("id").replace("@",d)),"undefined"!=typeof c&&c!==!1&&a(this).attr("name",a(this).data("name").replace("@",d)),"SELECT"==a(this).prop("tagName")&&(a(b).find(".select2-container").remove(),a(b).find("select").removeClass("select2-offscreen")),a(this).val(""),a(this).hasClass("slide-sort")&&a(this).val(d)})})}}(jQuery),jQuery(document).ready(function(){jQuery(".redux-image-select label img, .redux-image-select label .tiles").click(function(a){var b=jQuery(this).closest("label").attr("for");if(jQuery(this).parents("fieldset:first").find(".redux-image-select-selected").removeClass("redux-image-select-selected"),jQuery(this).closest("label").find('input[type="radio"]').prop("checked"),jQuery(this).closest("label").hasClass("redux-image-select-preset-"+b)){a.preventDefault();var c=jQuery(this).closest("label").find("input"),d=c.data("presets");if(void 0!==c&&null!==c){var e=confirm(redux.args.preset_confirm);e&&(jQuery('label[for="'+b+'"]').addClass("redux-image-select-selected").find("input[type='radio']").attr("checked",!0),window.onbeforeunload=null,jQuery("#import-code-value").val(JSON.stringify(d)),jQuery("#redux-import").click())}return!1}redux_change(jQuery(this).closest("label").find('input[type="radio"]')),jQuery('label[for="'+b+'"]').addClass("redux-image-select-selected").find("input[type='radio']").attr("checked",!0)}),jQuery(".tiles").qtip({content:{text:function(){return"<img src='"+jQuery(this).attr("rel")+"' style='max-width:150px;' alt='' />"}},style:"qtip-tipsy",position:{my:"top center",at:"bottom center"}})}),function(a){"use strict";a(document).ready(function(){a("#redux-import").click(function(b){return""===a("#import-code-value").val()&&""===a("#import-link-value").val()?(b.preventDefault(),!1):void 0}),a("#redux-import-code-button").click(function(){a("#redux-import-link-wrapper").is(":visible")&&(a("#redux-import-link-wrapper").hide(),a("#import-link-value").val("")),a("#redux-import-code-wrapper").fadeIn("fast")}),a("#redux-import-link-button").click(function(){a("#redux-import-code-wrapper").is(":visible")&&(a("#redux-import-code-wrapper").hide(),a("#import-code-value").val("")),a("#redux-import-link-wrapper").fadeIn("fast")
  }),a("#redux-export-code-copy").click(function(){a("#redux-export-link-value").is(":visible")&&a("#redux-export-link-value").hide(),a("#redux-export-code").fadeIn("fast")}),a("#redux-export-link").click(function(){a("#redux-export-code").is(":visible")&&a("#redux-export-code").hide(),a("#redux-export-link-value").fadeIn("fast")})})}(jQuery),function(a){"use strict";a.redux=a.redux||{},a(document).ready(function(){a.redux.media()}),a.redux.media=function(){a(".remove-image, .remove-file").unbind("click").on("click",function(){redux_remove_file(a(this).parents("fieldset.redux-field:first"))}),a(".media_upload_button").unbind().on("click",function(b){redux_add_file(b,a(this).parents("fieldset.redux-field:first"))})}}(jQuery),function(a){"use strict";a.redux=a.redux||{},a(document).ready(function(){a.redux.multi_text()}),a.redux.multi_text=function(){a(".redux-multi-text-remove").live("click",function(){redux_change(a(this)),a(this).prev('input[type="text"]').val(""),a(this).parent().slideUp("medium",function(){a(this).remove()})}),a(".redux-multi-text-add").click(function(){for(var b=parseInt(a(this).attr("data-add_number")),c=a(this).attr("data-id"),d=a(this).attr("data-name"),e=0;b>e;e++){var f=a("#"+c+" li:last-child").clone();a("#"+c).append(f),a("#"+c+" li:last-child").removeAttr("style"),a("#"+c+' li:last-child input[type="text"]').val(""),a("#"+c+' li:last-child input[type="text"]').attr("name",d)}})}}(jQuery),function(a){"use strict";function b(a){return a.hasOwnProperty("id")?"<span class='elusive'><i class='"+a.id+"'></i>&nbsp;&nbsp;"+a.id.toUpperCase()+"</span>":void 0}a.redux=a.redux||{},a(document).ready(function(){a.redux.select()}),a.redux.select=function(){a("select.redux-select-item").each(function(){var c={width:"resolve",triggerChange:!0,allowClear:!0};if(a(this).siblings(".select2_params").size()>0){var d=a(this).siblings(".select2_params").val();d=JSON.parse(d),c=a.extend({},c,d)}a(this).hasClass("font-icons")&&(c=a.extend({},{formatResult:b,formatSelection:b,escapeMarkup:function(a){return a}},c)),a(this).select2(c),a(this).hasClass("select2-sortable")&&(c={},c.bindOrder="sortableStop",c.sortableOptions={placeholder:"ui-state-highlight"},a(this).select2Sortable(c)),a(this).on("change",function(){redux_change(a(a(this))),a(this).select2SortableOrder()})})}}(jQuery),function(a){a(".redux-select-image-item").on("change",function(){var b=a(this).parents(".redux-field:first").find(".redux-preview-image");""===a(this).val()?b.fadeOut("medium",function(){b.attr("src","")}):(b.attr("src",a(this).val()),b.fadeIn().css("visibility","visible"))})}(jQuery),function(a){"use strict";function b(a){return+a===a&&!isFinite(a)||Boolean(a%1)}function c(a){var b=a.toString().split(".");return b[1].length}function d(d,e,f,g){for(var h=e;f>=h;h+=g){var i=h;if(b(g)){var j=c(g);i=h.toFixed(j)}a(d).append('<option value="'+i+'">'+i+"</option>")}}a(document).ready(function(){a("div.redux-slider-container").each(function(){var b,c,e,f,g,h,i=0,j=1,k=2,l=3,m=a(this).data("id"),n=a(this).data("min"),o=a(this).data("max"),p=a(this).data("step"),q=a(this).data("handles"),r=a(this).data("default-one"),s=a(this).data("default-two"),t=a(this).data("resolution"),u=parseInt(a(this).data("display")),v=Boolean(a(this).data("rtl")),w=a(this).data("float-mark");h=v===!0?"rtl":"ltr";var x,y,z=[n,o],A=[r,s],B=[r];u==k?(e=a(".redux-slider-input-one-"+m),f=a(".redux-slider-input-two-"+m),x=e,y=f):u==l?(e=a(".redux-slider-select-one-"+m),f=a(".redux-slider-select-two-"+m),d(e,n,o,t,p),2===q&&d(f,n,o,t,p)):u==j?(e=a("#redux-slider-label-one-"+m),f=a("#redux-slider-label-two-"+m)):u==i&&(e=a(".redux-slider-value-one-"+m),f=a(".redux-slider-value-two-"+m));var C,D;if(u==j){var E=[e,"html"],F=[f,"html"];C=[E],D=[E,F]}else C=[e],D=[e,f];2===q?(b=A,c=D,g=!0):(b=B,c=C,g="lower");var G=a(this).noUiSlider({range:z,start:b,handles:q,step:p,connect:g,behaviour:"tap-drag",direction:h,serialization:{resolution:t,to:c,mark:w},slide:function(){if(u==j)if(2===q){var b=G.val();a("input.redux-slider-value-one-"+m).attr("value",b[0]),a("input.redux-slider-value-two-"+m).attr("value",b[1])}else a("input.redux-slider-value-one-"+m).attr("value",G.val());u==l&&(a(".redux-slider-select-one").select2("val",G.val()[0]),2===q&&a(".redux-slider-select-two").select2("val",G.val()[1])),redux_change(jQuery(this).parents(".redux-field-container:first").find("input"))}});u===k&&(x.keydown(function(a){var b=G.val(),c=parseInt(b[0]);switch(a.which){case 38:G.val([c+1,null]);break;case 40:G.val([c-1,null]);break;case 13:a.preventDefault()}}),2===q&&y.keydown(function(a){var b=G.val(),c=parseInt(b[1]);switch(a.which){case 38:G.val([null,c+1]);break;case 40:G.val([null,c-1]);break;case 13:a.preventDefault()}}))}),a(".redux-slider-select-one, .redux-slider-select-two").select2({width:"resolve",triggerChange:!0,allowClear:!0})})}(jQuery),jQuery(document).ready(function(){jQuery(".redux-slides-remove").live("click",function(){redux_change(jQuery(this)),jQuery(this).parent().siblings().find('input[type="text"]').val(""),jQuery(this).parent().siblings().find("textarea").val(""),jQuery(this).parent().siblings().find('input[type="hidden"]').val("");var a=jQuery(this).parents(".redux-container-slides:first").find(".redux-slides-accordion-group").length;a>1?jQuery(this).parents(".redux-slides-accordion-group:first").slideUp("medium",function(){jQuery(this).remove()}):(jQuery(this).parents(".redux-slides-accordion-group:first").find(".remove-image").click(),jQuery(this).parents(".redux-container-slides:first").find(".redux-slides-accordion-group:last").find(".redux-slides-header").text("New Slide"))}),jQuery(".redux-slides-add").click(function(){var a=jQuery(this).prev().find(".redux-slides-accordion-group:last").clone(!0),b=jQuery(a).find('input[type="text"]').attr("name").match(/[0-9]+(?!.*[0-9])/),c=1*b+1;jQuery(a).find('input[type="text"], input[type="hidden"], textarea').each(function(){jQuery(this).attr("name",jQuery(this).attr("name").replace(/[0-9]+(?!.*[0-9])/,c)).attr("id",jQuery(this).attr("id").replace(/[0-9]+(?!.*[0-9])/,c)),jQuery(this).val(""),jQuery(this).hasClass("slide-sort")&&jQuery(this).val(c)}),jQuery(a).find(".screenshot").removeAttr("style"),jQuery(a).find(".screenshot").addClass("hide"),jQuery(a).find(".screenshot a").attr("href",""),jQuery(a).find(".remove-image").addClass("hide"),jQuery(a).find(".redux-slides-image").attr("src","").removeAttr("id"),jQuery(a).find("h3").text("").append('<span class="redux-slides-header">New slide</span><span class="ui-accordion-header-icon ui-icon ui-icon-plus"></span>'),jQuery(this).prev().append(a)}),jQuery(".slide-title").keyup(function(a){var b=a.target.value;jQuery(this).parents().eq(3).find(".redux-slides-header").text(b)}),jQuery(function(){jQuery(".redux-slides-accordion").accordion({header:"> div > fieldset > h3",collapsible:!0,active:!1,heightStyle:"content",icons:{header:"ui-icon-plus",activeHeader:"ui-icon-minus"}}).sortable({axis:"y",handle:"h3",connectWith:".redux-slides-accordion",start:function(a,b){b.placeholder.height(b.item.height()),b.placeholder.width(b.item.width())},placeholder:"ui-state-highlight",stop:function(a,b){b.item.children("h3").triggerHandler("focusout");var c=jQuery("input.slide-sort");c.each(function(a){jQuery(this).val(a)})}})})}),jQuery(document).ready(function(){jQuery(".redux-sortable").sortable({handle:".drag",placeholder:"ui-state-highlight",opacity:.7,update:function(){redux_change(jQuery(this))}}),jQuery(".checkbox_sortable").on("click",function(){jQuery("#"+jQuery(this).attr("rel")).val(jQuery(this).is(":checked")?1:"")})}),jQuery(function(){jQuery(".redux-sorter").each(function(){var a=jQuery(this).attr("id");jQuery("#"+a).find("ul").sortable({items:"li",placeholder:"placeholder",connectWith:".sortlist_"+a,opacity:.6,update:function(){jQuery(this).find(".position").each(function(){var b=jQuery(this).parent().attr("id"),c=jQuery(this).parent().parent().attr("id");c=c.replace(a+"_",""),redux_change(jQuery(this));var d=jQuery(this).parent().parent().parent().attr("id");jQuery(this).prop("name",redux.args.opt_name+"["+d+"]["+c+"]["+b+"]")})}})})}),jQuery(function(){jQuery(".redux-sorter").each(function(){var a=jQuery(this).attr("id");jQuery("#"+a).find("ul").sortable({items:"li",placeholder:"placeholder",connectWith:".sortlist_"+a,opacity:.8,stop:function(a,b){var c=redux.sorter[jQuery(this).attr("data-id")],d=jQuery(this).find("h3").text();c.limits&&d&&c.limits[d]&&(jQuery(this).children("li").length>=c.limits[d]?(jQuery(this).addClass("filled"),jQuery(this).children("li").length>c.limits[d]&&jQuery(b.sender).sortable("cancel")):jQuery(this).removeClass("filled"))},update:function(a,b){var c=redux.sorter[jQuery(this).attr("data-id")],d=jQuery(this).find("h3").text();c.limits&&d&&c.limits[d]&&(jQuery(this).children("li").length>=c.limits[d]?(jQuery(this).addClass("filled"),jQuery(this).children("li").length>c.limits[d]&&jQuery(b.sender).sortable("cancel")):jQuery(this).removeClass("filled")),jQuery(this).find(".position").each(function(){var a=jQuery(this).parent().attr("id"),b=jQuery(this).parent().parent().attr("data-group-id");redux_change(jQuery(this));var c=jQuery(this).parent().parent().parent().attr("id");jQuery(this).prop("name",redux.args.opt_name+"["+c+"]["+b+"]["+a+"]")})}})})}),jQuery(document).ready(function(){jQuery(".redux-spacing-top, .redux-spacing-right, .redux-spacing-bottom, .redux-spacing-left, .redux-spacing-all").numeric({}),jQuery(".redux-spacing-units").select2({width:"resolve",triggerChange:!0,allowClear:!0}),jQuery(".redux-spacing-input").on("change",function(){var a=jQuery(this).parents(".redux-field:first").find(".field-units").val();0!==jQuery(this).parents(".redux-field:first").find(".redux-spacing-units").length&&(a=jQuery(this).parents(".redux-field:first").find(".redux-spacing-units option:selected").val());var b=jQuery(this).val();"undefined"!=typeof a&&b&&(b+=a),jQuery(this).hasClass("redux-spacing-all")?jQuery(this).parents(".redux-field:first").find(".redux-spacing-value").each(function(){jQuery(this).val(b)}):jQuery("#"+jQuery(this).attr("rel")).val(b)}),jQuery(".redux-spacing-units").on("change",function(){jQuery(this).parents(".redux-field:first").find(".redux-spacing-input").change()})}),jQuery(document).ready(function(){function a(a,b,c){b.hasClass("spinnerInputChange")&&(b.removeClass("spinnerInputChange"),a=""===a||null===a?c.min:a>=parseInt(c.max)?c.max:a<=parseInt(c.min)?c.min:Math.round(a/c.step)*c.step,jQuery("#"+c.id).val(a))}jQuery(".redux_spinner").each(function(){var a=redux.spinner[jQuery(this).attr("rel")];jQuery("#"+a.id).spinner({value:parseInt(a.val,null),min:parseInt(a.min,null),max:parseInt(a.max,null),step:parseInt(a.step,null),range:"min",slide:function(b,c){var d=jQuery("#"+a.id);d.val(c.value),redux_change(d)}});var b=!1;parseInt(a.min,null)<0&&(b=!0),jQuery("#"+a.id).numeric({allowMinus:b,min:a.min,max:a.max})}),jQuery(".spinner-input").keyup(function(){jQuery(this).addClass("spinnerInputChange")}),jQuery(".spinner-input").blur(function(){}),jQuery(".spinner-input").focus(function(){a(jQuery(this).val(),jQuery(this),redux.spinner[jQuery(this).attr("id")])}),jQuery(".spinner-input").typeWatch({callback:function(b){a(b,jQuery(this),redux.spinner[jQuery(this).attr("id")])},wait:500,highlight:!1,captureLength:1})}),function(a){"use strict";a.redux=a.redux||{},a(document).ready(function(){a.redux.switch()}),a.redux.switch=function(){a(".cb-enable").click(function(){if(!a(this).hasClass("selected")){var b=a(this).parents(".switch-options");a(".cb-disable",b).removeClass("selected"),a(this).addClass("selected"),a(".checkbox-input",b).val(1),redux_change(a(".checkbox-input",b));var c=a(this),d=".f_"+c.data("id");a(d).slideDown("normal","swing")}}),a(".cb-disable").click(function(){if(!a(this).hasClass("selected")){var b=a(this).parents(".switch-options");a(".cb-enable",b).removeClass("selected"),a(this).addClass("selected"),a(".checkbox-input",b).val(0),redux_change(a(".checkbox-input",b));var c=a(this),d=".f_"+c.data("id");a(d).slideUp("normal","swing")}}),a(".cb-enable span, .cb-disable span").find().attr("unselectable","on")}}(jQuery),jQuery.noConflict(),jQuery(document).ready(function(a){function b(b){var c=jQuery(b).parents(".redux-container-typography:first").attr("data-id");a(b).hasClass("redux-typography-family");var d=a("#"+c+" select.redux-typography-family").val();d||(d=null);var e=a("#"+c+" select.redux-typography-family-backup").val(),f=a("#"+c+" .redux-typography-size").val(),g=a("#"+c+" .redux-typography-height").val(),h=a("#"+c+" .redux-typography-word").val(),i=a("#"+c+" .redux-typography-letter").val(),j=a("#"+c+" select.redux-typography-align").val(),k=a("#"+c+" select.redux-typography-transform").val(),l=a("#"+c+" select.redux-typography-style").val(),m=a("#"+c+" select.redux-typography-subsets").val(),n=a("#"+c+" .redux-typography-color").val(),o=a("#"+c).data("units"),p=a("#"+c+" .redux-typography-family option:selected"),q=d,r=p.data("google");a("#"+c).hasClass("typography-initialized")||(l=a("#"+c+" select.redux-typography-style").data("value"),m=a("#"+c+" select.redux-typography-subsets").data("value"),""!==l&&(l=String(l)),void 0!==typeof m&&(m=String(m)),a("#"+c).addClass("typography-initialized"));var s=jQuery.parseJSON(decodeURIComponent(p.data("details")));if(a("#"+c+" .redux-typography-font-options").val(decodeURIComponent(p.data("details"))),a(b).hasClass("redux-typography-family")){var t='<option value=""></option>';if(r){var u="";a.each(s.variants,function(a,b){b.id===l||1===Object.size(s.variants)?(u=' selected="selected"',l=b.id):u="",t+='<option value="'+b.id+'"'+u+">"+b.name.replace(/\+/g," ")+"</option>"}),a("#"+c+" .redux-typography-style").html(t),u="",t='<option value=""></option>',a.each(s.subsets,function(a,b){b.id===m||1===Object.size(s.subsets)?(u=' selected="selected"',m=b.id):u="",t+='<option value="'+b.id+'"'+u+">"+b.name.replace(/\+/g," ")+"</option>"}),"undefined"!=typeof e&&""!==e&&(q+=", "+e),a("#"+c+" .redux-typography-subsets").html(t),a("#"+c+" .redux-typography-subsets").fadeIn("fast"),a("#"+c+" .typography-family-backup").fadeIn("fast")}else s&&(a.each(s,function(b,d){b===l||"normal"===b?(u=' selected="selected"',a("#"+c+" .typography-style .select2-chosen").text(d)):u="",t+='<option value="'+b+'"'+u+">"+d.replace("+"," ")+"</option>"}),a("#"+c+" .redux-typography-style").html(t),a("#"+c+" .redux-typography-subsets").fadeOut("fast"),a("#"+c+" .typography-family-backup").fadeOut("fast"))}else a(b).hasClass("redux-typography-family-backup")&&""!==e&&a("#"+c+" .redux-typography-font-family").val(q);0===a("#"+c+" select.redux-typography-style option[value='"+l+"']").length?(l="",a("#"+c+" select.redux-typography-style").val("")):"400"===l&&a("#"+c+" select.redux-typography-style").val(l),0===a("#"+c+" select.redux-typography-subsets option[value='"+m+"']").length&&(m="",a("#"+c+" select.redux-typography-subsets").val(""));var v="style_link_"+c;if(a("."+v).remove(),null!==d&&"inherit"!==d){var w=d.replace(/\s+/g,"+");if(r){var x=w;l&&(x+=":"+l.replace(/\-/g," ")),m&&(x+="&subset="+m),WebFont&&WebFont.load({google:{families:[x]}}),a("#"+c+" .redux-typography-google").val(!0)}else a("#"+c+" .redux-typography-google").val(!1)}a("#"+c+" .typography-preview").css("font-size",f+o),a("#"+c+" .typography-preview").css("font-style","normal"),-1!==l.indexOf("italic")?(a("#"+c+" .typography-preview").css("font-style","italic"),a("#"+c+" .typography-font-style").val("italic"),l=l.replace("italic","")):a("#"+c+" .typography-font-style").val(""),a("#"+c+" .typography-font-weight").val(l),a("#"+c+" .typography-preview").css("font-weight",l),a("#"+c+" .typography-preview").css("font-family",d+", sans-serif"),"none"===d&&""===d&&a("#"+c+" .typography-preview").css("font-family","inherit"),g||(g=f),a("#"+c+" .typography-preview").css("line-height",g+o),a("#"+c+" .typography-preview").css("word-spacing",h+o),a("#"+c+" .typography-preview").css("letter-spacing",i+o),a("#"+c+" .typography-font-size").val(""===f?"":f+o),a("#"+c+" .typography-line-height").val(""===g?"":g+o),a("#"+c+" .typography-word-spacing").val(h+o),a("#"+c+" .typography-letter-spacing").val(i+o),n&&(a("#"+c+" .typography-preview").css("color",n),a("#"+c+" .typography-preview").css("background-color",getContrastColour(n))),a("#"+c+" .redux-typography-font-family").val(q),a("#"+c+" .typography-style .select2-chosen").text(a("#"+c+" .redux-typography-style option:selected").text()),a("#"+c+" .typography-script .select2-chosen").text(a("#"+c+" .redux-typography-subsets option:selected").text()),j&&a("#"+c+" .typography-preview").css("text-align",j),k&&a("#"+c+" .typography-preview").css("text-transform",k)}Object.size=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c},jQuery(".redux-typography-container").each(function(){var a=jQuery(this).find(".redux-typography-family");""!==a.data("value")&&jQuery(a).val(a.data("value")),b(a)}),jQuery(".redux-typography").on("change",function(){b(this)}),jQuery(".redux-typography-size, .redux-typography-height, .redux-typography-word, .redux-typography-letter, .redux-typography-align, .redux-typography-transform").keyup(function(){b(this)}),a(".redux-typography-color").wpColorPicker({change:function(a,c){redux_change(jQuery(this)),jQuery(this).val(c.color.toString()),b(jQuery(this))}}),jQuery(".redux-typography-size").numeric({allowMinus:!1}),jQuery(".redux-typography-height, .redux-typography-word, .redux-typography-letter").numeric({allowMinus:!0}),jQuery(".redux-typography-family, .redux-typography-family-backup, .redux-typography-align, .redux-typography-transform").select2({width:"resolve",triggerChange:!0,allowClear:!0}),jQuery(".redux-typography-qtip").each(function(){a(this).qtip({style:"qtip-tipsy black",position:{my:"bottom center",at:"top center"}})})}),function(a){"use strict";a.redux=a.redux||{},a(document).ready(function(){jQuery.fn.isOnScreen=function(){if(window){var a=jQuery(window),b={top:a.scrollTop(),left:a.scrollLeft()};b.right=b.left+a.width(),b.bottom=b.top+a.height();var c=this.offset();return c.right=c.left+this.outerWidth(),c.bottom=c.top+this.outerHeight(),!(b.right<c.left||b.left>c.right||b.bottom<c.top||b.top>c.bottom)}},a.redux.required(),a("body").on("change",".redux-main select, .redux-main radio, .redux-main input[type=checkbox], .redux-main input[type=hidden]",function(){a.redux.check_dependencies(this)}),a("body").on("check_dependencies",function(b,c){a.redux.check_dependencies(c)});for(var b=0;b<redux.fieldsHidden.length;b++)a.redux.check_dependencies(jQuery("#"+redux.fieldsHidden[b]));a("td > fieldset:empty,td > div:empty").parent().parent().hide()}),a.redux.required=function(){a(".hiddenFold, .showFold").each(function(){var b=a(this),c=b.parents("tr:eq(0)"),d=b.data();b.hasClass("hiddenFold")?(c.addClass("hiddenFold").attr("data-check-field",d.checkField).attr("data-check-comparison",d.checkComparison).attr("data-check-value",d.checkValue).attr("data-check-id",d.id).hide(),b.removeClass("hiddenFold").removeAttr("data-check-field").removeAttr("data-check-comparison").removeAttr("data-check-value")):(c.attr("data-check-field",d.checkField).attr("data-check-comparison",d.checkComparison).attr("data-check-value",d.checkValue).attr("data-check-id",d.id),b.removeClass("showFold").removeAttr("data-check-field").removeAttr("data-check-comparison").removeAttr("data-check-value"))}),a(".fold").promise().done(function(){a(".foldParent").each(function(){if("radio"!=a(this).attr("type")||"checked"==a(this).attr("checked")){var b=a(this).parents(".redux-field:first").data("id");redux.folds[b]&&(redux.folds[b].parent||a.redux.verify_fold(a(this)))}})})},a.redux.check_dependencies=function(b){var c=a(b),d=c.parents(".redux-group-tab:eq(0)");d.length||(d=a("body")),"checkbox"==a(b).prop("type")&&a(b).val(a(b).is(":checked")?"1":"0");var e=c.parents(".redux-field:first").data("id"),f=d.find('tr[data-check-field="'+e+'"]'),g=b.value,h=c.parents("tr:eq(0)").is(".hiddenFold");f.length&&f.each(function(){var b,c=a(this),d=c.data(),e=d.checkValue,f=!1,i="",j="",k="",l=c.find(".redux-field:first");l.hasClass("redux-container-info")&&(i=c.find(".redux-container-info").data("id"));var m=c.find(".redux-field:first");m.hasClass("redux-container-section")&&(j=c.find(".redux-container-section").data("id"));var n=c.find(".redux-field:first");if(n.hasClass("redux-container-divide")&&(k=c.find(".redux-container-divide").data("id")),!h)switch(d.checkComparison){case"=":case"equals":-1!==e.toString().indexOf("|")?(b=e.split("|"),-1!=a.inArray(g,b)&&(f=!0)):g==e&&(f=!0);break;case"!=":case"not":-1!==e.toString().indexOf("|")?(b=e.split("|"),-1==a.inArray(g,b)&&(f=!0)):g!=e&&(f=!0);break;case">":case"greater":case"is_larger":parseFloat(g)>parseFloat(e)&&(f=!0);break;case">=":parseFloat(g)>=parseFloat(e)&&(f=!0);break;case"<":case"less":case"is_smaller":parseFloat(g)<parseFloat(e)&&(f=!0);break;case"<=":parseFloat(g)<=parseFloat(e)&&(f=!0);break;case"contains":-1!=g.toString().indexOf(e)&&(f=!0);break;case"doesnt_contain":case"not_contain":-1==g.toString().indexOf(e)&&(f=!0);break;case"is_empty_or":(""===g||g==e)&&(f=!0);break;case"not_empty_and":""!==g&&g!=e&&(f=!0)}f===!0&&c.is(".hiddenFold")?(""!==i&&a("#info-"+i).css({display:"none"}).fadeIn(300).show(),""!==j&&a("#section-"+j).css({display:"none"}).fadeIn(300).show(),""!==k&&a("#"+k+"-divide").css({display:"none"}).fadeIn(300).show(),c.css({display:"none"}).removeClass("hiddenFold").find("select, radio, input[type=checkbox]").trigger("change"),c.fadeIn(300)):f!==!1||c.is(".hiddenFold")||(""!==i&&a("#info-"+i).css({display:""}).fadeOut(300).hide(),""!==j&&a("#section-"+j).css({display:""}).fadeOut(300).hide(),""!==k&&a("#"+k+"-divide").css({display:""}).fadeOut(300).hide(),c.css({display:""}).addClass("hiddenFold").find("select, radio, input[type=checkbox]").trigger("change"),c.fadeOut(300)),a("td > fieldset:empty,td > div:empty").parent().parent().hide()})},a.redux.verify_fold=function(b){var c=b.parents(".redux-field:first").data("id"),d=b.val(),e=b.parents(b.parents(".redux-groups-accordion-group:first").length>0?".redux-groups-accordion-group:first":".redux-group-tab:eq(0)");if(redux.folds[c]&&redux.folds[c].children){var f={};a.each(redux.folds[c].children,function(b,g){a.each(g,function(a,g){f[g]||(f[g]={show:!1,hidden:!1}),(b==d||f[g]===!0)&&(f[g].show=!0),f[g].show===!0&&e.find('tr[data-check-id="'+c+'"]').hasClass("hiddenFold")&&(f[g].show=!1),f[g].show===!0&&e.find('tr[data-check-id="'+redux.folds[c].parent+'"]').hasClass("hiddenFold")&&(f[g].show=!1),f[g].hidden=e.find('tr[data-check-id="'+g+'"]').hasClass("hiddenFold")})}),a.each(f,function(b){var c=e.find('tr[data-check-id="'+b+'"]');f[b].show===!0?c.fadeIn("medium",function(){c.removeClass("hiddenFold"),redux.folds[b]&&redux.folds[b].children&&a.redux.verify_fold(c.find("select, radio, input[type=checkbox], input[type=hidden]"))}):f[b].hidden===!1&&c.fadeOut("medium",function(){c.addClass("hiddenFold"),redux.folds[b].children&&a.redux.verify_fold(c.find("select, radio, input[type=checkbox], input[type=hidden]"))})})}}}(jQuery),jQuery.noConflict();var confirmOnPageExit=function(a){a=a||window.event;var b=redux.args.save_pending;return a&&(a.returnValue=b),window.onbeforeunload=null,b};jQuery(document).ready(function(a){function b(a){return decodeURI((new RegExp(a+"=(.+?)(&|$)").exec(location.search)||[,""])[1])}function c(a){var b=a.find(".expand_options"),c=a.find(".redux-sidebar").width(),d=jQuery(".redux-group-menu .active a").data("rel")+"_section_group";return b.hasClass("expanded")?(b.removeClass("expanded"),a.find(".redux-main").removeClass("expand"),a.find(".redux-sidebar").stop().animate({"margin-left":"0px"},500),a.find(".redux-main").stop().animate({"margin-left":c},500),a.find(".redux-group-tab").each(function(){jQuery(this).attr("id")!==d&&jQuery(this).fadeOut("fast")})):(b.addClass("expanded"),a.find(".redux-main").addClass("expand"),a.find(".redux-sidebar").stop().animate({"margin-left":-c-102},500),a.find(".redux-main").stop().animate({"margin-left":"0px"},500),a.find(".redux-group-tab").fadeIn()),!1}function d(){var a=jQuery("#info_bar").width()-2;jQuery("#info_bar").isOnScreen()||jQuery("#redux-footer-sticky").isOnScreen()?(jQuery("#redux-footer").css({background:"#eee",position:"inherit",bottom:"inherit",width:"inherit"}),jQuery("#redux-sticky-padder").hide(),jQuery("#redux-footer").removeClass("sticky-footer-fixed")):(jQuery("#redux-footer").css({position:"fixed",bottom:"0",width:a}),jQuery("#redux-footer").addClass("sticky-footer-fixed"),jQuery("#redux-sticky-padder").show())}if(jQuery(".redux-action_bar, .redux-presets-bar").on("click",function(){window.onbeforeunload=null}),jQuery().qtip){var e="",f=redux.args.hints.tip_style.shadow;f===!0&&(e="qtip-shadow");var g="",h=redux.args.hints.tip_style.color;""!==h&&(g="qtip-"+h);var i="",j=redux.args.hints.tip_style.rounded;j===!0&&(i="qtip-rounded");var k="",l=redux.args.hints.tip_style.style;""!==l&&(k="qtip-"+l);var m=e+","+g+","+i+","+k;m=m.replace(/,/g," ");var n=redux.args.hints.tip_position.my,o=redux.args.hints.tip_position.at;n=verifyPos(n.toLowerCase(),!0),o=verifyPos(o.toLowerCase(),!1);var p=redux.args.hints.tip_effect.show.event,q=redux.args.hints.tip_effect.hide.event,r=redux.args.hints.tip_effect.show.effect,s=redux.args.hints.tip_effect.show.duration,t=redux.args.hints.tip_effect.hide.effect,u=redux.args.hints.tip_effect.hide.duration;a("div.redux-qtip").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:{effect:function(){switch(r){case"slide":a(this).slideDown(s);break;case"fade":a(this).fadeIn(s);break;default:a(this).show()}},event:p},hide:{effect:function(){switch(t){case"slide":a(this).slideUp(u);break;case"fade":a(this).fadeOut(u);break;default:a(this).show(u)}},event:q},style:{classes:m},position:{my:n,at:o}})}),a("input[qtip-content]").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:"focus",hide:"blur",style:m,position:{my:n,at:o}})})}a("#toplevel_page_"+redux.args.slug+" .wp-submenu a, #wp-admin-bar-"+redux.args.slug+" a.ab-item").click(function(b){if(a("#toplevel_page_"+redux.args.slug).hasClass("wp-menu-open")||a(this).hasClass("ab-item")){b.preventDefault();var c=a(this).attr("href").split("&tab=");return a("#"+c[1]+"_section_group_li_a").click(),!1}}),jQuery(".redux-group-tab-link-a").click(function(){relid=jQuery(this).data("rel"),jQuery("#currentSection").val(relid),a.cookie("redux_current_tab",relid,{expires:7,path:"/"}),a("#toplevel_page_"+redux.args.slug+" .wp-submenu a.current").removeClass("current"),a("#toplevel_page_"+redux.args.slug+" .wp-submenu li.current").removeClass("current"),a("#toplevel_page_"+redux.args.slug+" .wp-submenu a").each(function(){var b=a(this).attr("href").split("&tab=");b[1]==relid&&(a(this).addClass("current"),a(this).parent().addClass("current"))});var b=jQuery(".redux-group-tab-link-li.active .redux-group-tab-link-a").data("rel");jQuery("#"+b+"_section_group_li").removeClass("active"),jQuery("#"+b+"_section_group").hide(),jQuery("#"+relid+"_section_group").fadeIn(200,function(){0!==jQuery("#redux-footer").length&&d()}),jQuery("#"+relid+"_section_group_li").addClass("active")});var v=b("tab");""!==v?a.cookie("redux_current_tab_get")!==v&&(a.cookie("redux_current_tab",v,{expires:7,path:"/"}),a.cookie("redux_current_tab_get",v,{expires:7,path:"/"}),jQuery("#"+v+"_section_group_li").click()):""!==a.cookie("redux_current_tab_get")&&a.removeCookie("redux_current_tab_get");var w=jQuery("#"+a.cookie("redux_current_tab")+"_section_group_li_a");null===a.cookie("redux_current_tab")||"undefined"==typeof a.cookie("redux_current_tab")||0===w.length?jQuery(".redux-group-tab-link-a:first").click():w.click(),jQuery('input[name="'+redux.args.opt_name+'[defaults]"]').click(function(){return confirm(redux.args.reset_confirm)?void(window.onbeforeunload=null):!1}),jQuery('input[name="'+redux.args.opt_name+'[defaults-section]"]').click(function(){return confirm(redux.args.reset_section_confirm)?void(window.onbeforeunload=null):!1}),jQuery(".expand_options").click(function(a){return a.preventDefault(),c(jQuery(this).parents(".redux-container:first")),!1}),jQuery("#redux-save").is(":visible")&&jQuery("#redux-save").slideDown(),jQuery("#redux-imported").is(":visible")&&jQuery("#redux-imported").slideDown(),jQuery(document.body).on("change",".redux-field input, .redux-field textarea, .redux-field select",function(){jQuery(this).hasClass("noUpdate")||redux_change(jQuery(this))});var x=jQuery("#redux-footer").height();jQuery("#redux-sticky-padder").css({height:x}),0!==jQuery("#redux-footer").length&&(jQuery(window).scroll(function(){d()}),jQuery(window).resize(function(){d()})),jQuery("#redux-save, #redux-imported").delay(4e3).slideUp(),jQuery("#redux-field-errors").delay(8e3).slideUp(),jQuery(".redux-save").click(function(){window.onbeforeunload=null}),a("#consolePrintObject").on("click",function(){console.log(jQuery.parseJSON(jQuery("#redux-object-json").html()))}),"function"==typeof jsonView&&jsonView("#redux-object-json","#redux-object-browser"),void 0!==redux.errors&&(jQuery("#redux-field-errors span").html(redux.errors.total),jQuery("#redux-field-errors").show(),jQuery.each(redux.errors.errors,function(a,b){jQuery("#"+a+"_section_group_li_a").prepend('<span class="redux-menu-error">'+b.total+"</span>"),jQuery("#"+a+"_section_group_li_a").addClass("hasError"),jQuery.each(b.errors,function(a,b){jQuery("#"+redux.args.opt_name+"-"+b.id).addClass("redux-field-error"),jQuery("#"+redux.args.opt_name+"-"+b.id).append('<div class="redux-th-error">'+b.msg+"</div>")})})),void 0!==redux.warnings&&(jQuery("#redux-field-warnings span").html(redux.warnings.total),jQuery("#redux-field-warnings").show(),jQuery.each(redux.warnings.warnings,function(a,b){jQuery("#"+a+"_section_group_li_a").prepend('<span class="redux-menu-warning">'+b.total+"</span>"),jQuery("#"+a+"_section_group_li_a").addClass("hasWarning"),jQuery.each(b.warnings,function(a,b){jQuery("#"+redux.args.opt_name+"-"+b.id).addClass("redux-field-warning"),jQuery("#"+redux.args.opt_name+"-"+b.id).append('<div class="redux-th-warning">'+b.msg+"</div>")})})),jQuery(".redux-section-tabs div").hide(),jQuery(".redux-section-tabs div:first").show(),jQuery(".redux-section-tabs ul li:first").addClass("active"),jQuery(".redux-section-tabs ul li a").click(function(){jQuery(".redux-section-tabs ul li").removeClass("active"),jQuery(this).parent().addClass("active");var b=a(this).attr("href");return jQuery(".redux-section-tabs div").hide(),jQuery(b).fadeIn(),!1})});