jQuery.fn.button=function(opt){
		if(opt==null)opt={};	

		
		this.each(function(){
			if($(this).data('init')==1)return;
			$(this).data('init',1);
			
		  	$(this).addClass('ui-state-default ui-corner-all').css('cursor','pointer');
		  	if(!$(this).hasClass("button"))$(this).addClass("button");
			
			if($(this).attr('icon')!=null){
				var icon = $(this).attr('icon');
			}else if(opt.icon==null){
				var icon = opt.icon;
			}
			
			//options
			if(icon!=null){
				var middle=$(this).height()/2;
				$(this).prepend($('<div class="ui-icon '+icon+'"></div>').css('top', (middle -9)+'px' ) );
			}
			//events
			$(this).hover(
				function(){ 
						$(this).addClass('ui-state-hover');
				},
				function(){ 
						$(this).removeClass('ui-state-hover');
				}
			);
		
		});
};

jQuery.fn.icon=function(type,opt){
			
		create=function(jquery){
				//style
				jquery.css({
					cursor:'pointer',
					border:'none',
					background:'none'
				});		
				jquery.addClass("hand");
				jquery.append('<span class="ui-icon '+type+'"></span>');		

				//options
				if(opt!=null){
					
				}
		}
		
				
		this.each(function(){
				create($(this));
			  //events
				$(this).hover(
					function(){ 
							$(this).addClass('ui-state-active');
					},
					function(){ 
							$(this).removeClass('ui-state-active');
					}
				)
		
		});

};



