function resetHpWindow() {
	var hp_img_height = $('.content-hp-main-img').innerHeight();
	//var hp_img_width= $('.content-hp-main-img').width();
	//$('.content-hp-main-text').css('top', (0-hp_img_height));
//	$('.content-hp-main-text').css('width', (hp_img_width/2));
	//$('.content-hp-main-text').css('height', hp_img_height);
	$('.content-hp-main').css('height', (hp_img_height-10));
}

$(document).ready(function() {
	
	resetHpWindow();
	
	$('.content-hp-img').hover(
		function () {
			var div_height = $(this).find('div:first').innerHeight();
			$(this).find('div:first').animate({"top": (332-div_height)}, 200);
		},
		function () {
			$(this).find('div:first').animate({"top": 292}, 200);
		}
	);

	$('.menu-item').hover(
		function () {
			var nav_position = $(this).offset().left;
			if($(this).find('ul:first').is(':hidden')) {
				$(this).find('ul:first').css('left', (nav_position-4));
				$(this).find('ul:first').fadeIn(200);
			}
			$('a:first', this).css("background", "#CDE6AF");
		},
		function () {
			$('a:first', this).css("background", "none");
			if($('.sub-menu').is(':visible')) {
				$(this).find('ul:first').fadeOut(200);
			}
			
		}
	);


});

