$(document).ready(function () {
if ($.cookie('floss') != '1'){ 
		// example of calling the confirm function
		// you must use a callback function to perform the "no" action
		confirm("", function () {
			window.location.href = 'home.html/';
		});
	$.cookie('floss', '1', { expires: 1 });
	}
});


function confirm(message, callback) {
	$('#confirm').modal({
		close:false,
		position: ["20%",],
		overlayId:'confirmModalOverlay',
		containerId:'confirmModalContainer', 
		onShow: function (dialog) {
			dialog.data.find('.message').append(message);

			// if the user clicks "no"
			dialog.data.find('.no').click(function () {
				$.cookie('floss', 'null');
				// call the callback
				if ($.isFunction(callback)) {
					callback.apply();
				}
				// close the dialog
				$.modal.close();
			});
		}
	});
}