/*///////////////////// スムーズスクロール //////////////////////////////*/
var span = 1000;
var effect = 'easeOutExpo';

$(function() {
	var ua = $.browser;
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			$(this).blur();
			var t = navigator.appName.match(/Opera/) ? "html" : "html,body";
			$(t).queue([]).stop();
			var $targetElement = $(this.hash);
			var scrollTo = $targetElement.offset().top;
			if (window.scrollMaxY) {
				var maxScroll = window.scrollMaxY;
			} else {
				var maxScroll = document.documentElement.scrollHeight - document.documentElement.clientHeight;
			}
			if (scrollTo > maxScroll){
				scrollTo = maxScroll;
			}
			$(t).animate({ scrollTop: scrollTo }, span, effect);
			return false;
		}
	});
});


/*///////////////////// ロールオーバー //////////////////////////////*/
$(function(){
    $("img.rollover").mouseover(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
    }).each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
    })
})

/*///////////////////// prettyPhoto //////////////////////////////*/
	$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto();
	});

/*///////////////////// Form-Validate //////////////////////////////*/	
$(document).ready(function() {
	$("#form-host").validate();
});

/*///////////////////// print //////////////////////////////*/
function PrintPage(){
	if(document.getElementById || document.layers){
		window.print();	
	}}