/*
var prelod = ['image1.gif', 'image2.gif'];
$.preloadImages(preload);
 
$.preloadImages('image1.gif', 'image2.gif');
 
 
jQuery.preloadImages = function() {
	var a = (typeof arguments[0] == 'object')? arguments[0] : arguments;
	for(var i = a.length -1; i > 0; i--) {
		jQuery("<img>").attr("src", a[i]);
	}
}
*/

$(document).click(function () {
    $('.roll_menu_item').hide();
});

$(document).ready(function () {

    $('.roll_menu').mouseover(function (e) {
        $('.roll_menu_item').each(function (index, h_el) {
            if ($(this).attr('id') != $("#" + $(e.target).attr("id") + "_ul").attr('id')) {
                $(this).hide();
            }
        })
        if ($("#" + $(e.target).attr("id") + "_ul").is(':visible')) return;
        $("#" + $(e.target).attr("id") + "_ul").slideDown('medium');
        $("#" + $(e.target).attr("id") + "_ul").position({
            my: "left top",
            at: "left bottom",
            of: e.target,
            offset: "0 0",
            collision: "fit"
        });


    })

});

/*$(document).ready(function () {
    $(document).mousemove(function (ev) {
        $("#menu_item2_ul").position({
            my: "left top",
            at: "left bottom",
            of: $("#menu_item2"),
            offset: "0 0",
            collision: "fit"
        });
    });

});
*/
