/**
 * NAZE Site Interface Controller
 * Date: 02/23/2009
 * @author xe-que design works
 * @version 1.0
 *
 */


jQuery(function( $ ){
	// フォントサイズ指定を表示(Javascriptオフの場合は非表示)
	$('#textsize').show();

	// Smooth Scroll
	$('.pagetop a[href*=#], .goto-conditional-search a[href*=#],#sitemap-submenu a[href*=#]').click(function(){
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname){
			var target = $(this.hash);
			target = target.length && target;
			if (target.length){
				var sclpos = 20;
				var scldurat = 600;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});

	// Popup Bubbles
/*
    $('.bubbleInfo').each(function () {
        var distance = 20;
        var time = 250;
        var hideDelay = 500;
		var boxheight = $('.popup').height() - 20;
        var hideDelayTimer = null;

        var beingShown = false;
        var shown = false;
        var trigger = $('.trigger', this);
        var info = $('.popup', this).css('opacity', 0);

        $([trigger.get(0), info.get(0)]).mouseover(function () {
            if (hideDelayTimer) clearTimeout(hideDelayTimer);
            if (beingShown || shown) {
                // don't trigger the animation again
                return;
            } else {
                // reset position of info box
                beingShown = true;
                info.css({
                    top: '-' + boxheight + 'px',
                    display: 'block'
                }).animate({
                    top: '-=' + distance + 'px',
                    opacity: 1
                }, time, 'swing', function() {
                    beingShown = false;
                    shown = true;
                });
            }

            return false;
        }).mouseout(function () {
            if (hideDelayTimer) clearTimeout(hideDelayTimer);
            hideDelayTimer = setTimeout(function () {
                hideDelayTimer = null;
                info.animate({
                    top: '-=' + distance + 'px',
                    opacity: 0
                }, time, 'swing', function () {
                    shown = false;
                    info.css('display', 'none');
                });

            }, hideDelay);

            return false;
        });
    });
*/
});
$(document).ready(function(){
	// 文字のグラディエント処理
//	$(".entry h2").prepend("<span><\/span>");

	// リストにクラスを自動付与
	$("ol.number1 li").each(function(i){
		i = i+1;
		$(this).addClass("number1_"+i);
	});
	$("ol.number2 li").each(function(i){
		i = i+1;
		$(this).addClass("number2_"+i);
	});
});

