$(function() {
	$('.headerdet').click(function() {
		show_head_det();
	});

	$('#header_det .close_btn').click(function() {
		hide_head_det();
	});
	
	$('#header_det .close_btn').hover(
		function() {
			this.src = '/images/red_cross.gif';
		},
		function() {
			this.src = '/images/gray_cross.gif';
		}
	);
})

function show_head_det() {
	$('#container').block({
		message: $('#header_det'),
		css: {
			top: '60px',
			width: '630px',
			left: '420px',
			cursor: 'default',
			border: '2px solid #ADA389',
			background: '#F6F4E7'
		},
		overlayCSS: {
			cursor: 'default',
			backgroundColor: 'black'
		}
	});
	
	var y = $('.blockMsg').outerHeight() + $(window).scrollTop();
	if (y < 0)
		y = 25;
	$('.blockMsg').css('top', y);
}

function hide_head_det() {
	$('#container').unblock();
}
