window.onload = outline;
function outline (){
var tgt = function (){ this.blur() };
for (var i = 0; i < document.links.length; i++)
document.links[i].onfocus = tgt;
}




//MOUSE ACTION-----------------------------------------------------

$(function() {

	$('a img:not(.pageTop img, #eyeCatch img)').hover(function(){ 
		$(this).fadeTo(100 , 0.7);
	});

	$('a img:not(.pageTop img, #eyeCatch img)').mouseout(function(){ 
		$(this).fadeTo(250 , 1);
	});
});


$(function() {

	$('.def').hover(function(){ 
		$(this).fadeTo(100 , 0);
	});

	$('.def').mouseout(function(){ 
		$(this).fadeTo(250 , 1);
	});
});




//MENU CHANGE-----------------------------------------------------

$(function() {

	$('#head .menu li a img.off').hover(function(){ 
		$(this).fadeOut(500);
		$('+.on',$(this)).fadeIn(200);
	});

	$('#head .menu li a img.on').mouseout(function(){ 
		$(this).fadeOut(500);
		$('.off:first-child').fadeIn(200);
	});

});


function headMenu(){  
	$('#head .menu li').hover(function(){
	$(this).find('ul.pullDown').css({visibility:'visible',display:'none'}).fadeIn(200);
},function(){ 
	$(this).find('ul.pullDown').fadeOut(500);
	});
}

$(function() {

	headMenu();

});


//TO PAGE TOP------------------------------------------------------

function TOP() {
	var aTagList = document.getElementsByTagName('a');
	for (var i = 0; i < aTagList.length; i++) {
		if (aTagList[i].href.match(/#top/i)) {
			aTagList[i].onclick = goPageTop;
		}
	}
}
var MOVE = 20;
var POSITION;
function goPageTop() {
	var yPos = document.body.scrollTop || document.documentElement.scrollTop;
	mObj(yPos);
	return false;
}
function mObj(y, s) {
	if (s) MOVE = s;
	POSITION = parseInt(y - y * 2 / MOVE);
	scrollTo(0, POSITION);
	if (POSITION > 0) setTimeout('mObj(POSITION, MOVE)', 1);
}
if (window.addEventListener) window.addEventListener('load', TOP, false);
if (window.attachEvent) window.attachEvent('onload', TOP);



