// do all hover images
$(function () {
    $('#content #head img').each(function () {
        var src = $(this).attr('src');
        var hover_src = $(this).attr('hover_src');
        $(this).removeAttr('hover_src');

        // preload image
        $("<img>").attr('src', hover_src);

        // set hover event
        $(this).hover(
            function () {
                $(this).attr('src', hover_src);
            },
            function () {
                $(this).attr('src', src);
            }
        );
    });
});

$(function () {
    setTimeout(function() {
	    $('.box').each(function () {
		var parent = $(this).parent().get(0);

		$(this).width($(parent).innerWidth() * 0.9);
		$(this).height($(parent).innerHeight() * 0.9);
	    });
    }, 250);
});
