$.fn.center = function(valor, marginTop){
	
	var margin = (marginTop==undefined) ? 0 : marginTop;
	
	
	if(valor == 'v' || valor == 'vh' || valor == 'hv'){
		var totalW 		= $(window).width();
		var width 		= $(this).width();
		var telaW		= (totalW/2) - (width/2);
		
		$(this).css('position', 'absolute').css('left', telaW + 'px');
	}
	if(valor == 'h' || valor == 'vh' || valor == 'hv'){
	
		var totalH 		= $(window).height() + margin;
		var height 		= $(this).height();
		var telaH		= (totalH/2) - (height/2);
		
		$(this).css('position', 'absolute').css('top', telaH + 'px');
	}
};
