$(document).on('click', '.dialog-box', function(){
	$button = $(this);
    $modal = $('#dialog-box-modal');
    if(!$modal.length)
    {
    	$modal = $('<div class="modal fade" id="dialog-box-modal" tabindex="-1" role="dialog"  aria-hidden="true">'
	        +'<div class="modal-dialog">'
	            +'<div class="modal-content">'
	            +'</div>'
	        +'</div>'
	    +'</div>');
	    $('body').append($modal);
    }
    $('body').append($modal);

    if($button.attr('href') || $button.attr('data-href'))
    {
    	var url = $button.attr('href') ? $button.attr('href') : $button.attr('data-href');
    	$.get(url, {}, function(data){
    		$('.modal-content', $modal).html(data);
    		$modal.modal('show');
    	});
    }
    return false;
});
