$(document).ready(function() {


$("h1:contains('ddhideh1')").remove();
$("h3:contains('ddhideh3')").remove();


//google search box
$("#googlesearchbox").appendTo("#brighton_menu");

//adding class for blog feed block
$("#brighton_three-column #brighton_col3 div.block:has(.feedreader_box)").addClass("blogcontainer");
$("div.blogcontainer").prepend("<h1>The Dean & Draper Blog</h1>");
$("#archives").appendTo("div.blogcontainer div.pad");

//adding class for testimonials block
$("#brighton_three-column #brighton_col1 div.block:has(.feedreader_box)").addClass("testimonials");
$("div.testimonials").prepend("<h1>Client Testimonials</h1>");
$(".testimonials div.ItemDetails").wrapInner("<span class='content-detail'></span>");
$(".testimonials tr:has(td.Item)").addClass("firstrow");
$(".testimonials td.Item div.ItemDetails").prependTo(".testimonials tr.firstrow td.Item");
$(".testimonials tr:has(td.AltItem)").addClass("secondrow");
$(".testimonials td.AltItem div.ItemDetails").prependTo(".testimonials tr.secondrow td.AltItem");
$("#readmore").appendTo("div.testimonials div.pad");
$(".testimonials div.ItemDetails").prepend("<div class='top'></div>");
$(".testimonials div.ItemDetails").append("<div class='bottom'></div>");



//adding class for newsletter block
$("#brighton_three-column #brighton_col3 div.block:has(.IngeniMailSubscribeContainer)").addClass("newsletter");
$("div.newsletter").prepend("<h1>Subscribe to the Dean & Draper Blog</h1>");
$(".IngeniMailSubscribeButton").val("");


//Assign default value to newsletter
$("#IngeniMailSubscribeEmailInput_279210").DefaultValue("Email Address");

//add class for manage account block
$("#brighton_three-column #brighton_col1 div.block:has(#fileaclaim)").addClass("fileaclaim");

//add class for manage account block
$("#brighton_three-column #brighton_col1 div.block:has(#manageaccount)").addClass("manageaccount");

// hide submenu if empty
if( ! $("#brighton_sub-menu ul li.first").length ) {
    $("#brighton_sub-menu").remove();
}

//move logos
$("#benefitsolutionslogo").prependTo("#brighton_col3");
$("#healthins").prependTo("#brighton_col3");
$("#fleetservices").prependTo("#brighton_col3");

//adding class for blog subscribe block
$("#brighton_two-column-right #brighton_col3 div.block:has(.IngeniMailSubscribeContainer)").addClass("blogsubscribe");
$("div.blogsubscribe").prepend("<h1>Subscribe to the Dean & Draper Blog</h1>");

//Assign default value to blog subscribe
$("#IngeniMailSubscribeEmailInput_278656").DefaultValue("Email Address");


//footer
$(".socialbookmarks").prependTo("#footerinfo");
$("#footerinfo").prependTo("#brighton_footer");
$(".privacy").appendTo(".copyright");
$("#brighton_footer div:has(.horizontal)").wrap("<div class='footermenu'></div>");
$(".footermenu").appendTo("#brighton_footer");


//new homepage
$('<div class="clear"/>').insertAfter("#brighton_col3, .three-row");
$("#homebottom").appendTo("#brighton_three-column");
$("div.newsletter").appendTo("#homebottom div.three-row");

});