/* page up
----------------------------------------------- */
function pageup() {
	var nv = navigator.userAgent;
	if (nv.match(new RegExp("MSIE 7", "i"))) { posi = document.documentElement.scrollTop; }
	else if (document.all) { posi = document.body.scrollTop; }
	else { posi = window.pageYOffset; }
	moveObje(posi);
}
function moveObje(position) {
	move = position / 10;
	point = parseInt(position - move);
	scrollTo(0,point);
	if (point > 0) { setTimeout("moveObje(point)",1); }
}


/* window resize
----------------------------------------------- */
function winResize() {
window.focus();
var nv = navigator.userAgent;
if (nv.match(new RegExp("MSIE 6", "i"))) {
	var wy = document.body.scrollHeight;
	window.resizeTo(350,wy+100);

} else if (nv.match(new RegExp("FireFox", "i"))) {
	var wy = document.body.offsetHeight;
	window.resizeTo(350,wy+130);
	
} else {
	var wy = document.body.offsetHeight;
	window.resizeTo(350,wy+100);
}
}



/*-----------------------------------------------
 jquery
----------------------------------------------- */

/* target_blank
----------------------------------------------- */
//jQuery(document).ready(function() {
//jQuery('a[href^="http"]').not('[href^="http://chaya.gosite.jp/"]').click(function() {
//		window.open(this.href, '');
//		return false;
//	});
//	jQuery('a[href^="http"]').not('[href^="http://chaya.gosite.jp/"]').addClass("exLink");
//});


jQuery(document).ready(function () {
	jQuery(".subwindow1").click(function() {
		window.open(this.href, '', 'width=350, height=400, menubar=no, toolbar=no, location=no, scrollbars=no, resizable=yes');
		return false;
	});
	jQuery(".subwindow2").click(function() {
		window.open(this.href, '', 'width=540, height=520, menubar=no, toolbar=no, location=no, scrollbars=no, resizable=yes');
		return false;
	});
});


/* products thumbnail
----------------------------------------------- */
jQuery(document).ready( function() {
    jQuery(".thumbnail img").click( function() {
        var changeSrc = this.src;
        jQuery("#target").fadeOut(
            "fast",
            function() {
                jQuery(this).attr("src", changeSrc);
                jQuery(this).fadeIn();
            }
        );
		jQuery(this).addClass("selected");
    });
})
