﻿//dynamically set the top positioning of elements under top events
if(document.getElementById("topeventschild") != null)
{
	var topeventheight = document.getElementById("topeventschild").parentNode.clientHeight;
	var rightfloat = document.getElementById("dynamictopmargin");
	rightfloat.style.top = topeventheight + 20 + "px";
}

$(function(){				
	if($("#testimonial").length > 0)
	{
	    var testiBottomOffset = $("#testimonial").offset().top + $("#testimonial").height();
	    
	    if(testiBottomOffset >= $("#footer_content").offset().top)
	    { 
		    var marginTop = testiBottomOffset + 50 - $("#footer_content").offset().top;
		    $("#footer_content").css({"margin-top" : marginTop + "px"});
		}
	}
});


