﻿$(function () {
	//DropDown Menu
	$('#globalNavi li').hover(
	function () {
		$('ul.drop', this).stop(true, true).slideDown('fast');
	}, function () {
		$('ul.drop', this).slideUp('fast');
	});
 
	//DropDown Menu On
	$('ul.drop').each(function () {
		var parentImg = $(this).parent().find('img');
		var parentOf = parentImg.attr('src');
		var parentOn = parentOf.replace('_of.', '_ov.');
		$(this).hover(
		function () {
			parentImg.attr('src', parentOn);
		}, function () {
			parentImg.attr('src', parentOf);
		});
	});
 
	// Rollover
        $('img,input[type=image]').each(function () {
                var ofSrc = $(this).attr('src');
                var ovSrc = ofSrc.replace('_of.', '_ov.');
                $(this).hover(function () {
                        $(this).attr('src', ovSrc);
                }, function () {
                        $(this).attr('src', ofSrc);
                });
                $(window).unload(function () {
                        $(this).attr('src', ofSrc);
                });
        });
});






jQuery(function($) {
	var postfix = '_f2';
	$('#menubox a img').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_on = src.substr(0, src.lastIndexOf('.'))
			+ postfix
			+ src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_on);
		img.hover(function() {
			img.attr('src', src_on);
		}, function() {
			img.attr('src', src);
		});
	});
});











