//(function($)
//{
//	$.fn.extend(
//	{
//		tpl : function (aaa, votes, editable)
//		{
//                    // DEFINE VARIABLES /////////////////////
//                    var o = {
//                            value		:	0,
//                            votes		:	0,
//                            editable	:	false
//                    };
//
//                    if (value) o.value = value;
//                    if (votes) o.votes = votes;
//                    if (editable) o.editable = editable
//		}
//	})
//})(jQuery);
var tplClass = {
	loaded:{},
	
	loadOnce: function(tplName,tplUrl,appendTo){
		var self=this;
		if(!this.loaded.hasOwnProperty(tplName)){
			//$.trace("loading "+tplName+"  tpl");
			$.ajax({
			      url: tplUrl,
			      async : false,
			      success: function(tplContent){
			    	  $(appendTo).append(tplContent);
			    	  self.loaded[tplName]=true;
			    	  $(tplName).translate(tplName);
			      }
		      });
		}
			
	
	},
	
	load: function(tplName,tplUrl,appendTo){
		$.ajax({
		      url: tplUrl,
		      async : false,
		      success: function(tplContent){
		    	  $(appendTo).append(tplContent);
		    	  $(tplName).translate(tplName);
		      }
	      });

	}		
};
