$(document).ready(function() {
	$('#news-list').innerfade({ 
		speed: 'slow', 
		timeout: 5000, 
		type: 'sequence', 
		containerheight: '40px'
	});
}); 


/*  page scroll 
**************************************************************/
$(function() {
	$('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 = 30;
				var scldurat = 1200;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
});

/* ping fix
**************************************************************/
function pngfix(){ if(navigator.userAgent.match (/MSIE (5\.5|6\.)/)){for(var i=0; i<document.images.length; i++){
	var img = document.images[i];if (img.src.match (/\.png/i)){ var imgStyle = "display:inline-block;";
	if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
	var html = "<span style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" + img.src + "\', sizingMethod='image');\"></span>";img.outerHTML = html;i = i-1;}}}}


/* input hver
**************************************************************/
var preLoadFlag = "false";
 
	function preLoadImg(URL){
 
		arrImgList = new Array (
			URL+"../img/btn_submit_on.gif",
			URL+"../img/btn_submit_off.gif"
		);
		arrPreLoad = new Array();
		for (i in arrImgList) {
			arrPreLoad[i] = new Image();
			arrPreLoad[i].src = arrImgList[i];
		}
		preLoadFlag = "true";
	}
 
	function chgImg(fileName,imgName){
		if (preLoadFlag == "true") {
			document.images[imgName].src = fileName;
		}
	}
	
	function chgImgImageSubmit(fileName,imgObj){
	imgObj.src = fileName;
	}
 
