
/*overstate*/
$(document).ready(function () {

    //slideshow
    $('#slideshow').cycle({ 
        fx:     'fade',
        timeout: 6000,
        pause:   1,
        next:   '#arrow-right', 
		random: 1
    });

	$('#slideshow').css("z-index", "1");
	$('#arrow-right').css("z-index", "10");

    $("a.tooltip").click(function () {
        $("#tooltip").remove();
    })


    $(".menuoverstate").each(function (i) {

        preload_image = new Image();
        preload_image.src = this.src.replace(".jpg", "_o.jpg");

        $(this).hover(
            function () {
                if (this.src.indexOf("_o.png") == -1) {
                    this.src = this.src.replace(".jpg", "_o.jpg");
                }

            },

            function () {
                this.src = this.src.replace("_o.jpg", ".jpg");

            });

    });
	
	$(".menuoverstate2").each(function (i) {

        preload_image = new Image();
        preload_image.src = this.src.replace(".gif", "_o.gif");

        $(this).hover(
            function () {
                if (this.src.indexOf("_o.png") == -1) {
                    this.src = this.src.replace(".gif", "_o.gif");
                }

            },

            function () {
                this.src = this.src.replace("_o.gif", ".gif");

            });

    });

    jQuery(".profile:nth-child(4n+4)").css("margin-right", "0");


 

});

