$(function(){
	$("#feeds").accordion();
	
	$("a.feedReadmoreLink").click(function(){
		window.open($(this).attr("href"));
		
		return false;	
	});
	
	$("#field_id_6").change(function() {
		category = $(this).val();
		
		if (category == "events")
		{
			$(".events").show();
		}
		else
		{
			$(".events").hide();
		}
	});
	
});

$(window).load(function(){

	if($("#entryform").length > 0)
	{
		tinyMCE.init({

			// General options
			mode : "textareas",
			theme : "advanced",
			plugins : "advhr,advlink,inlinepopups,insertdatetime,preview,media,searchreplace,print,image,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline|bullist,numlist,undo,redo,|,image,|,link,unlink,anchor,insertdate,inserttime",
			theme_advanced_buttons2 : "",
			theme_advanced_buttons3 : "",
			theme_advanced_buttons4 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left"
		});
	}
});