

// Date +
dayName = new Array	("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
monName = new Array	("January","February","March","April","May","June","July","August","September","October","November","December")
now = new Date
// Date -

// Clear Default Text Input +
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
// Clear Default Text Input -

// JQuery Scripts  +

$(function() {
	
	// Add a class to the edit console container.
	$("td#mpdmconsole").parent("tr").addClass("mpdmconsole_row");
	
	// Add a class to not show the "pipe" icon on the last item in a subnav list.
	$("div.subnav ul li:last-child").addClass("last");
	
	//Add a class to the WP Chrome Frame
	$("tr.ms-WPHeader").closest("table").parent("td").parent("tr").closest("table").addClass("brt-wpchrome_frame");
	
	$("div.ms-WPBody").parent("td").parent("tr").closest("table").addClass("brt-wpchrome_frame");
	
	// Add a class name to the Site Actions container and then push contents to another area of the UI.
	$("table.ms-siteaction").parent("td").addClass("brt-siteactions_frame");
	var SiteActionsHtmlStr = $("td.brt-siteactions_frame").html();
	$("div.siteActionsNew").html(SiteActionsHtmlStr);
	
	// Add a class name to the parent of the "ms-titlearea" cell.
	$("td.ms-titlearea").parent("tr").addClass("ms-titlearea_frame");
	
	// Remove the spacer image row from the DOM.
	$("td.ms-pagebottommarginleft").parent("tr").css("display", "none");
	
	// Remove the LSB's left "gutter" shim cell.
	$("table.ms-navframe tr td[width='4']").css("display", "none");
	
	// Wrap the main content frame table with a center align div for non-custom master page layouts.
	//THIS ONE WAS CAUSING A JS ERROR (on adding reusable content)
	//$("table.ms-main").wrap("<div id='mainwrapperouter' align='center'></div>");
	
	// Wrap the title image area with an anchor. Parent container will have logo applied as a BG.
	$("td.ms-titleimagearea").wrapInner("<a href='http://www.bcff-online.org/' title='The Center for Health Equity and Social Justice'></a>");
	
	// Extract the height of the Right Sidebar and apply it to the main body wrapper of the Home Page.
	var homeRsbHeight = $("div#brt-bodyarea_home div.home_rsb_frame").height();
	$("div#brt-bodyarea_home").css("height", homeRsbHeight);
	
	// Apply an internal span to the Sub Nav anchors to assist in vertical alignment.
	/*$("* * .ms-ptabcn a").wrapInner("<span class='anchorpad'></span>");
	$("* * .ms-ptabcf a").wrapInner("<span class='anchorpad'></span>");
	$("* * .ms-sctabcn a").wrapInner("<span class='anchorpad'></span>");
	$("* * .ms-sctabcf a").wrapInner("<span class='anchorpad'></span>");*/
	
	//930px total width (30px left offset)
	
	// FORM RULES
	
	// Add a default string to the main banner search box and remove it on focus.
	$(".ms-globalTitleArea * td.ms-sbcell input").attr({
		value:"Search our site..."
	});
	$(".ms-globalTitleArea * td.ms-sbcell input").click(function () { 
     $(".ms-globalTitleArea * td.ms-sbcell input").attr({
			value:""
		});
    });
	
	// Apply class names to form buttons for CSS traction.
	$("input[type='submit']").addClass("btn_01");
	$("input[type='button']").addClass("btn_01");
	$("input[type='reset']").addClass("btn_01");
	
	$("input[type='text']").addClass("form_singleline_elem");
	
	//$("div.brt-splash div").text("&nbsp;").wrap("<span style='display:none;'></span>");
	
	//$("div#brt-bodyarea_home div.home_blocks_frame").text(homeRsbHeight);
	
	//$("").addClass("");

});

// JQuery Scripts  -




