/* Resize item vertically based on viewport height. To use, call the function and pass in the parameters below. (eg. resizeItem("mydiv",190,200); ) target = div to be resized vertically top = distance, in px, from top of viewport to top of target bottom = distance, in px, from the bottom of target to the bottom of the viewport */ function resizeItem(target,top,bottom) { getWindowSize() var viewport = myHeight; var targetHeight = viewport - top - bottom; $( "#"+target ).height( targetHeight ); } /* Function to add rounded corners to divs. To use, assign the class "roundbox" plus the desired color: green or blue. (eg.
). Must be used for boxes on white bg. */ function roundBoxes(color) { $("div.roundbox").filter("."+color).each( function() { $(this).append(""); $(this).append(""); $(this).append(""); $(this).append(""); } ); }