$.fn.confirmBox = function(question, divId) {
    if (divId == null) divId = "confirmBox-div";

    return this.each(function() {
        var href = $(this).attr('href');
        
        $('#confirmBox-question').html(question);
        
        $(this).click(function() {
            $('#'+divId+' .simplemodal-yes').click(function(){ 
                location.href = href; 
            }).focus();
                        
            $('#'+divId).modal({
                position: ["30%"],
                opacity: 50,
              	overlayCss: {backgroundColor:"#000"}
            });
            
            return false;
        }); 
    });        
};

$.fn.infoBox = function(question, divId) {
    if (divId == null) divId = "infoBox-div";

    return this.each(function() {
    	
        $('#infoBox-question').html(question);
        
        $(this).click(function() {
        	
            $('#'+divId).modal({
                position: ["30%"],
                opacity: 50,
              	overlayCss: {backgroundColor:"#000"}
            });
            
            $('#'+divId+' input[type=button]').focus();
        }); 
    });        
};

function showInfoBox(question, divId) {
	if (divId == null) divId = "infoBox-div";
	
	$('#infoBox-question').html(question);
	
	$('#'+divId).modal({
        position: ["30%"],
        opacity: 50,
      	overlayCss: {backgroundColor:"#000"}
    });	
	
	$('#'+divId+' input[type=button]').focus();
}
