/* ============================================================

	script info : 独自のスクリプトを記述

============================================================ */


/* ------------------------------------------------------------
	common : jScrollPane.js
------------------------------------------------------------ */

$(function() {
	$('#mainContents').jScrollPane();
});


/* ------------------------------------------------------------
	common : smooth scroll
------------------------------------------------------------ */

$(document).ready(function() {
	$('a[href^=#]').click(function() {
		if ($(this).hasClass('nosc') == false) {
			var speed = 500;
			var href= $(this).attr('href');
			var target = $(href == '#' || href == '' ? 'html' : href);
			var position = target.offset().top;
			$($.browser.safari ? 'body' : 'html').animate({ scrollTop : position }, speed, 'easeInOutCirc');
			return false;
		}
	});
});


/* ------------------------------------------------------------
  [common : roll over]
------------------------------------------------------------ */

if(!(jQuery.browser.msie && parseInt(jQuery.browser.version) === 6)){
	$(document).ready(function() {
		$('[src*="_off."]')
			.mouseover(function(){
				$(this).attr('src', $(this).attr('src').replace(/^(.+)_off(\.[a-z]+)$/, '$1_on$2'));
			})
			.mouseout(function(){
				$(this).attr('src', $(this).attr('src').replace(/^(.+)_on(\.[a-z]+)$/,' $1_off$2'));
			})
			.each(function(init){
				$('<img>').attr('src', $(this).attr('src').replace(/^(.+)_off(\.[a-z]+)$/, '$1_on$2'));
			})
	});
}

/* ------------------------------------------------------------
  [common : branch select]
------------------------------------------------------------ */

$(document).ready(function() {
	$('#branchSelect').change(function() {
		var targetUrl = $(this).find('option:selected').val();
		location.href= targetUrl;
	});
});


/* ------------------------------------------------------------
  [members top : autoHeight]
------------------------------------------------------------ */

$(document).ready(function() {
	$('.latestSection .column').autoHeight();
});







