



/*overstate*/
$(document).ready(function () {


    $("a.tooltip").click(function () {
        $("#tooltip").remove();
    })

    xOffset = 120;
    yOffset = 10;

    $("a.tooltip").hover(function (e) {
        $("#tooltip").remove();
        var title = jQuery(this).attr("title");
        $("body").append("<p id='tooltip'>" + title + "</p>");
        $("#tooltip")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px")
			.fadeIn("fast");
    },
	function () {
	    $("#tooltip").remove();
	});


    $("a.tooltip").mousemove(function (e) {
        $("#tooltip")
			.css("top", (e.pageY - xOffset) + "px")
			.css("left", (e.pageX + yOffset) + "px");
    });




    $(".menuoverstate").each(function (i) {

        preload_image = new Image();
        preload_image.src = this.src.replace(".png", "_o.png");

        $(this).hover(
            function () {
                if (this.src.indexOf("_o.png") == -1) {
                    this.src = this.src.replace(".png", "_o.png");
                }

            },

            function () {
                this.src = this.src.replace("_o.png", ".png");

            });

    });

    jQuery(".profile:nth-child(4n+4)").css("margin-right", "0");


 

});

