function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
$(document).ready(function() {
	equalHeight($(".simple"));
});

jQuery(document).ready(function() {
	jQuery("#sdRank li:nth-child(1)")
	  .css("background","url(img/common/rank1.gif) no-repeat left top")
	  .css("padding-top","0px")
	jQuery("#sdRank li:nth-child(1) p")
	  .css("padding-top","45px")
	jQuery("#sdRank li:nth-child(2)")
	  .css("background","url(img/common/rank2.gif) no-repeat left top")
	jQuery("#sdRank li:nth-child(3)")
	  .css("background","url(img/common/rank3.gif) no-repeat left top")
	jQuery("#sdRank li:nth-child(4)")
	  .css("background","url(img/common/rank4.gif) no-repeat left top")
	jQuery("#sdRank li:nth-child(5)")
	  .css("background","url(img/common/rank5.gif) no-repeat left top")
});


/* PAGE SCROLL */

$(function () {
  $('.pagetop').click(function () {
    $('html,body').animate({ scrollTop: 0 }, 'slow');
  });
});



/* ROLL OVER 

(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 (!img[j].src.match(/_off\./)) continue;
        input[j].onmouseover = over;
        input[j].onmouseout  = out;
    }
});




/* INDEX LIST */

jQuery(document).ready(function() {
	jQuery("#indexList li:nth-child(1)")
	  .css("margin-left","0px")
	jQuery("#indexList li:nth-child(5)")
	  .css("margin-left","0px")
});


/* INDEX VOICE */

$(function(){
  $('#customVoice dl:odd').addClass('voiceEven');
  $('#customVoice dl:even').addClass('voiceOdd');
});


$(function(){
  $('#newItem dl:odd').addClass('itemEven');
  $('#newItem dl:even').addClass('itemOdd');
});




$(document).ready(function(){
	$("#gNavi li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
if (document.all) {
		$("#gNavi li").hoverClass ("sfHover");
	}
});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};
