$(document).ready(function() {
	
	//img hover
	$("a img").hover(function(){
		$(this).animate({opacity: 0.7 },0);
	},
	function(){
		$(this).animate({opacity: 1 },0);
	});
	
	//topicsPage lastchild
	$("#topicsPage #article .mainClm .entry p:last").css("padding-bottom","0");
	
	//linkPage dl
	var dlhgt = $("#linkPage #article .mainClm .entryBody .clm dl").eq(0).height();
	var dllen = $("#linkPage #article .mainClm .entryBody .clm dl").length;
	
	for(var i=0; i<dllen; ++i){
		var dlhgti = $("#linkPage #article .mainClm .entryBody .clm dl").eq(i).height();
		if(dlhgt < dlhgti){
			$("#linkPage #article .mainClm .entryBody .clm dl").height(dlhgti);
		}
	}
	
});

/* pop up */
window.onload = function (){
	var node_a = document.getElementsByTagName('a');
		for (var i in node_a) {
			if(node_a[i].className == 'popup'){
				node_a[i].onclick = function() {
					return winOpen(this.href, this.rel)
				};
			}
		}
} ;

function winOpen(url, rel) {
	var split = rel.split(',') ;
	window.open(
	url,'popup',
	'width='+ split[0] +',height='+ split[1] +',toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes');

	return false;
};
