// JavaScript Document

$(function(){
	$('#dash a').click(function(){		
		$('#dash li.act').removeClass('act');
		$(this).parent().addClass('act');
		return false;
	});
	
	$('#faq p.f-14 a').click(function(){
		var $obj = $(this)[0];
		
		$('div.popup').css({'top':(getTop($obj)-270)+'px','left':(getLeft($obj)-20)+'px'}).removeClass('hide');
		
		return false;
	});
	$('#close').click(function(){
			$('div.popup').addClass('hide')	;			   
		return false;
	
	})
});
function getTop(e) {
	var top = e.offsetTop; 
	while (e.offsetParent) {				
		e = e.offsetParent; 
		top += e.offsetTop; 
	}
	return top; 
}


function getLeft(e) {
	var left = e.offsetLeft; 
	while (e.offsetParent) {
		e = e.offsetParent; 
		left += e.offsetLeft; 
	}
	return left; 
}

