
/* gnavi */

$(function(){
	$("#gNav ul ul").hide()
	$("#gNav ul li").hover(function(){
		$("> ul:not(:animated)" , this).animate({
			height : "toggle",
			opacity : "toggle"
		}, 300 );
	},
	function(){
		$("> ul" , this).slideUp("fast");
	});
});


/* RollOver */

(function(onLoad) {
    try {
        window.addEventListener('load', onLoad, false);
    } catch (e) {
        window.attachEvent('onload', onLoad);
    }
})(function() {
    var over = function() { this.src = this.src.replace('_off.', '_on.'); };
    var out  = function() { this.src = this.src.replace('_on.', '_off.'); };
    var img = document.getElementsByTagName('img');
    for (var i = 0, l = img.length; i < l; i++) {
        if (!img[i].src.match(/_off\./)) continue;
        img[i].onmouseover = over;
        img[i].onmouseout  = out;
    }
	var input = document.getElementsByTagName('input');
    for (var j = 0, l = input.length; j < l; j++) {
        if (!input[j].src.match(/_off\./)) continue;
        input[j].onmouseover = over;
        input[j].onmouseout  = out;
    }
});


/* tab menu */

$(function () {
    var tabContainers = $('#indexTab > dl');
    $('#indexTab ul a').click(function () {
        tabContainers.hide().filter(this.hash).show();
        $('#indexTab ul a').removeClass('selected');
        $(this).addClass('selected');
        return false;
    }).filter(':first').click();
});


/* TABLE */

jQuery(function(){
  jQuery('table tr:odd').addClass('even');
  jQuery('table tr:even').addClass('odd');
  jQuery('dl:odd').addClass('even');
  jQuery('dl:even').addClass('odd');
	jQuery('dl dt:odd').addClass('even');
  jQuery('dl dt:even').addClass('odd');
  jQuery('dl dd:odd').addClass('even');
  jQuery('dl dd:even').addClass('odd');
});


jQuery(document).ready(function() {
	jQuery("ol li:nth-child(1)")
	  .addClass('first');
	jQuery("ul li:nth-child(1)")
	  .addClass('first');
	jQuery("ol li:nth-child(2)")
	  .addClass('second');
	jQuery("ul li:nth-child(2)")
	  .addClass('second');
	jQuery("ol li:nth-child(3)")
	  .addClass('third');
	jQuery("ul li:nth-child(3)")
	  .addClass('third');
});


$(function() {
    $('.box01 dd.txt').flatHeights();
    $('.box01 dd.txt2').flatHeights();
    $('.box01 dd.txt3').flatHeights();
});

