/* ------------------- بسم الله الرحمن الرحيم ----------------------- */
var seamler = {
  Version: '0.3.2b',
  Apps: ['Application','utilities'],
  attach: function(libraryName) {
    document.write('<script type="text/javascript" src="'+libraryName+'?v='+this.Version+'"></script>');
  },
  load: function() {
  	var _this = this;
  	this.Apps.each(function(a){
  	var path = 'JS/';
  	_this.attach(path+a+'.js');
  	});
	Event.observe(window, 'load', function() {
			App.genLoading.show();
			Event.observe('logo', 'click', function(){window.location.reload();});
			var AjaxGet = new Ajax.Updater(
				{success: 'contentMods'},
				'php_backend.php',{
					method: 'post',
					parameters: 'randomize=' + Math.random(),
					evalScripts: true,
					onComplete: function(){
//						$('debugArea').style.display = '';
					},
					onFailure: function(request){
						$('contentMods').innerHTML = 'Failed to initilize... ' + request.status +' please refresh!';
						App.genLoading.hide();
					}
				}
			);
			App.initilize();
		}
	);
  }
}

seamler.load();