// JavaScript Document
$(function() {
		$(".list tr:nth-child(odd)").addClass("odd");
		$(".list tr:nth-child(even)").addClass("even");
      
		$("#news_holder img").addClass("img_right");
		
		$("A.external_link").click( function() {
        window.open( $(this).attr('href'), 'external_w' );
        return false;
       });
		
		$('#header').bind('click', function() {
			window.open("index.php", '_self');
		});
		
 
		
		$('#mem_type_help').hide();
		$('a.help-toggle').click(function() {
			$('div#mem_type_help') // the details we want
					  .toggle(400);
			return (false);
							   
		});
		
		$("#mem_description").keyup(function() { 
		var t; 
		if ($("#edit-body-count").length == 0) {
			t = $('<p id="edit-body-count"></p>'); 
			$(this).after(t);
		} else {
			t = $("#edit-body-count");
		}
		t.html($.trim($(this).val()).split(/\s+/).length + " word(s)"); 
		});
		
		$("#mem_description").focus(function() { 
		var t; 
		if ($("#edit-body-count").length == 0) {
			t = $('<p id="edit-body-count"></p>'); 
			$(this).after(t);
		} else {
			t = $("#edit-body-count");
		}
		t.html($.trim($(this).val()).split(/\s+/).length + " word(s)"); 
		});


});
 