$(document).ready(function() {

//add separator to menu items
$("#brighton_menu ul li:not(.last)").append("|"); 


//move newsletter to footer
$("#footer").insertAfter("#brighton_content");
$("#brighton_footer").prependTo("#footer div.footerBottom");

//add class to newsletter
$("div.block:has(.IngeniMailSubscribeContainer)").addClass("newsletter-block");
$("div.newsletter-block").prependTo("#footer div.footerTop");

//footer input and submit fields
$("div.newsletter-block div.IngeniMailSubscribeContainer div:has(.IngeniMailSubscribeEmailInput)").addClass("form-container");
$(".newsletter-block .form-container .subhead").remove();
$(".newsletter-block .IngeniMailSubscribeButton").appendTo(".newsletter-block .form-container").val("");

//form defaults for newsletter form
$(".newsletter-block .IngeniMailSubscribeEmailInput").val("enter e-mail address");
$(".newsletter-block .IngeniMailSubscribeEmailInput").live("click", function() {
	if($(this).val() == "enter e-mail address") $(this).val("");
});
$(".newsletter-block .IngeniMailSubscribeEmailInput").live("blur", function() {
	if($(this).val() == "") $(this).val("enter e-mail address");
});

//add new links to footer
$("#brighton_footer ul").prepend(' <li class="item"><a class="link " href="/"><span class="text">Home</span></a></li> ');
$("#brighton_footer ul").append(' <li class="item"><a class="link " href="/contact-us/"><span class="text">Contact</span></a></li> ');
$("#brighton_footer ul").append(' <li class="item"><a class="link " href="/sitemap/"><span class="text">Sitemap</span></a></li> ');


if( $("#google-map").length && $("#engineering").length && !$("#hsnav").length) {
	$("#google-map").prependTo("#engineering");
}



});
