﻿/*$(document).ready(function () {

    $(".content li a").hover(function () {
        $("#fader").fadeIn(3000);
    },
		function () {
		    $("#fader").fadeOut(3);
		});
});$(list_elements).each(function (i) {

});*/




$(document).ready(function () {



    /*fading(".submenu a", "#fader #");*/

    $(".fader_img").fadeTo("fast", 0);
    $(".submenu a").each(function (i) {
        $(this).hover(function () {
            var j = i + 1;
            var subfix = "img#fader" + j.toString();
            $(".data_container").hide();
            $(subfix).fadeTo("slow", 1.0);
        },
            function () {
                var j = i + 1;
                var subfix = "img#fader" + j.toString();
                $(subfix).fadeTo("fast", 0);
                $(".data_container").show();
                var empty = true;
                $(".data_container > div").each(function () {
                    if (!$(this).is(":hidden")) { empty = false; }
                });
                if (empty == true) { $(".data_container").hide(); }

            });


    });

    $(".fader_img").fadeTo("fast", 0);
    $(".submenu_int a").each(function (i) {
        $(this).hover(function () {
            var j = i + 1;
            var subfix = "img#fader" + j.toString();
            $(".data_container").hide();
            $(subfix).fadeTo("slow", 1.0);
        },
            function () {
                var j = i + 1;
                var subfix = "img#fader" + j.toString();
                $(subfix).fadeTo("fast", 0);

            });


    });


});

    /*function fading(elem, img_prefix) {
        
    $(img_prefix).fadeTo("fast", 0); // This sets the opacity of the thumbs to fade down to 30% when the page loads

    $(elem).hover(function () {

        $(img_prefix).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
    }, function () {
        $(img_prefix).fadeTo("fast", 0); // This should set the opacity back to 30% on mouseout
    });

}*/
