//this js is for PRESENTATION ONLY 

$(document).ready(function(){
	var $customDropdowns = $(".custom-dropdown");

	$customDropdowns.each(function() {
		var $links = $(this).find('a');
		var $dropDown = $(this).find('ul');
		var $default = $(this).find('a.default');
		$(this).hover(
			function() {
				$dropDown.fadeIn();
			},
			function() {
				$dropDown.fadeOut();
			}
		);
		
		$links.each(function() {
			$(this).click(function(e) {
				
//			    window.location.href ="/us/article/articleCategory.do?typeUrlName="+$(this).attr('rel')+"&cur_page=1&row_cnt="+$(this).attr('row')+"&sort_typ_cd="+$(this).attr('val');
				
				$links.each(function() {
					$(this).removeClass('active');
				});
				var targetText = $(this).html();
				$dropDown.fadeOut();
				$default.text(targetText);
				e.preventDefault();	
				$(this).addClass('active');
				
				
			});
			
		});
	});
	
	
	/*var showResults = function() {	
		$pollForm.hide();
		$pollResults.fadeIn();
	};
	
	$($voteButton).click(function(e) {
		e.preventDefault();
		showResults();
	});
	
	$($resultsButton).click(function(e) {
		e.preventDefault();
		showResults();
	});*/

});

