$(function(){
	// toggle tab setting
    $("#tab-navi li").click(function() {
		console.log(this.className);
		if (this.className == 'return-top') {
			$('html, body').animate({scrollTop: 0},{easing: 'easeOutExpo',duration: 500});
			return false;
		}
        var num = $("#tab-navi li").index(this);
        $(".tab-content").addClass('disable');
        $(".tab-content").eq(num).removeClass('disable');
        $("#tab-navi li").removeClass('select');
        $(this).addClass('select')
    });
	// tab position fixed
	var nav    = $('#tab-navi-wrap');
	var offset = nav.offset();
	if (offset == null) return;
	$(window).scroll(function () {
		if($(window).scrollTop() > offset.top - 11) {
			nav.addClass('tab-fixed');
		} else {
			nav.removeClass('tab-fixed');
		}
	});
	// jump comment area
	$("#entry-tags li.comment").click(function() {
		$('html, body').animate({scrollTop:$("#comment").position().top},{easing: 'easeOutExpo',duration: 500});
	});
})

