

jQuery(document).ready(function(){
	
	// ============ Turn links into curve-cornered buttons (with the help of spans & CSS)
	var getButton_width = 0;
	jQuery("p.sf_postCommands a, p.sf_createNewItem a, p.sf_readMore a, p.sf_back a").each(function(){
		getButton_width = jQuery(this).width();
		jQuery(this).addClass("but_misc").css({ "width" : (getButton_width + 30) });
		jQuery(this).wrapInner("<span class=\"but_misc_text\"></span>")
		jQuery(this).prepend("<span class=\"but_misc_corner but_corner_l\"></span>");
		jQuery(this).append("<span class=\"but_misc_corner but_corner_r\"></span>");
		jQuery(this).wrapInner("<span class=\"but_misc_text_wrapper\"></span>");

	});

	// ============ Dynamically Adjust the width of each <LI> within the Primary Nav
	jQuery(".primaryNav li").each(function(){
		jQuery(this).addClass("rmItem_adjustWidth").css({ "width" : (100/jQuery(".primaryNav li").length)+"%"});
	}).css({ "visibility" : "visible" });
	
	// ============ Dynamically Adjust the width of each <LI> within the Secondary Nav

	jQuery(".secondaryNav li").each(function(){
		jQuery(this).addClass("rmItem_adjustWidth").css({ "width" : (99/jQuery(".secondaryNav li").length)+"%"});
	}).css({ "visibility" : "visible" });

	
	// ============ Dynamically Adjust the width of each <LI> within the Primary Nav
	jQuery(":submit").addClass("cma_submitButton");
	jQuery(".sf_searchBox .sf_searchSubmit").val("");
	
	jQuery(".sf_subscribeTxt").attr("value", "Enter your email address");
	jQuery(".sf_subscribeTxt").focus(function(){
		jQuery(".sf_subscribeTxt").attr("value") == "Enter your email address" ? jQuery(".sf_subscribeTxt").attr("value", "") : null;	
	});
	 
	
});

