// Util plugin
 jQuery.util = {
 	isClass: function(value){
 		if (value == undefined || value.length == 0) return false;
 		return value.substring(0,1) == ".";
 	},
 	isId: function (value){
 		if (value == undefined || value.length == 0) return false;
   		return value.substring(0,1) == "#";	
 	},
 	isPlainElement: function(value){
 	   if (value == undefined || value.length == 0) return true;
 	   return false;
 	},
 	parseDot: function(value)
 	{
 		return $.util.removeFirstLetter(value);
 	},
 	removeFirstLetter: function(value)
 	{
 			//alert(value);
 		if (value == undefined || value.length == 0) return "";
	 	return value.substring(1,value.length);	
 	},
 	buildElement: function(id, eltype)
 	{
  		if ($.util.isPlainElement(id))
  		{
  			return $.util.buildPlainElement(eltype);	
  		}
  		else if ($.util.isClass(id))
  		{
  			
  			return $.util.buildClassElement(id, eltype);
  		}
  		else if ($.util.isId(id))
  		{
  			 
  			return $.util.buildIdElement(id,eltype);
  		}
  		else
  		{
  			return $.util.buildPlainElement(id);
  		}
  	   	
  	},
 	buildPlainElement: function(eltype)
 	{
 	  return "<" + eltype + "></" + eltype + ">"; 	
 	},
 	buildIdElement: function(id, eltype)
 	{
 		return "<" + eltype + " id=\"" + $.util.parseDot(id) + "\"></" + eltype + ">"; 	
 	},
 	buildClassElement: function(id, eltype)
 	{
 		return "<" + eltype + " class=\"" + $.util.parseDot(id) + "\"></" + eltype + ">"; 	
 	},
 	isSet: function(value)
 	{
 		return (value != undefined ||  value != "" || value != null) ? true : false;
 	}
 };
 
