if($) {
	
	/****************************************************************************************
	 * 							UHS Settings												*
	 ****************************************************************************************/
	
	var base_url = 'http://localhost/EclipseWorkSpace/uassmartseller/index.php';
	//var base_url = 'https://uniquehomesites.com/uas/cp/index.php';
	var server_root = '/EclipseWorkSpace/uassmartseller/';
	//var server_root = '/uas/cp/';
	
	
	/****************************************************************************************
	 * 							ServerConfig Class											*
	 ****************************************************************************************/
	
	function ServerConfig(url) {
		var server_url = url;
		
		this.url = function(controller, view, params) {
			controller = this.get_if_defined(controller);
			view = this.get_if_defined(view);
			params = this.get_if_defined(params);
			return server_url + controller + view + params;
		};
	}
	
	ServerConfig.prototype.get_if_defined = function(variable) {
		return (variable) ? this.dir(variable) : '';
	};
	
	ServerConfig.prototype.dir = function(name) {
		return '/'+name;
	};
	
	
	/****************************************************************************************
	 * 							ControllerConfig Class										*
	 ****************************************************************************************/
	
	function ControllerConfig(server_config, controller) {
		
		if(!(server_config instanceof ServerConfig))
			throw "ControllerConfig Error: server_config contructor parameter must be of class ServerConfig";
		
		var server_config = server_config;
		var controller = controller;
		
		this.url = function(view, params) {
			return server_config.url(controller,view, params);
		}
		
		this.post = function(view, data, callback, type) {
			$.post(this.url(view), data, callback, type);
		}
	
	}
	
	

	/****************************************************************************************
	 * 							jQuery Variable Setup										*
	 ****************************************************************************************/
	
	var server = new ServerConfig(base_url);
	base_url = null;
	
	$.uhs = {
			server: server,
			root: server_root,
			server_root: function(path) {
				return this.root+path;
			},
			sitebuilder: new ControllerConfig(server, 'sitebuilder_ajax'),
			sitebuilderwizard: new ControllerConfig(server, 'sitebuilderwizard'),
			
			ajaxObj: function(conditions, values) {
				return {
					conditions : $.toJSON(conditions),
					values : $.toJSON(values)
				};
			},
			
			create_slug : function($value) {
				$value = unescape($value);
				$value = $value.trim().entity_decode().toLowerCase().replace(/[^a-z0-9 ]/g,'');
				return $value.replace(/[ ]/g,'_').replace(/[_]{2,}/g,'_');
			},
			
			date : {
				mysql: function(date) {
					date = (date) ? date : new Date();
					return date.getFullYear()+'-'+this.full_form(1+date.getMonth())+'-'+
							this.full_form(date.getDate())+' '+this.full_form(date.getHours())+
							':'+this.full_form(date.getMinutes())+":"+this.full_form(date.getSeconds());
				},
				full_form: function(date) {
					return (date.toString().length < 2) ? "0"+date : date;
				}
			}
	};
	
	server = null;
	server_root = null;
	
	
	
	
	/****************************************************************************************
	 * 							jQuery Function Plugin										*
	 ****************************************************************************************/
	
	$.fn.extend({
		live_hover : function(on, out) {
			$(this).live('mouseover', on);
			$(this).live('mouseout', out);
		}
	});
	
}