// RollOver
$(function () {
    $.rollover = {
        init: function () {
            $('a img,input[type="image"]').not('[src*="_on."]')
                .bind('mouseover', this.over)
                .bind('mouseout',  this.out)
                .each(this.preload);
        },

        over : function () {
            this.setAttribute('src', this.getAttribute('src').replace('_off.', '_on.'));
        },

        out : function () {
            this.setAttribute('src', this.getAttribute('src').replace('_on.', '_off.'));
        },

        preload : function () {
            new Image().src = this.getAttribute('src').replace('_off.', '_on.');
        }
    };

    $.rollover.init();
});



//extension
$(function () {

	$("a[href$=pdf]").addClass("pdf");

	$("a[href$=doc]").addClass("doc");

	$("a[href$=xls]").addClass("xls");
	
//	$("a[href$=gif]").addClass("img");
	
//	$("a[href$=jpg]").addClass("img");

//	$("a[href$=ram]").addClass("sound");

//	$("a[href$=mp3]").addClass("sound");

});



//
$(function () {
 if	($.fn.fancybox) $("a[href$=jpg],a[href$=gif]").fancybox({
		'hideOnContentClick': true,
		'overlayOpacity': 0.8,
		'overlayColor': '#000000'
	});
});


$(function () {
	//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked 
	$("div#navigation dl dt").click(function()
    {
		$(this).next("div#navigation dl dd").slideToggle(300).siblings("div#navigation dl dd").slideUp("slow");
       	$(this).siblings();
	});
	//slides the element with class "menu_body" when mouse is over the paragraph
//	$("div#navigation ul li").mouseover(function()
//    {
//	     $(this).next("div#navigation ul li ul").slideDown(500).siblings("div#navigation ul li ul").slideUp("slow");
//         $(this).siblings();
//	});
});


if (window.DD_belatedPNG) DD_belatedPNG.fix('html, body, #wrapper, img');

