
// JavaScript Document
function showHigh() {
	var win = window.open("highlander.php","_self");
	win.focus();
}

function show_comic(author, title) {
	window.open("show_comic.php?author=" + author + "&title=" + title, "_self");
}



function showVentDetails() {
	$(document).ready(function() {
		var url = "/minty/vent_details.php";
		$(".ventfeed").load(url, function() {
			var vent = $(this);
			vent.show();
			
			$(".ventfeed").position({ my: "center", at: "center", of: window });
			
			vent.expose({
				onBeforeClose: function() {
					vent.hide('slow');
				}
			});
			
		});
		var refreshId = setInterval(function() {
			$(".ventfeed").load(url);
		}, 9000);
		$.ajaxSetup({ cache: false });			
	});
}

jQuery.fn.aPosition = function() {
    thisLeft = this.offset().left;
    thisTop = this.offset().top;
    thisParent = this.parent();

    parentLeft = thisParent.offset().left;
    parentTop = thisParent.offset().top;

    return {
        left: thisLeft-parentLeft,
        top: thisTop-parentTop
    };
};
