//================================================================//
// 汎用
$(document).ready(function(){
	//--- SIDEBOX 揃え
	// $("#sidebox_page").html( $(".page_navi").html() ) ;
	if( $("#sidebox_section").height() < $("#content").height() ){
		$("#sidebox_section").height( $("#content").height() ) ;
	}

}) ;

//================================================================//
// 汎用 hOver
$(function(){
	//--- rollover
	$(".jq_rollover").each(function(){
		$(this).hover(
			function(){
				var name_of_image = $(this).attr('src') ;
				var fn='' ;
				var ext='' ;
				if((n=name_of_image.lastIndexOf(".")) != -1 ){
					fn = name_of_image.substring(0,n) ;
					ext = name_of_image.substring(n) ;
				}
				$(this).attr('src', fn + '_ov' + ext) ;
			},
			function(){
				var name_of_image = $(this).attr('src') ;
				var fn='' ;
				var ext='' ;
				if((n=name_of_image.lastIndexOf(".")) != -1 ){
					fn = name_of_image.substring(0,n-3) ;
					ext = name_of_image.substring(n) ;
				}
				$(this).attr('src', fn + ext) ;
				alert(fn + ext) ;
			}
		) ;
	}) ;
	// opacity of hover
	$(".opacity").hover(
		function(){ $(this).css('opacity',0.7) ; },
		function(){ $(this).css('opacity',1.0) ; }
	) ;
	// cursor of hover
	$(".cursor").hover(
		function(){ $(this).css('cursor','pointer') ; },
		function(){ $(this).css('cursor','default') ; }
	) ;

	$('img').ifixpng();
	$('.seo').hide() ;

}) ;
//----------------------------------------------------------------//



	//================================================================//
	// (汎用関数)Message Box                                          //
	function appendScrollMessage( target, msg ) {
		$( target ).append( msg ) ;			// 追加

		if( false ){
			line = $(target).children() ;		// 引出
			$( target ).empty() ;				//空に
			for(i=0;i<(line.length-1);i++){
				$(target).append( line[i] ) ;	// 入れなおし
			}
		}
	}

	//================================================================//
	// (汎用関数)Message Box                                          //
	function prependScrollMessage( target, msg ) {
		$( target ).prepend( msg ) ;			// 追加

		if( false ){
			line = $(target).children() ;		// 引出
			$( target ).empty() ;				//空に
			for(i=0;i<(line.length-1);i++){
				$(target).prepend( line[i] ) ;	// 入れなおし
			}
		}
	}

