$(document).ready(function() {
		
//*
	$('h3').parent().next('.newscontent').slideUp('slow');
	
	$('h3').click(function() {	
		//alert('click news title');
		$(this).parent().next('.newscontent').toggle('slow');
		$(this).toggleClass('active');
	});	
	
//*/

/*
	// Show / Hide All news items	
	$('#expand_news').click(function(event) {		
		event.preventDefault();
		$('h2').parent().next('#newscontent').slideDown('slow');
		$('h2').addClass('active');
	});	
		
	$('#collapse_news').click(function(event) {
		event.preventDefault();
		$('h2').parent().next('#newscontent').slideUp('slow');
		$('h2').removeClass('active');
	});
//*/	
	
/*		
	$('#newscontent a').each(function() {	
		
				
		if (!($(this).attr("id"))) {	
						
			var title = $(this).text();
			var hyperlink = escape($(this).attr("href"));
			
			var title_uri_encode = encodeURIComponent(title);	
			var url_uri_encode = encodeURIComponent(hyperlink);
			
			var category = $('#hiddencat').attr("cat");
			var videoid = $('#hiddencat').attr("vid");		
			
			$(this).attr('target', '_blank');
			
			if(videoid != ""){
				$(this).attr("href", "external.php?title=" + title_uri_encode + "&exturl=" + url_uri_encode + "&cat=" + category + "&vid=" + videoid);
			} else {
				$(this).attr("href", "external.php?title=" + title_uri_encode + "&exturl=" + url_uri_encode + "&cat=" + category);
			}
		}
						
	});		
//*/

});
