$(document).ready(function() {

    $("#frameSchoolMenuInActive").mouseover(function() {
        $('#frameSchoolMenuActive').show();
    });

    $("#frameSchoolMenuActive").mouseleave(function() {
        $('#frameSchoolMenuActive').hide();
    });

    $(".menu_schools_item").mouseover(function() {

    });

    $(".menu_schools_item").hover(
	function() {
	    $(this).css("background-image", "url(/Portals/_default/Skins/Rytmus/images/menu_schools_item_active.png)");
	},
	function() {
	    $(this).css("background-image", "url(/Portals/_default/Skins/Rytmus/images/menu_schools_item.png)");
	});

    $('.amBlogImageGallery').not(':has(img)').css("display", "none");

    $(".amBlogImageGallery").each(function() {
        $(this).children("img:not(:first)").hide();
    });
    setTimeout("amBlogTimer()", 5000);

});

function amBlogTimer() {
    $(".amBlogImageGallery").each(function() {
        var current = $(this).children("img:visible");
        var next = current.next();
        if (next.size() == 0)
            next = $(this).children("img:first");
        current.fadeOut(1000);
        next.fadeIn(1000);
    });

    setTimeout("amBlogTimer()", 5000);
}

