$(document).ready(function(){ 
 	
	// Drop Down
	$('ul.dd').hide();
	$('#navigation ul li').hover(function(){ 
		$(this).find('ul.dd:eq(0)').stop(true,true).slideDown();
		$(this).find('a:eq(0)').addClass('hover');
	 },
	 function(){  
		$(this).find('ul.dd').stop(true,true).slideUp();
		$(this).find('a:eq(0)').removeClass('hover');
 	});
 	
	
	$('#navigation ul li ul li').hover(function(){ 
		$(this).find('ul.tt:eq(0)').stop(true,true).slideDown();
		$(this).find('a:eq(0)').addClass('hover');
	 },
	 function(){  
		$(this).find('ul.tt').stop(true,true).slideUp();
		$(this).find('a:eq(0)').removeClass('hover');
 	});
	
 	 	
 	//PNG FIX for IE6
	if($.browser.msie && $.browser.version.substr(0,1) == 6 ){
		DD_belatedPNG.fix('h1#logo a, .intro .intro-title, .info-map img, .info-map a.dot, .area-info, h4.icon, h2.icon, .slider-content a.prev, .slider-content a.next, body.home-page #main #content .boxes .box a, .box ul li a')
	}
	
	// Map
	$('.info-map li.area').hover(function  () {
		$('.area-info').hide();
		$(this).find('.area-info').show();		
	});
	
	$('.info-map').hover(function  () {
		
	}, function  () {
		$('.area-info').hide();
	});
	
	// Custom File Upload
	$('.custom-upload').live('mousemove',function(e){
		var pageX = e.pageX;
		var pageY = e.pageY;
		var thisOffsetY = $(this).offset().top;
		var thisOffsetX = $(this).offset().left;
		$(this).find('input').css({
			'left': pageX - thisOffsetX - 150,
			'top': pageY - thisOffsetY - 30
		});
		
		// Get File Name
		$('.custom-upload input').live('change',function(){ 
			var inputVal = $(this).val();
			var inputValArr = inputVal.split("\\");
			var fileName = inputValArr[inputValArr.length - 1];
			$(this).parent().find('span').text(fileName);
		});
	});
 	

});
