var modalWindow = {
	parent:String = "body",
	windowId:String = null,
	content:String = null,
	width:Number,
	height:Number,
	close:function()
	{
		$(".modal-window").remove();
		$(".modal-overlay").remove();
	},
	open:function()
	{
		var modal = "";
		modal += "<div class=\"modal-overlay\"></div>";
		modal += "<div id=\"" + this.windowId + "\" class=\"modal-window\" style=\"width:" + this.width + "px; height:" + this.height + "px; margin-top:-" + (this.height / 2) + "px; margin-left:-" + (this.width / 2) + "px;\">";
		modal += this.content;
		modal += "</div>";	

		$(this.parent).append(modal);

		$(".modal-window").append("<a class=\"close-window\"></a>");
		$(".close-window").click(function(){modalWindow.close();});
		$(".modal-overlay").click(function(){modalWindow.close();});
	}
};

var openMyModal = function( id )
	{

		var win = window.open(base + 'information/print_recipe/' + id,'mywindow','width=800,menubar=1,toolbar=0,scrollbars=1');
		win.focus();
		//modalWindow.windowId = "myModal";
		//modalWindow.width = 790;
		//modalWindow.height = 405;
		//modalWindow.content = "<iframe style='background-color:#F9B006;padding:25px 5px 5px 5px;border:1px solid' width='790' height='405' frameborder='0' scrolling='auto' allowtransparency='true' src='" + source + "'>&lt/iframe>";
		//modalWindow.open();
	};
