// Apply Cufon
Cufon.replace('#content_body h2, #column_one h3, #column_right h3, #social_foot_MO_text');

// Attach behavior to search box
$(document).ready(function() {
	$("#top_search_field").focus(function() {
		if (this.value == this.defaultValue) this.value = "";
		$(this).animate({width:135},300);
	}).blur(function() {
		if (!this.value.length) this.value = this.defaultValue;
		$(this).animate({width:102},300);
	});
	
	// Auto-stripe alternate rows in tables
	$('table').each(function()
	{
		$('tr:nth-child(even)',this).addClass('even');
	});
	
	$('.social_foot_MO').hover(
		function() { $('#social_foot_MO_text').show(); },
		function() { $('#social_foot_MO_text').hide(); }
	);
	
	$('#column_one form.autoSubmit').each(function()
	{
		$('input[type="submit"]', this).hide();
		$('select', this).each(function(){ $(this).bind('change',function(){ if (this.value != 'NULL') $(this).parents('form').submit(); }); });
	});
});
