// JavaScript Document

document.write("<script type='text/javascript' src='/common/js/costodian.js'></script>");

//////////////////////////////以下は触れないでください////////////////////////////////////

// rollover
function smartRollover() {
if(document.getElementsByTagName) {
var images = document.getElementsByTagName("img");
for(var i=0; i < images.length; i++) {
if(images[i].getAttribute("src").match("_off.")){
images[i].onmouseover = function() {
this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
}
images[i].onmouseout = function() {
this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
}
}
}
}
}
if(window.addEventListener) {
window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
window.attachEvent("onload", smartRollover);
}

//faderollover
function initFadeImages() {
$("img.fadeImg").each(function() {
$(this).hover(
function() {
$(this).queue([]).stop();
$(this).fadeTo(100, 0.75);
},
function() {
$(this).queue([]).stop();
$(this).fadeTo(210, 1);
});
}
);
}
$(document).ready(initFadeImages);

// pagetop
jQuery.easing.quart = function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
};
jQuery(document).ready(function(){
jQuery('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var $target = jQuery(this.hash);
$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
if ($target.length) {
var targetOffset = $target.offset().top;
jQuery('html,body').animate({ scrollTop: targetOffset }, 900, 'quart');
return false;
}
}
});
});


