// JavaScript Document

var imgArr = new Array();
imgArr['1'] = new Image();
imgArr['1'].src = '/img/navBlockOpen.png';

$(function() {
	
	var iMenuBlock = [];
	
	if (docId != 2) {
		$('a.menuCap').click(
			function() {
				if ($(this).hasClass('open') == false && $(this).attr('href') == 'javascript:void(0)') {
					$(this).addClass('open');
					$(this).parent().find('ul.menuBlockList').fadeIn();
					//$(this).parent().hasClass('first').removeClass('first');
					$(this).parent().addClass('open');
				}
				else if ($(this).hasClass('open') == true && $(this).attr('href') == 'javascript:void(0)') {
					$(this).removeClass('open');
					$(this).parent().find('ul.menuBlockList').fadeOut();
				}
			}
		);
		
	}
	else {
		$('ul.menuBlockList').show();
		$('li.first > a.menuCap').addClass('open');
	}	
	
	$('div.inputButton > input[type="file"]').change(
		function() {
		    $(this).parent().parent().find('input[type="text"]').val($(this).val());
		}
	);
	
	$('div.inputButton > input[type="file"]').mouseover(
		function() {
			$(this).css('cursor', 'pointer');
		}
	);
	/*
	$('div.inputField > input[type="file"]').click(
		function() {
		    $('div.inputButton > input[type="file"]').trigger('click');
		}
	);
	*/
	
});
