/* JCE Editor - 2.5.31 | 25 October 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function($){var docElement=document.documentElement;var smile=':)';var $input=document.createElement('input');var $div=document.createElement('div');$.support.input={};$.support.input.attr=(function(at){var o={},i;for(i=0,n=at.length;i<n;i++){o[at[i]]=!!(at[i]in $input);}
return o;})('placeholder max min pattern number'.split(' '));$.support.input.type=(function(props){var o={};for(var i=0,bool,inputElemType,defaultView,len=props.length;i<len;i++){$input.setAttribute('type',inputElemType=props[i]);bool=$input.type!=='text';if(bool){$input.value=smile;$input.style.cssText='position:absolute;visibility:hidden;';if(/^range$/.test(inputElemType)&&$input.style.WebkitAppearance!==undefined){docElement.appendChild($input);defaultView=document.defaultView;bool=defaultView.getComputedStyle&&defaultView.getComputedStyle($input,null).WebkitAppearance!=='textfield'&&($input.offsetHeight!==0);docElement.removeChild($input);}else if(/^(search|tel)$/.test(inputElemType)){}else if(/^(url|email)$/.test(inputElemType)){bool=$input.checkValidity&&$input.checkValidity()===false;}else if(/^color$/.test(inputElemType)){docElement.appendChild($input);docElement.offsetWidth;bool=$input.value!=smile;docElement.removeChild($input);}else{bool=$input.value!=smile;}}
o[props[i]]=!!bool;}
return o;})('search tel url email datetime date month week time datetime-local number range color'.split(' '));$.support.draggable=(function(){return'draggable'in $div;});$.fn.drag=function(){if(!$.support.draggable){$(this).draggable({axis:$(this).data('axis')});}else{$(this).bind('dragstart',function(e){e.dataTransfer.setData('Text',this.id);});}
return this;};$.fn.range=function(){if(!$.support.input.type.range){var self=this;var step=$(this).attr('step')||1;var min=$(this).attr('min');var max=$(this).attr('max');if(typeof min=='undefined'){min=0;}
if(typeof max=='undefined'){max=100;}
var slider=$('<div />').attr({id:$(this).attr('id'),'class':$(this).attr('class'),name:$(this).attr('name')}).slider({min:parseInt(min),max:parseInt(max),step:parseInt(step),value:$(this).val(),slide:function(e,ui){$(self).val(ui.value).change();},start:function(){$(self).mousedown();},stop:function(){$(self).mouseup();}}).insertBefore(this);$(this).hide();return slider;}
return this;};$.fn.number=function(){if(!$.support.input.type.number){return this.change(function(){var v=parseFloat($(this).val()),pv=$(this).attr('placeholder');if(typeof pv=='undefined'){pv='';}
if($.isNumeric(v)===false){$(this).val(pv);}});}
return this;};$.fn.placeholder=function(){if(!$.support.input.attr.placeholder){return this.each(function(){var v=$(this).attr('placeholder'),iv=$(this).val();if(iv===''||iv==v){$(this).addClass('placeholder').val(v).click(function(){if($(this).hasClass('placeholder')){$(this).val('').removeClass('placeholder');}}).blur(function(){iv=$(this).val();if(iv===''||iv==v){$(this).addClass('placeholder').val(v);}});}
$(this).change(function(){iv=$(this).val();if(iv===''){$(this).addClass('placeholder').val(v);}else{$(this).removeClass('placeholder');}});});}
return this;};$.fn.min=function(){if(!$.support.input.attr.min){return this.change(function(){var m=parseFloat($(this).attr('min')),v=parseFloat($(this).val()),pv=$(this).attr('placeholder');if(pv!='undefined'&&pv==v){return this;}
if(v<m){$(this).val(m);}});}
return this;};$.fn.max=function(){if(!$.support.input.attr.max){return this.change(function(){var m=parseFloat($(this).attr('max')),v=parseFloat($(this).val()),pv=$(this).attr('placeholder');if(pv!='undefined'&&pv==v){return this;}
if(v>m){$(this).val(m);}});}
return this;};$.fn.pattern=function(){this.change(function(){var pattern=$(this).attr('pattern'),v=$(this).val(),pv=$(this).attr('placeholder');if(pv!='undefined'&&pv==v){return this;}
if(!new RegExp('^(?:'+pattern+')$').test(v)){var n=new RegExp('('+pattern+')').exec(v);if(n){$(this).val(n[0]);}}});return this;};})(jQuery);(function($){$.support.canvas=false;var isMobile={Android:function(){return navigator.userAgent.match(/Android/i);},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i);},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i);},Opera:function(){return navigator.userAgent.match(/Opera Mini/i);},Windows:function(){return navigator.userAgent.match(/IEMobile/i);},any:function(){return(isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows());}};$.widget("ui.tips",{options:{speed:150,position:'top center',opacity:0.9,className:'',offsets:{'x':16,'y':16},width:200,fixed:true,parent:'body',trigger:'hover',show:$.noop,hide:$.noop,disabled:':disabled, .disabled'},_init:function(options){var self=this;$.extend(this.options,options);if($(this.element).hasClass('wf-tooltip-cancel-ondrag')){this._cancelOnDrag();}
$(this.element).click(function(e){if(self.options.trigger=='click'&&$(this).is(self.options.disabled)){return;}
if(this.nodeName=='A'||$('a',this).length||$(this).hasClass('wf-tooltip-cancel-ondrag')){return;}
if(self.options.trigger=='click'){if($('#jce-tooltip').is(':visible')){return self._end();}
self._start(e);}
if($('#jce-tooltip').hasClass('sticky')){self._unpin();}else{self._pin();}});if(this.options.trigger=='hover'){$(this.element).hover(function(e){if($('#jce-tooltip').hasClass('sticky')||$(this).hasClass('nohover')){return;}
return self._start(e);},function(e){if($('#jce-tooltip').hasClass('sticky')||$(this).hasClass('nohover')){return;}
return self._end();});}},_createTips:function(){var self=this,$tips=$('#jce-tooltip');if(!$tips.get(0)){$tips=$('<div id="jce-tooltip" role="tooltip" aria-hidden="true">'+'<span class="ui-icon ui-icon-close" title="Close"></span>'+'<div class="jce-tooltip-content"></div>'+'</div>').appendTo(this.options.parent);$('#jce-tooltip').append('<div class="jce-tooltip-pointer"></div>');if($.support.leadingWhitespace===false){$('#jce-tooltip div.jce-tooltip-pointer').append('<div class="jce-tooltip-pointer-inner"></div>');}
$('span.ui-icon-close',$tips).click(function(){self._end();}).hide();if($.support.cssFloat){$tips.css('opacity',0);}}
$tips.removeAttr('class').addClass('jce-tooltip').addClass(this.options.className);},_start:function(e){var self=this;this._createTips();var $tips=$('#jce-tooltip');$tips.data('source',this.element);if(this.options.content){var h=this.options.content;}else{var text=$(this.element).attr('title')||'',title='';if(/::/.test(text)){var parts=text.split('::');title=$.trim(parts[0]);text=$.trim(parts[1]);}
$(this.element).data('title',$(this.element).attr('title')).attr('title','');$(this.element).attr('aria-describedby','jce-tooltip');var h='';if(title){h+='<h4>'+title+'</h4>';}
if(text){h+='<p>'+text+'</p>';}}
$('div.jce-tooltip-content',$tips).html(h);$tips.show().attr('aria-hidden','false');if($.support.cssFloat){$tips.animate({'opacity':this.options.opacity},this.options.speed);}else{if(!window.XMLHttpRequest){$tips.css('width',200);}}
this._trigger('show');window.setTimeout(function(){self._position();$tips.css('visibility','visible');},1);},close:function(){return this._end();},_end:function(){var $tips=$('#jce-tooltip'),element=$tips.data('source')||this.element;if($(element).data('title')){$(element).attr('title',$(element).data('title'));}
$(element).removeAttr('aria-describedby');$tips.css('visibility','hidden').attr('aria-hidden','true').hide();if($.support.cssFloat){$tips.css('opacity',0);}
this._trigger('hide');this._unpin();},_cancelOnDrag:function(){var self=this;$(this.element).bind('mousedown',function(){$(this).addClass('nohover');self._end();$(this).data('title',$(this).attr('title')).attr('title','');}).bind('mouseup',function(){$(this).removeClass('nohover');$(this).attr('title',$(this).data('title'));});},_pin:function(){var self=this;$('#jce-tooltip').addClass('sticky');$('span.ui-icon-close','#jce-tooltip').css('display','block');$(window).on('click.tooltip-blur',function(e){var el=$(self.element).get(0),n=e.target;if(n==el||(el.nodeName=='LABEL'&&$(el).attr('for')&&n==$('#'+$(el).attr('for')).get(0))||n==$('#jce-tooltip').get(0)){return;}
if($(n).parents('#jce-tooltip').length===0){self._end();}});},_unpin:function(){$('#jce-tooltip').removeClass('sticky');$('span.ui-icon-close','#jce-tooltip').hide();$(window).off('click.tooltip-blur');},_position:function(){var $tips=$('#jce-tooltip');var $pointer=$('.jce-tooltip-pointer',$tips);var o=this.options.offsets;var tip={'width':$tips.outerWidth(),'height':$tips.outerHeight()};$($pointer).attr('style','');var position=this.options.position;var at=position.replace(/\s*center\s*/,'');var my=at.replace(/(left|right|top|bottom)/,function(s){switch(s){case'left':return'right-'+o.x;break;case'right':return'left+'+o.x;break;case'top':return'bottom-'+o.y;break;case'bottom':return'top+'+o.y;break;}});var pos={},ww=Math.round($(window).width()),wh=Math.round($(window).height()),pw=10,ph=10,st=$(window).scrollTop();$tips.position({my:my,at:at,of:$(this.element),collision:'flipfit flipfit',using:function(props,fb){if(Math.round(props.top)==0){props.top+=10;}
if(Math.round(props.left)==0){props.left+=10;}
if(Math.round(props.top+tip.height)==wh){props.top-=10;}
if(Math.round(props.left+tip.width)==ww){props.left-=10;}
if(/left|right/.test(position)){$pointer.css('top',Math.round(fb.target.top-fb.element.top)+fb.target.height/2);}
if(/top|bottom/.test(position)&&Math.round(fb.element.left)==0){$pointer.css('left',fb.target.left+Math.round(fb.target.width/2)-pw);}
if(fb.element.left<fb.target.left){position=position.replace('right','left');}else{position=position.replace('left','right');}
if(fb.element.top<fb.target.top){position=position.replace('bottom','top');}else{position=position.replace('top','bottom');}
$tips.css(props);}});$pointer.removeClass('top right bottom left center').addClass(position);},_createPointer:function(position){var $tips=$('#jce-tooltip'),canvas=$('canvas',$tips).get(0),context=canvas.getContext('2d');var w=canvas.width,h=canvas.height;context.clearRect(0,0,canvas.width,canvas.height);context.fillStyle=$tips.css('background-color');context.strokeStyle=$tips.css('border-top-color');context.lineWidth=1.8;context.beginPath();var pos=/(top|bottom|left|right)/.exec(position)||['','top'];switch(pos[1]){case'top':context.moveTo(0,0);context.lineTo(w/2,h);context.lineTo(w,0);break;case'bottom':context.moveTo(0,h);context.lineTo(w/2,0);context.lineTo(w,h);break;case'left':context.moveTo(0,0);context.lineTo(w,h/2);context.lineTo(0,h);break;case'right':context.moveTo(w,0);context.lineTo(0,h/2);context.lineTo(w,h);break;}
context.fill();context.stroke();context.closePath();},_locate:function(e){this._createTips();var $tips=$('#jce-tooltip');var o=this.options.offsets;var page={'x':e.pageX,'y':e.pageY};var tip={'x':$tips.outerWidth(),'y':$tips.outerHeight()};var offset=$(e.target).offset();var pos={'x':page.x+o.x,'y':page.y+o.y};var position=this.options.position;var scrollTop=$(document).scrollTop();if((pos.y-tip.y)<0||offset.top<(scrollTop+tip.y)){$tips.removeClass('jce-'+this.options.className+'-top');position=position.replace('top','bottom');$tips.addClass('jce-'+this.options.className+'-bottom');}else{$tips.removeClass('jce-'+this.options.className+'-bottom');position=position.replace('bottom','top');$tips.addClass('jce-'+this.options.className+'-top');}
switch(position){case'top center':pos.x=(page.x-Math.round((tip.x/2)))+o.x;pos.y=(page.y-tip.y)-o.y;break;case'bottom center':pos.x=(page.x-(tip.x/2))+o.x;pos.y=page.y+o.y;break;}
if(pos.x<0){pos.x=5;}
if(pos.x>parseFloat($(window).width())){pos.x=parseFloat($(window).width())-(tip.x/2+5);}
$tips.css({top:pos.y,left:pos.x});},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.tips,{version:"2.5.31"});})(jQuery);(function($){$.widget("ui.combobox",{options:{label:'Add Value',change:$.noop},_init:function(options){var self=this;$(this.element).removeClass('mceEditableSelect').addClass('editable');$('<span role="button" class="editable-edit" title="'+this.options.label+'"></span>').insertAfter(this.element).click(function(e){if($(this).hasClass('disabled'))
return;self._onChangeEditableSelect(e);});if($(this.element).is(':disabled')){$(this.element).next('span.editable-edit').addClass('disabled');}},_onChangeEditableSelect:function(e){var self=this;this.input=document.createElement('input');$(this.input).attr('type','text').addClass('editable-input').val($(this.element).val()).insertBefore($(this.element)).width($(this.element).width());$(this.input).blur(function(){self._onBlurEditableSelectInput();}).keydown(function(e){self._onKeyDown(e);});$(this.element).hide();this.input.focus();},_onBlurEditableSelectInput:function(){var self=this,o,found,v=$(this.input).val();if(v!=''){$('option:selected',this.element).prop('selected',false);if($('option[value="'+v+'"]',this.element).is('option')){$(this.element).val(v).change();}else{if(!found){var pattern=$(this.element).data('pattern');if(pattern&&!new RegExp('^(?:'+pattern+')$').test(v)){var n=new RegExp('('+pattern+')').exec(v);v=n?n[0]:'';}
if(v!=''){if($('option[value="'+v+'"]',this.element).length==0){$(this.element).append(new Option(v,v));}
$(this.element).val(v).change();}}}
self.options.change.call(self,v);}else{$(this.element).val('')||$('option:first',this.element).attr('selected','selected');}
$(this.element).show();$(this.input).remove();},_onKeyDown:function(e){if(e.which==13||e.which==27){this._onBlurEditableSelectInput();}},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.combobox,{version:"2.5.31"});})(jQuery);(function($){$.widget("ui.colorpicker",{instance:null,options:{color:'#FFFFFF',detail:50,speed:200,'stylesheets':[],custom_colors:'',forcedHighContrastMode:false,labels:{picker:'Picker',title:'Color Picker',palette:'Web Colors',named:'Named Colors',template:'Template Colors',custom:'Custom Colors',color:'Color',apply:'Apply',name:'Name'},insert:$.noop,close:$.noop,dialog:false,parent:'body'},_strhex:"0123456789abcdef",_colors:["#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033","#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099","#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff","#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033","#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399","#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff","#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333","#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399","#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff","#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633","#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699","#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff","#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633","#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999","#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff","#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933","#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999","#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff","#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33","#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99","#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff","#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33","#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99","#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff","#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33","#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99","#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"],_named:{'#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige','#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown','#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue','#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod','#A9A9A9':'DarkGray','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen','#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen','#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey','#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory','#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue','#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen','#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey','#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon','#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue','#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin','#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid','#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff','#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue','#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver','#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen','#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet','#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen'},_translate:function(s,d){var o=this.options;var v=o.labels[s]||d||'';if(typeof tinyMCEPopup!=='undefined'){v=tinyMCEPopup.getLang('colorpicker.'+s,v);}
return v;},_init:function(){var self=this,o=this.options;this._getStylesheetColors();if(this.options.dialog){if($('#tab-content .colorpicker_generated').length){return;}
var color=$(this.element).val()||'#000000';if(/rgb/.test(color)){color=this._rgbToHex(color);}
if($(self.element).hasClass('placeholder')){color='';}
this._createTabs();$('#colorpicker_insert').button({icons:{primary:'ui-icon-check'}}).click(function(e){e.preventDefault();self._insert();});if(self._wheel){self._wheel.setColor(color);}}else{if(this.options.widget){this.widget=$(this.options.widget);}else{this.widget=$('<span class="colorpicker_widget"></span>').insertAfter(this.element);}
$(this.widget).css('background-color',$(this.element).val()||'#000000').tips({trigger:'click',position:'right center',content:'<div id="colorpicker" title="Color Picker">'+self._getContent()+'</div>',className:'wf-colorpicker',opacity:1,parent:this.options.parent,show:function(){var color=$(self.element).val()||'#000000';if(/rgb/.test(color)){color=this._rgbToHex(color);}
if($(self.element).hasClass('placeholder')){color='';}
if($('#tab-content .colorpicker_generated').length){return;}
$('#colorpicker_tabs').html(function(i,h){return h.replace(/\{#(\w+)\}/gi,function(a,b){return self._translate(b);});});$('#colorpicker').append('<div id="colorpicker_preview">'+' <div id="colorpicker_preview_text">'+'  <input type="text" id="colorpicker_color" size="8" maxlength="8" value="'+color+'" class="ui-corner-all" aria-required="true" />'+' </div>'+' <div id="colorpicker_preview_color" class="ui-widget-content ui-corner-all"></div>'+' <div id="colorpicker_insert" class="btn btn-small"><i class="icon-ok"></i>&nbsp;'+o.labels.apply+'</div>'+'</div>');$('#colorpicker_preview_color').css('background-color',color);$('#colorpicker_insert').button({icons:{primary:'ui-icon-check'}}).click(function(e){e.preventDefault();self._insert();});self._createTabs();if(self._wheel){self._wheel.setColor(color);}}});}},_getContent:function(){var self=this,h='',o=this.options;h+='<div id="colorpicker_tabs">';h+='<ul class="nav nav-tabs">';h+='<li class="active"><a href="#colorpicker_picker" aria-controls="colorpicker_picker" class="active">{#picker}</a></li>';h+='<li><a href="#colorpicker_web" aria-controls="colorpicker_web">{#palette}</a></li>';h+='<li><a href="#colorpicker_named" aria-controls="colorpicker_named">{#named}</a></li>';if(o.stylesheets.length){h+='<li><a href="#colorpicker_template" aria-controls="colorpicker_template">{#template}</a></li>';}
h+='</ul>';h+='<div class="tab-content">';h+='<div id="colorpicker_picker" data-type="picker" class="tab-pane active"></div>';h+='<div id="colorpicker_web" data-type="web" class="tab-pane"></div>';h+='<div id="colorpicker_named" data-type="named" class="tab-pane"></div>';if(o.stylesheets.length){h+='<div id="colorpicker_template" data-type="template" class="tab-pane"></div>';}
h+='</div>';h+='</div>';return h;},_createTabs:function(){var self=this;if($.isFunction($.fn.tab)){$('#colorpicker_tabs a').on('show',function(e){var id=$(e.target).attr('href'),type=$(id).data('type');self['_create'+type].call(self,$(id));$('#colorpicker_insert').toggle(type=='picker');}).click(function(e){e.preventDefault();$(this).tab('show');});}else{$('#colorpicker_tabs','#colorpicker').tabs({activate:function(event,ui){var type=$(ui.newPanel).data('type');self['_create'+type].call(self,$(ui.newPanel));$('#colorpicker_insert').toggle(type=='picker');},beforeActivate:function(event,ui){$(ui.oldTab).removeClass('active');$(ui.newTab).addClass('active');}});}
self._createpicker($('#colorpicker_picker','#colorpicker_tabs'));},_blur:function(e){var t=this;if(e){if(e.target==this.picker||e.target==this.picker.colorpicker){return false;}
var matched=false;$(this.picker.colorpicker).find('*').each(function(){if(this==e.target){matched=true;return false;}});if(!matched){t.close();}}},_close:function(){this._trigger('close',null);$(this.widget).tips('close');},_insert:function(){var color=$('#colorpicker_color').val();this._trigger('insert',null,color);if(color){$(this.element).val(color).removeClass('placeholder').change();$(this.widget).css('background-color',color);}
this._close();},_rgbToHex:function(c){var r,g,b,re=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");if(!c){return c;}
var rgb=c.replace(re,"$1,$2,$3").split(',');if(rgb.length==3){r=parseInt(rgb[0]).toString(16);g=parseInt(rgb[1]).toString(16);b=parseInt(rgb[2]).toString(16);r=r.length==1?'0'+r:r;g=g.length==1?'0'+g:g;b=b.length==1?'0'+b:b;return"#"+r+g+b;}
return c;},_hexToRGB:function(c){var r,g,b;if(c.indexOf('#')!=-1){c=c.replace(new RegExp('[^0-9A-F]','gi'),'');r=parseInt(c.substring(0,2),16);g=parseInt(c.substring(2,4),16);b=parseInt(c.substring(4,6),16);return{r:r,g:g,b:b};}
return null;},_createpicker:function(parent){var self=this;if($(parent).hasClass('colorpicker_generated')){return;}
self._wheel=$.farbtastic(parent,$('#colorpicker_color').val(),function(color){self._showColor(color);});$(parent).addClass('colorwheel colorpicker_generated');},_createweb:function(parent){var self=this,h='';if($(parent).hasClass('colorpicker_generated')){return;}
h+='<div role="listbox" aria-labelledby="colorpicker_web" tabindex="0">';h+='<ul>';$.each(this._colors,function(i,v){h+='<li style="background-color:'+v+'"><span class="colorpicker_webblock" role="option" aria-labelledby="web_colors_'+i+'" title="'+v+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" id="web_colors_'+i+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){}});h+='</ul></div>';$(parent).append(h).append('<br style="clear:both;" />').addClass('colorpicker_generated');$('span.colorpicker_webblock',parent).click(function(){self._insert();}).mouseover(function(){self._showColor($(this).attr('title'));});this._paintCanvas(parent);},_createnamed:function(parent){var self=this,h='',i=0;if($(parent).hasClass('colorpicker_generated')){return;}
h+='<div role="listbox" aria-labelledby="colorpicker_named" tabindex="0">';h+='<ul>';$.each(this._named,function(k,v){h+='<li style="background-color:'+k+'"><span class="colorpicker_namedblock" aria-labelledby="named_colors_'+k+'" title="'+self._translate(k.replace(/[^\w]/g,''),v)+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" id="named_colors_'+k+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){}
i++;});h+='</ul></div>';$(parent).append(h).append('<br style="clear:both;" />').addClass('colorpicker_generated').append('<div id="colorpicker_colorname">'+this.options.labels.name+'</div>');$('span.colorpicker_namedblock',parent).click(function(){self._insert();}).mouseover(function(){self._showColor($(this).parent('li').css('background-color'),$(this).attr('title'));});this._paintCanvas(parent);},_createtemplate:function(parent){var self=this,h='';if($(parent).hasClass('colorpicker_generated')){return;}
if(this.template_colors){var templateColors=this.template_colors;if($.type(this.template_colors)=='string'){templateColors=templateColors.split(',');}
h+='<div role="listbox" aria-labelledby="colorpicker_template_label" tabindex="0">';h+='<ul>';$.each(templateColors,function(i,v){if(v.length==4){v=v+v.substr(1);}
h+='<li style="background-color:'+v+'"><span class="colorpicker_templateblock" aria-labelledby="template_colors_'+i+'" title="'+v+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" id="template_colors_'+i+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){}});h+='</ul></div>';$(parent).append(h);}
if(this.options.custom_colors){var h='';$(parent).append('<p id="colorpicker_custom_label">'+this.options.labels.custom+'</p>');var customColors=this.options.custom_colors.split(',');h+='<div role="listbox" aria-labelledby="colorpicker_custom_label" tabindex="0">';h+='<ul>';$.each(customColors,function(i,v){if(v.length==4){v=v+v.replace('#','');}
h+='<li style="background-color:'+v+'"><span class="colorpicker_templateblock" aria-labelledby="custom_colors_'+i+'" title="'+v+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" style="display:none;" id="custom_colors_'+i+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){h+='</ul><ul>';}});h+='</div>';$(parent).append(h);this._paintCanvas(parent);}
$(parent).addClass('colorpicker_generated');$('span.colorpicker_templateblock',parent).click(function(){self._insert();}).mouseover(function(){self._showColor($(this).attr('title'));});},_showColor:function(color,name){if(name){$("#colorpicker_colorname").html(this.options.labels.name+': '+name);}
if(/rgb/.test(color)){color=this._rgbToHex(color);}
$("#colorpicker_preview_color").css('background-color',color);$("#colorpicker_color").val(color.toLowerCase());},_changeFinalColor:function(color){if(!/#/.test(color)){color=this._rgbToHex(color);}
$('#colorpicker_preview').css('background-color',color);$('#colorpicker_color').val(color);},_paintCanvas:function(el){$('canvas.mceColorSwatch',el).each(function(){$canvas=$(this).get(0);if($canvas.getContext&&(context=$canvas.getContext("2d"))){context.fillStyle=$canvas.getAttribute('data-color');context.fillRect(0,0,10,10);}});},_sort_colors:function(colors){var sorted=[],s=[];$.each(colors,function(x,color){color=color.replace('#','').toLowerCase();if(color.length==6){var condensed='';$.each(color.split(''),function(i,c){if(i%2==0){condensed+=c;}});var color_str=condensed;}
var v=0;$.each(color_str.split(''),function(i,c){v+=parseInt(c,16);});if(color){sorted[v+x]='#'+color;}});$.each(sorted,function(i,c){if(c){s.push(c);}});return s;},_getStylesheetColors:function(){var self=this,o=this.options,colors=[],href,hex,rgb;var hexRe=/#[0-9a-f]{3,6}/gi,rgbRe=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");function addColor(s){if($.inArray(s,colors)==-1){colors.push(s);}}
function parseCSS(s){if(s.imports){$.each(s.imports,function(i,r){parseCSS(r);});}
$.each(s.cssRules||s.rules,function(i,r){switch(r.type||1){case 1:var css=r.cssText||r.style.cssText;if(css){hex=css.match(hexRe);rgb=css.match(rgbRe);if(rgb){addColor(self._rgbToHex(rgb[0]));}
if(hex){addColor(hex[0]);}}
break;case 3:if(r.href.indexOf('://')!=-1){return;}
parseCSS(r.styleSheet);break;}});};function processStyleSheets(stylesheets){try{$.each(stylesheets,function(i,s){parseCSS(s);});}catch(ex){}
return colors;}
if($.type(o.stylesheets[0])=='string'){var doc,el,ifr;if(document.getElementById('stylsheets_iframe')){return;}
var h='<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge">';$.each(o.stylesheets,function(i,s){h+='<link href="'+s+'" rel="stylesheet" type="text/css" />';});h+='</head><body></body></html>';ifr=document.createElement('iframe');$(ifr).attr({'src':'javascript:""','id':'stylsheets_iframe'}).hide().appendTo('body').load(function(e){el=e.target,doc=el.contentWindow.document;if(doc&&doc.styleSheets){self.template_colors=processStyleSheets(doc.styleSheets);}
$(ifr).remove();});doc=ifr.contentWindow.document;if(doc){doc.open();doc.write(h);doc.close();}}else{this.template_colors=processStyleSheets(o.stylesheets);}},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.colorpicker,{version:"2.5.31"});})(jQuery);(function($){$.fn.farbtastic=function(callback){$.farbtastic(this,callback);return this;};$.farbtastic=function(container,color,callback){var container=$(container).get(0);return container.farbtastic||(container.farbtastic=new $._farbtastic(container,color,callback));};$._farbtastic=function(container,color,callback){var fb=this;$(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');var e=$('.farbtastic',container);fb.wheel=$('.wheel',container).get(0);fb.radius=84;fb.square=100;fb.width=194;if(navigator.appVersion.match(/MSIE [0-6]\./)){$('*',e).each(function(){if(this.currentStyle.backgroundImage!='none'){var image=this.currentStyle.backgroundImage;image=this.currentStyle.backgroundImage.substring(5,image.length-2);$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"});}});}
fb.linkTo=function(callback){if(typeof fb.callback=='object'){$(fb.callback).unbind('keyup',fb.updateValue);}
fb.color=null;if(typeof callback=='function'){fb.callback=callback;}
else if(typeof callback=='object'||typeof callback=='string'){fb.callback=$(callback);fb.callback.bind('keyup',fb.updateValue);if(fb.callback.get(0).value){fb.setColor(fb.callback.get(0).value);}}
return this;}
fb.updateValue=function(event){if(this.value&&this.value!=fb.color){fb.setColor(this.value);}}
fb.setColor=function(color){var unpack=fb.unpack(color);if(fb.color!=color&&unpack){fb.color=color;fb.rgb=unpack;fb.hsl=fb.RGBToHSL(fb.rgb);fb.updateDisplay();}
return this;}
fb.setHSL=function(hsl){fb.hsl=hsl;fb.rgb=fb.HSLToRGB(hsl);fb.color=fb.pack(fb.rgb);fb.updateDisplay();return this;}
fb.widgetCoords=function(event){var x,y;var el=event.target||event.srcElement;var reference=fb.wheel;if(typeof event.offsetX!='undefined'){var pos={x:event.offsetX,y:event.offsetY};var e=el;while(e){e.mouseX=pos.x;e.mouseY=pos.y;pos.x+=e.offsetLeft;pos.y+=e.offsetTop;e=e.offsetParent;}
var e=reference;var offset={x:0,y:0}
while(e){if(typeof e.mouseX!='undefined'){x=e.mouseX-offset.x;y=e.mouseY-offset.y;break;}
offset.x+=e.offsetLeft;offset.y+=e.offsetTop;e=e.offsetParent;}
e=el;while(e){e.mouseX=undefined;e.mouseY=undefined;e=e.offsetParent;}}
else{var pos=fb.absolutePosition(reference);x=(event.pageX||0*(event.clientX+$('html').get(0).scrollLeft))-pos.x;y=(event.pageY||0*(event.clientY+$('html').get(0).scrollTop))-pos.y;}
return{x:x-fb.width/2,y:y-fb.width/2};}
fb.mousedown=function(event){var pos=fb.widgetCoords(event);fb.circleDrag=Math.max(Math.abs(pos.x),Math.abs(pos.y))*2>fb.square;fb.mousemove(event);return false;}
fb.touchconvert=function(e){var e=e.originalEvent.touches.item(0);return e;}
fb.touchmove=function(e){fb.mousemove(fb.touchconvert(e));event.preventDefault();return false;}
fb.touchend=function(event){$(document).unbind('touchmove',fb.touchmove);$(document).unbind('touchend',fb.touchend);document.dragging=false;event.preventDefault();return false;}
fb.mousemove=function(event){var pos=fb.widgetCoords(event);if(fb.circleDrag){var hue=Math.atan2(pos.x,-pos.y)/6.28;if(hue<0)
hue+=1;fb.setHSL([hue,fb.hsl[1],fb.hsl[2]]);}
else{var sat=Math.max(0,Math.min(1,-(pos.x/fb.square)+.5));var lum=Math.max(0,Math.min(1,-(pos.y/fb.square)+.5));fb.setHSL([fb.hsl[0],sat,lum]);}
return false;}
fb.mouseup=function(){$(document).unbind('mousemove',fb.mousemove);$(document).unbind('mouseup',fb.mouseup);document.dragging=false;}
fb.updateDisplay=function(){var angle=fb.hsl[0]*6.28;$('.h-marker',e).css({left:Math.round(Math.sin(angle)*fb.radius+fb.width/2)+'px',top:Math.round(-Math.cos(angle)*fb.radius+fb.width/2)+'px'});$('.sl-marker',e).css({left:Math.round(fb.square*(.5-fb.hsl[1])+fb.width/2)+'px',top:Math.round(fb.square*(.5-fb.hsl[2])+fb.width/2)+'px'});$('.color',e).css('backgroundColor',fb.pack(fb.HSLToRGB([fb.hsl[0],1,0.5])));if(typeof fb.callback=='object'){$(fb.callback).css({backgroundColor:fb.color,color:fb.hsl[2]>0.5?'#000':'#fff'});$(fb.callback).each(function(){if(this.value&&this.value!=fb.color){this.value=fb.color;}});}
else if(typeof fb.callback=='function'){fb.callback.call(fb,fb.color);}}
fb.absolutePosition=function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=fb.absolutePosition(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
return r;};fb.pack=function(rgb){var r=Math.round(rgb[0]*255);var g=Math.round(rgb[1]*255);var b=Math.round(rgb[2]*255);return'#'+(r<16?'0':'')+r.toString(16)+
(g<16?'0':'')+g.toString(16)+
(b<16?'0':'')+b.toString(16);}
fb.unpack=function(color){if(color.length==7){return[parseInt('0x'+color.substring(1,3))/255,parseInt('0x'+color.substring(3,5))/255,parseInt('0x'+color.substring(5,7))/255];}
else if(color.length==4){return[parseInt('0x'+color.substring(1,2))/15,parseInt('0x'+color.substring(2,3))/15,parseInt('0x'+color.substring(3,4))/15];}}
fb.HSLToRGB=function(hsl){var m1,m2,r,g,b;var h=hsl[0],s=hsl[1],l=hsl[2];m2=(l<=0.5)?l*(s+1):l+s-l*s;m1=l*2-m2;return[this.hueToRGB(m1,m2,h+0.33333),this.hueToRGB(m1,m2,h),this.hueToRGB(m1,m2,h-0.33333)];}
fb.hueToRGB=function(m1,m2,h){h=(h<0)?h+1:((h>1)?h-1:h);if(h*6<1)
return m1+(m2-m1)*h*6;if(h*2<1)
return m2;if(h*3<2)
return m1+(m2-m1)*(0.66666-h)*6;return m1;}
fb.RGBToHSL=function(rgb){var min,max,delta,h,s,l;var r=rgb[0],g=rgb[1],b=rgb[2];min=Math.min(r,Math.min(g,b));max=Math.max(r,Math.max(g,b));delta=max-min;l=(min+max)/2;s=0;if(l>0&&l<1){s=delta/(l<0.5?(2*l):(2-2*l));}
h=0;if(delta>0){if(max==r&&max!=g)
h+=(g-b)/delta;if(max==g&&max!=b)
h+=(2+(b-r)/delta);if(max==b&&max!=r)
h+=(4+(r-g)/delta);h/=6;}
return[h,s,l];}
$('*',e).mousedown(function(e){if(!document.dragging){$(document).bind('mousemove',fb.mousemove).bind('mouseup',fb.mouseup);document.dragging=true;}
fb.mousedown(e);});$('*',e).bind("touchstart",function(e){if(!document.dragging){$(document).bind('touchmove',fb.touchmove).bind('touchend',fb.touchend);document.dragging=true;}
fb.mousedown(fb.touchconvert(e));e.preventDefault();return false;});fb.setColor('#000000');if(callback){fb.linkTo(callback);}};})(jQuery);(function($){var $tmp=document.createElement('div');$.support.borderRadius=(function(){return typeof $tmp.style['borderRadius']!=='undefined';})();if(typeof Joomla==='undefined'){Joomla={};}
Joomla.modal=function(el,url,width,height){var o={'handler':'iframe','size':{x:width,y:height},'url':url,onOpen:function(){$('#sbox-window').css({'width':'auto','height':'auto'});}};return SqueezeBox.fromElement(el,o);};$.fn.checkbox=function(){if($.support.borderRadius){if($(this).hasClass('ui-checkbox-element')){return;}
var n=this,css={};$.each(['marginTop','marginRight','marginBottom','marginLeft'],function(i,k){css[k]=$(n).css(k);});$(this).addClass('ui-checkbox-element').wrap('<span class="ui-checkbox" />').click(function(){$(this).parent().not('.disabled').toggleClass('checked',this.checked);}).on('check',function(){$(this).parent().toggleClass('checked',this.checked);}).on('disable',function(){$(this).parent().toggleClass('disabled',this.disabled);}).each(function(){$(this).parent().toggleClass('checked',this.checked).toggleClass('disabled',this.disabled).css(css);});}
return this;};$.fn.radio=function(){if($.support.borderRadius){if($(this).hasClass('ui-radio-element')){return;}
var n=this,css={};$.each(['marginTop','marginRight','marginBottom','marginLeft'],function(i,k){css[k]=$(n).css(k);});$(this).addClass('ui-radio-element').wrap('<span class="ui-radio" />').click(function(){$(this).parent().not('.disabled').toggleClass('checked',this.checked);$('input[type="radio"][name="'+$(this).attr('name')+'"]').not(this).parent().toggleClass('checked',!this.checked);}).on('check',function(){$(this).parent().toggleClass('checked',this.checked);}).on('disable',function(){$(this).parent().toggleClass('disabled',this.disabled);}).each(function(){$(this).parent().toggleClass('checked',this.checked).toggleClass('disabled',this.disabled).css(css);});}
return this;};$.jce={options:{},init:function(){var self=this;$('body').addClass('ui-jce');if(!$.support.cssFloat){$('#jce').addClass('ie');if(document.querySelector){if(!$.support.leadingWhitespace){$('#jce').addClass('ie8');}else{$('#jce').addClass('ie9');}}}
$('input[size="100"]').addClass('input-xlarge');$('input[size="50"]').addClass('input-large');$('input[size="5"]').addClass('input-mini');$('body').addClass('ui-jquery');$('#tabs').tabs({beforeActivate:function(event,ui){$(ui.oldTab).removeClass('active');$(ui.newTab).addClass('active');}});$('a.dialog').click(function(e){self.createDialog(e,{src:$(this).attr('href'),options:$(this).data('options')});e.preventDefault();});$('.wf-tooltip, .hasTip').tips({parent:'#jce'});$('th input[type="checkbox"]',$('#profiles-list, #users-list')).click(function(){var n=$('td input[type="checkbox"]',$('#profiles-list, #users-list')).prop('checked',this.checked).trigger('check');$('input[name="boxchecked"]').val($(n).filter(':checked').length);});$('td input[type="checkbox"]',$('#profiles-list, #users-list')).click(function(){var bc=$('input[name="boxchecked"]').val();var n=$('td input[type="checkbox"]',$('#profiles-list, #users-list')).length;$('th input[type="checkbox"]',$('#profiles-list, #users-list')).prop('checked',bc==n).trigger('check');});this._formWidgets();$('label.radio').addClass('inline');$('#profiles-list tbody').sortable({handle:'span.sortable-handle',helper:function(e,tr){var $cells=tr.children();var $helper=tr.clone();$helper.children().each(function(i){$(this).width($cells.eq(i).width());});return $helper;},placeholder:"sortable-highlight",stop:function(e,ui){var n=this;$('input[name="task"]').val('saveorder');var cid=$('input[name^="cid"]',n).prop('checked',true).serialize();$('input[name^="cid"]',n).prop('checked',false);$('#profiles-list tbody').sortable('disable');$(ui.item).addClass('busy');function end(){$('#profiles-list tbody').sortable('enable');$(ui.item).removeClass('busy');}
var order=[];$('tr',n).each(function(i){order.push('order[]='+i);});$.ajax({type:'POST',url:'index.php',data:$('input[name]','#adminForm').not('input[name^="order"]').serialize()+'&'+cid+'&'+order.join('&')+'&tmpl=component',success:function(){end();$('tr',n).each(function(i){$('input[name^="order"]',this).val(i+1);$('input[id^="cb"]',this).attr('id','cb'+i);});},error:function(){end();}});}});$('span.order-up a','#profiles-list').click(function(e){$('input[name^=cid]',$(this).parents('tr')).prop('checked',true);$('input[name="task"]').val('orderup');$('#adminForm').submit();e.preventDefault();});$('span.order-down a','#profiles-list').click(function(e){$('input[name^=cid]',$(this).parents('tr')).prop('checked',true);$('input[name="task"]').val('orderdown');$('#adminForm').submit();e.preventDefault();});$('[data-parameter-nested-item]').on('hide',function(){$(this).hide().find(':input').prop('disabled',true);}).on('show',function(){$(this).show().find(':input').prop('disabled',false);}).trigger('hide');$(':input.parameter-nested-parent').change(function(){$(this).siblings('[data-parameter-nested-item]').trigger('hide').filter('[data-parameter-nested-item="'+this.value+'"]').trigger('show');}).change();$(document).ready(function(){self._setDependants();});$(document).ready(function(){$('input[type="checkbox"]').checkbox();$('input[type="radio"]').radio();});$(document).ready(function(){$('#jce').removeClass('loading');});},createDialog:function(el,o){var self=this,data={};if($.type(o.options)=='string'){data=$.parseJSON(o.options.replace(/'/g,'"'));}else{data=o.options;}
data=data||{width:640,height:480};return Joomla.modal(el,o.src,data.width,data.height);},closeDialog:function(el){var win=window.parent;if(typeof win.SqueezeBox!=='undefined'){return win.SqueezeBox.close();}},_passwordWidget:function(el){var span=document.createElement('span');$(span).addClass('widget-password locked').insertAfter(el).click(function(){el=$(this).siblings('input[type="password"]');if($(this).hasClass('locked')){var input=document.createElement('input');$(el).hide();$(input).attr({type:'text',size:$(el).attr('size'),value:$(el).val(),'class':$(el).attr('class')}).insertAfter(el).change(function(){$(el).val(this.value).change();});}else{var n=$(this).siblings('input[type="text"]');var v=$(n).val();$(n).remove();$(el).val(v).show();}
$(this).toggleClass('locked');});},_formWidgets:function(){var self=this;$('input[type="password"]').each(function(){self._passwordWidget(this);});$('input[placeholder]:not(:file), textarea[placeholder]').placeholder();$(':input[pattern]').pattern();$(':input[max]').max();$(':input[min]').min();},_setDependants:function(){$('[data-parent]').each(function(){var el=this,data=$(this).data('parent')||'';var p=$(this).parents('li:first');$(p).hide();$.each(data.split(';'),function(i,s){s=/([\w\.]+)\[([\w,]+)\]/.exec(s);if(s&&s.length>2){var k=s[1],v=s[2].split(',');k=k.replace(/[^\w]+/g,'');var event='change.'+k;$('#params'+k).on(event,function(){var ev=$(this).val();if($.type(ev)!=="array"){ev=$.makeArray(ev);}
var state=$(ev).filter(v).length>0;if(state){$(el).removeClass('child-of-'+k);if(el.className.indexOf('child-of-')===-1){$(p).show();}}else{$(p).hide();$(el).addClass('child-of-'+k);}
$(el).trigger('visibility:toggle',state);}).on('visibility:toggle',function(e,state){if(state){$(el).parent().show();}else{$(el).parent().hide();}}).trigger(event);}});});}};$(document).ready(function(){$.jce.init();});})(jQuery);var $jce=jQuery.jce;