/*

########################################################

	orbit

########################################################

*/

 $(window).load(function() {
	 $('#visual').orbit();
 });
 
 
 
/*

########################################################

	rollover

########################################################

*/

$(function(){
	$("img.rollover").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1_off$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"));
	});
});
 
 
 
/*

########################################################

	IE6

########################################################

*/

$(function () {
     if ( $.browser.msie && $.browser.version <= 6 ) {
             $('body').prepend('<div class="error">あなたは旧式ブラウザをご利用中です。このウェブサイトを快適に閲覧するにはブラウザをアップグレードしてください。</div>');
     }
});
 
 
 
/*

########################################################

	tab

########################################################

*/

$(function() {
    $(".tab li").click(function() {
        var num = $(".tab li").index(this);
        $(".content_wrap").addClass('hide');
        $(".content_wrap").eq(num).removeClass('hide');
        $(".tab li").removeClass('selected');
        $(this).addClass('selected')
    });
});



/*

########################################################

	slide

########################################################

*/

$(function(){
	$("div.products_wrap:not(:first)").css("display","none");
	$("h3.products_name").css("cursor","pointer");
	$("h3.products_name img:not(:first)").attr("src","img/bt_more_pt1_off.jpg");
	$("h3.products_name").click(function(){
		if($("+div.products_wrap",this).css("display")=="none"){
			$("+div.products_wrap",this).slideDown("slow");
		}else if($("+div.products_wrap",this).css("display")=="block"){
			$("+div.products_wrap",this).slideUp("slow");
		}
	});
	$("h3.products_name:first").toggle(function(){
		$("h3.products_name:first img").attr("src","img/bt_close_off.jpg").attr("src","img/bt_more_pt1_off.jpg");
	},function(){
		$("h3.products_name:first img").attr("src","img/bt_more_pt1_off.jpg").attr("src","img/bt_close_off.jpg");
	});
	$("h3.products_name:not(:first)").toggle(function(){
		$("h3.products_name:not(:first) img").attr("src","img/bt_more_pt1_off.jpg").attr("src","img/bt_close_off.jpg");
	},function(){
		$("h3.products_name:not(:first) img").attr("src","img/bt_close_off.jpg").attr("src","img/bt_more_pt1_off.jpg");
	});
});





