//設定product category
$(function() {
    // .more-infoを隠す
    $('.moreInfo').hide();
	$('.caption').css("opacity","0.6");

    // hover時の処理
    $('.categoryContent').each(function() {

        // キャプション
        var caption  = $(this).children('.caption');

        // 親要素の高さを取得
        var box_height   = $(this).height();

        // 今現在のキャプションの高さ
        var caption_h = caption.height();

        // 後で楽なので…
        var moreinfo = caption.children('.moreInfo');

        $(this).hover(
            function() {
					
                    moreinfo.stop(false, true).fadeIn();
                    caption.animate({
                        height : box_height + 'px',
						opacity : 0.8
                    }, {queue:false, duration:'fast'})
                
            },
            function() {
                moreinfo.stop(false, true).fadeOut();
                caption.animate({
                    height : caption_h + "px",
					opacity : 0.6
                }, {queue:false, duration:'normal'});
            }
        );
    })
});


//設定 showcase
$(function() {
    $('.showcase').cycle({
		fx: 'uncover',
		speed: 1000, 
		timeout: 6000,
		pause: 1,
		pager: '#showcaseNav'
	});
});


//導覽列sub menu
$(function() {
	jQuery(function(){
		jQuery('#nav').superfish();
	});
});

//語言選擇
$(function() {
	var lanBox = $("#languageSelector > div");
	$("#languageSelector").hover(function(){
		lanBox.stop(true, true).slideDown("fast");
	},function(){
		lanBox.stop(true, true).hide();
	});
});
