if(jQuery) {
 	function bloquearWin() {
		this.bloq = 0;
	};
	
	bloquearWin.prototype.bloquear = function(msg){
		if (this.bloq <= 0) {
			$.blockUI({ message:msg, css : {border:'1px solid #cccccc', backgroundColor:'#ffffff', opacity: '1', cursor: 'wait', width:'10%', left:'45%'}, overlayCSS:{backgroundColor:'#efefef', opacity:'0.7'} });
		}
		this.bloq++;
	};
	
	bloquearWin.prototype.desbloquear = function() {
		this.bloq--;
		if (this.bloq >= 0) $.unblockUI();
	};
	
	bloquearWin.prototype.openPopup = function(content) {
		if (this.bloq <= 0) {
			$.blockUI({ message:content, css : {border:'none', backgroundColor:'#ffffff', opacity: '1', cursor:'default', width:'30%'}, overlayCSS:{backgroundColor:'#cccccc', opacity:'0.8', cursor:'default'} });
		}
		this.bloq++;
	};
	
	bloquearWin.prototype.showMessage = function(content) {
		if (this.bloq <= 0) {
			$.blockUI({ message:content, css : {border:'1px solid #990000', backgroundColor:'#ffffff', opacity: '1', cursor:'default', width:'35%', top:'35%'}, overlayCSS:{backgroundColor:'#efefef', opacity:'0.8', cursor:'default'} });
		}
		this.bloq++;
	};
}
