var doc = window.location.href;

$(document).ready(function() {
			
	if ( doc == 'http://ipm.pe.kr/' || doc == 'http://werconnected.info/' ) {
		// new tab or window, no bots
		$('a.external').attr({
			target: '_blank',
			rel: 'nofollow'
		});
	
		// login		
		$('#login_form').hide();
		$('.login').click(function() { 
			$('#login_form').toggle('slow'); 
			return false;
		});
	
		// latest	
		$('.hidden').hide();
	
		var wp = $('#wp').html();
		var acstb = $('#acstb').html();
		
		$('.latest_box_first.blog').html(wp);		
		$('.latest_box_left.acstb').html(acstb);
	
		// sub latest place on middle of right	
		$('#sheets').show().nextAll().hide();
		$('ul#res a').mouseover(function() {
			
			var e_attr = $(this).attr('class');
					
			if ( e_attr != 'external' ) $('#res_latest_view').children().hide();
			$(this).parent().parent().next().children('#' + e_attr).toggle();
		});
	}
	
	// menu
	$('#navigation_container ul.sub').hide();
	
	$('#navigation_container li a.main').mouseover(function() {
		$('#navigation_container ul.sub').hide();	
		var href = $(this).attr('href');
			
		$(href).slideDown('normal');				
	}).click(function() { return false });
	// 
	// // hover	
	// var $imgs = $('a img');
	// 
	// $.each($imgs, function() {
	// 	
	// 	$(this).css('opacity', 0.8);
	// 	
	// 	// hover images with animate
	// 	$(this).hover(function() {
	// 		$(this).animate({ opacity: 1.0 }, 1000 );
	// 	}, function() {
	// 		$(this).animate({ opacity: 0.8 }, 300 );
	// 	});	
	// 				
	// });
});
