/**
* Copyright 2010 phiDel (FOXB.KR)
**/

/**
* 배경색 바꾸기 (그라데이션 깜빡임 방지 로딩이 완료된후 실행)
**/
function doObjBgcChange(ne,	color){
	var _n_sc_obj = document.getElementsByName(ne);
	//alert(_n_sc_obj.length);
	for (i=0; i < _n_sc_obj.length; i++)
	{
		_n_sc_obj[i].style.backgroundColor = color;
	}
}

/**
* 별점수 클릭시 이미지 바꾸기
**/
jQuery(window).load( function() {
	jQuery('input.inputTypeText').each(function(i){
			jQuery(this).removeClass('inputTypeText');
	});

	jQuery('textarea.inputTypeTextArea').each(function(i){
			jQuery(this).addClass('inputTypeTextArea');
	});

	jQuery('ul.starPoint').find('a').click(function() {
		var o = jQuery(this);
		var p = this.parentNode;
		//여러개의 starPoint 에서도 선택한 객체만 적용하기 위해 검사
		while (p &&	(jQuery(p).attr('className') != 'starPoint'))
		{
			p = p.parentNode;
		}
		jQuery(p).find('a').each( function(i) {
			if(i<o.attr('rel')) jQuery(this).addClass('on'+o.attr('col'));
			else jQuery(this).removeClass('on'+o.attr('col'));
		});
		jQuery('input[name=vote_point]', p).val(o.attr('rel'));
	});
});

