$(document).ready(function() {
var buttons = document.getElementById("addThisWrapper");
var topText = document.getElementById("headerFrameHomeWrapper");
var bigSS = document.getElementById("bigSlideShow");
var textBelowBigSS = document.getElementById("headerFrameBelowHomeWrapper");
var leftUpperCol = document.getElementById("leftUpperColumnHomeWrapper");
var rightUpperCol = document.getElementById("rightUpperColumnHomeWrapper");
var leftSmallSS = document.getElementById("smallSlideShowLeft");
var rightSmallSS = document.getElementById("smallSlideShowRight");
var isTextBelowSmallSS = document.getElementById("headerFrameBelowSmallHomeTempWrapper");
var textBelowSmallSS = document.getElementById("headerFrameBelowSmallHomeWrapper");
var theFlyer = document.getElementById("sideBarHomeFrame");
var leftLowerCol = document.getElementById("leftColumnHomeWrapper");
var realEstate = document.getElementById("realEstateListings");
var rightLowerCol = document.getElementById("rightColumnHomeWrapper");
var bottomPageText = document.getElementById("footerHomeWrapper");
var theBottomPictures = document.getElementById("myPicturesHomeWrapper");

//==================================== SHOW BODY CONTENT
//show body content that is hidden in css and hid dummy nav bar
$('#navBarDivNoScript').css({ display:"none" });
$('#navBarDiv').css({ display:"block" });
$('#bodyContentScriptArea').css({ display:"block" });
$('#footNavBar').css({ display:"block" });

//==================================== HEADER TOP TEXT
//top header text to buttons
if(buttons != null) {
$('#headerFrameHomeWrapper').css({ marginTop:"18px" });
}
//top header text to menu
if(buttons == null) {
$('#headerFrameHomeWrapper').css({ marginTop:"8px" });
}

//==================================== BIG SLIDE SHOW
//move big slide show down for buttons
if(buttons != null && topText == null) {
$('#bigSlideShow').css({ marginTop:"30px" });
}
//move big slide show down from nav bar
if(buttons == null && topText == null) {
$('#bigSlideShow').css({ marginTop:"18px" });
}
//move big slide show up for top of page text
if(topText != null) {
$('#bigSlideShow').css({ marginTop:"5px" });
}

//==================================== TEXT BELOW BIG SLIDE SHOW
//text below big slide show to buttons
if(buttons != null && topText == null && bigSS == null) {
$('#headerFrameBelowHomeWrapper').css({ marginTop:"17px" });
}
//text below big slide show to menu
if(buttons == null && topText == null && bigSS == null) {
$('#headerFrameBelowHomeWrapper').css({ marginTop:"7px" });
}
//text below big slide show to top text
if(topText != null && bigSS == null) {
$('#headerFrameBelowHomeWrapper').css({ marginTop:"0px" });
}

//==================================== LEFT SMALL SLIDE SHOW
//left small slide to menu
if(topText == null && bigSS == null && textBelowBigSS == null) {
$('#smallSlideShowLeft').css({ marginTop:"19px" });
}
//left small slide to top text
if(topText != null && bigSS == null && textBelowBigSS == null) {
$('#smallSlideShowLeft').css({ marginTop:"10px" });
}
//left small slide to big slide show
if(bigSS != null && textBelowBigSS == null) {
$('#smallSlideShowLeft').css({ marginTop:"10px" });
}
//left small slide to text below big slide show
if(textBelowBigSS != null) {
$('#smallSlideShowLeft').css({ marginTop:"11px" });
}

//==================================== BOTH SMALL SLIDE SHOWS
//both small slide shows to buttons
if(buttons != null && leftSmallSS != null && rightSmallSS != null && topText == null && bigSS == null && textBelowBigSS == null) {
$('#smallSlideShowLeft').css({ marginTop:"31px" });
$('#smallSlideShowRight').css({ marginTop:"31px" });
}
//both small slide shows to menu
if(buttons == null && leftSmallSS != null && rightSmallSS != null && topText == null && bigSS == null && textBelowBigSS == null) {
$('#smallSlideShowLeft').css({ marginTop:"19px" });
$('#smallSlideShowRight').css({ marginTop:"19px" });
}

//==================================== RIGHT SMALL SLIDE SHOW
//right small slide show to buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null) {
$('#smallSlideShowRight').css({ marginTop:"30px" });
}
//right small slide show to menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null) {
$('#smallSlideShowRight').css({ marginTop:"19px" });
}
//right small slide show to top text
if(topText != null && bigSS == null && textBelowBigSS == null) {
$('#smallSlideShowRight').css({ marginTop:"10px" });
}
//right small slide show to big slide show
if(bigSS != null && textBelowBigSS == null) {
$('#smallSlideShowRight').css({ marginTop:"10px" });
}
//right small slide show to text below big slide show
if(textBelowBigSS != null) {
$('#smallSlideShowRight').css({ marginTop:"11px" });
}

//==================================== LEFT UPPER COL
//upper left col to menu
if(topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null) {
$('#leftUpperColumnHomeWrapper').css({ marginTop:"10px" });
}

//==================== LEFT  AND RIGHT UPPER COLS ONLY AND ALINGED FOR BUTTONS
//upper cols to buttons
if(buttons != null && leftUpperCol != null && rightUpperCol != null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && rightSmallSS == null) {
$('#leftUpperColumnHomeWrapper').css({ marginTop:"22px" });
}

//==================================== RIGHT UPPER COL
//right upper col to buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && rightSmallSS == null) {
$('#rightUpperColumnHomeWrapper').css({ marginTop:"22px" });
}
//right upper col to menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null && rightSmallSS == null) {
$('#rightUpperColumnHomeWrapper').css({ marginTop:"10px" });
}

//==================================== HEAD TEXT BELOW SMALL SLIDE SHOWS
//head text below small slide shows to buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null) {
$('#headerFrameBelowSmallHomeWrapper').css({ marginTop:"13px" });
}
//head text below small slide shows to menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null) {
$('#headerFrameBelowSmallHomeWrapper').css({ marginTop:"5px" });
}
//head text below small slide shows to small slide shows
if((leftSmallSS != null && leftUpperCol == null) || (rightSmallSS != null && rightUpperCol == null)) {
$('#smallSlideShowRight').css({ marginBottom:"-5px" });
$('#smallSlideShowLeft').css({ marginBottom:"-5px" });
}
//head text below small slide shows to upper left and right cols
if(leftUpperCol != null || rightUpperCol != null) {
$('#headerFrameBelowSmallHomeWrapper').css({ marginTop:"-10px" });
}

//==================================== BOTTOM FOOTER TEXT
//bottom text to buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null&& theFlyer == null && leftLowerCol == null && realEstate == null && rightLowerCol == null) {
$('#footerHomeWrapper').css({ marginTop:"16px" });
}
//bottom text to menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null&& theFlyer == null && leftLowerCol == null && realEstate == null && rightLowerCol == null) {
$('#footerHomeWrapper').css({ marginTop:"5px" });
}

//==================================== BOTTOM ALBUM PICTURES
//move the bottom pictures for buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null && theFlyer == null && leftLowerCol == null && realEstate == null && rightLowerCol == null && bottomPageText == null) {
$('#myPicturesHomeWrapper').css({ marginTop:"28px" });
}
//move the bottom pictures for menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null && theFlyer == null && leftLowerCol == null && realEstate == null && rightLowerCol == null && bottomPageText == null) {
$('#myPicturesHomeWrapper').css({ marginTop:"16px" });
}
//move the bottom pictures for bottom footer text
if(bottomPageText != null) {
$('#myPicturesHomeWrapper').css({ marginTop:"10px" });
}






//==================================== 4 COLUMN PAGE LAYOUT ====================================
//THIS DOES NOT USE #leftSideBarWrapper AND #rightSideBarWrapper

//THIS START THE IF FOR THE DIFFERENT LAYOUTS
//switch the page layout for text below small slide show
if(isTextBelowSmallSS != null) {
$('#sideBarTopHomeLeft').css({ marginLeft:"50px" , marginBottom:"0px" , marginRight:"20px" });
$('#sideBarTopHomeRight').css({ marginBottom:"0px" , marginRight:"35px" });
$('#realEstateListings').css({ marginLeft:"395px" , paddingLeft:"10px" , paddingRight:"35px" });
$('#rightColumnHomeWrapper').css({ marginRight:"35px" });












}
else {
//==================================== 2 COLUMN PAGE LAYOUT ====================================
//THIS USES #leftSideBarWrapper AND #rightSideBarWrapper

//right side of page when nothing is on left side
if(leftSmallSS == null && leftUpperCol == null && theFlyer == null && leftLowerCol == null) {
$('#leftSideBarWrapper').css({ height:"1px" });
}

//==================================== LEFT UPPER COL - 2 COLUMN PAGE
//left upper col to small slide show
if(leftSmallSS != null && rightUpperCol == null) {
//$('#leftUpperColumnHomeWrapper').css({ marginTop:"5px" });
}
//==================================== FLYER - 2 COLUMN PAGE
//flyer to menu when buttons show or not
if(topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null) {
$('#sideBarHomeFrame').css({ marginTop:"3px" });
}
//flyer to top herader text
if(topText != null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null) {
$('#sideBarHomeFrame').css({ marginTop:"-3px" });
}
//flyer to big slide show
if(bigSS != null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null) {
$('#sideBarHomeFrame').css({ marginTop:"-3px" });
}
//flyer to text below big slide show
if(textBelowBigSS != null && leftSmallSS == null && leftUpperCol == null) {
$('#sideBarHomeFrame').css({ marginTop:"-3px" });
}

//==================================== REAL ESTATE LISTINGS - 2 COLUMN PAGE
//real estate to buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && rightSmallSS == null) {
$('#realEstateListings').css({ marginTop:"23px" });
}
//real estate to menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null && rightSmallSS == null) {
$('#realEstateListings').css({ marginTop:"16px" });
}
//real estate to text below big slide show
if(textBelowBigSS != null && rightSmallSS == null && rightUpperCol == null) {
$('#realEstateListings').css({ marginTop:"7px" });
}
//real estate to small slide show
if(rightSmallSS != null && rightUpperCol == null) {
$('#realEstateListings').css({ marginTop:"30px" });
}
//real estate to text small slide show
if(rightUpperCol != null) {
$('#realEstateListings').css({ marginTop:"20px" });
}

//==================================== LOWER LEFT COL - 2 COLUMN PAGE
//left lower col to menu
if(topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && theFlyer == null) {
$('#leftColumnHomeWrapper').css({ marginTop:"10px" });
}
//left lower col with text at top
if(topText != null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && theFlyer == null) {
//$('#leftColumnHomeWrapper').css({ marginTop:"-10px" });
}
//left lower col to bottom of big slide show
if(bigSS != null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && theFlyer == null) {
//$('#leftColumnHomeWrapper').css({ marginTop:"10px" });
}
//left lower col to text at bottom of big slide show
if(textBelowBigSS != null && leftSmallSS == null && leftUpperCol == null && theFlyer == null) {
//$('#leftColumnHomeWrapper').css({ marginTop:"0px" });
}
//left lower col for small slide show
if(leftSmallSS != null && leftUpperCol == null && theFlyer == null) {
$('#leftColumnHomeWrapper').css({ marginTop:"5px" });
}
//left lower col for upper left col text
if(leftUpperCol != null && theFlyer == null) {
$('#leftColumnHomeWrapper').css({ marginTop:"5px" });
}

//==================================== LOWER LEFT COL WITH LOWER RIGHT COL - 2 COLUMN PAGE
//left and right col to buttons
if(buttons != null && leftLowerCol != null && rightLowerCol != null && topText == null && bigSS == null && textBelowBigSS == null && leftSmallSS == null && leftUpperCol == null && rightSmallSS == null && rightUpperCol == null && theFlyer == null && realEstate == null) {
$('#leftColumnHomeWrapper').css({ marginTop:"21px" });
$('#rightColumnHomeWrapper').css({ marginTop:"21px" });
}

//==================================== LOWER RIGHT COL - 2 COLUMN PAGE
//lower right col to buttons
if(buttons != null && topText == null && bigSS == null && textBelowBigSS == null && rightSmallSS == null && rightUpperCol == null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"21px" });
}
//lower right col to menu
if(buttons == null && topText == null && bigSS == null && textBelowBigSS == null && rightSmallSS == null && rightUpperCol == null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"10px" });
}
//lower right col to big slide show
if(bigSS != null && textBelowBigSS == null && rightSmallSS == null && rightUpperCol == null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"10px" });
}
//lower right col top header text
if(topText != null && bigSS == null && textBelowBigSS == null && rightSmallSS == null && rightUpperCol == null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"12px" });
}
//lower right col to text big slide show
if(textBelowBigSS != null && rightSmallSS == null && rightUpperCol == null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"10px" });
}
//lower right col to small slide show
if(rightSmallSS != null && rightUpperCol == null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"5px" });
}
//lower right col to upper right col text
if(rightUpperCol != null && realEstate == null) {
$('#rightColumnHomeWrapper').css({ marginTop:"5px" });
}

}//end else - 2 COLUMN PAGE






});
