NAME Effect.RoundedCorners - Rounds an elements' corners using CSS and the DOM SYNOPSIS Effect.RoundedCorners.roundCorners( "some_block_element" ); Effect.RoundedCorners.roundCorners( { "elementId": "some_block_element", "top": true, "bottom": false } ); DESCRIPTION This library uses DOM manipulation and CSS to round the corners of elements without the need for images. It is based on the "Nifty Corners" implementation by Alessandro Fulciniti described at http://pro.html.it/esempio/nifty/, but the code has been rewritten for clarity, and the API has been altered and simplified. FUNCTIONS This library provides one function, "roundCorners()". In its simplest form, you can simply pass it the name of an element. If you want more control, you can pass an object with the following properties: * elementId This key indicates which element should be rounded. * top * bottom Each of these properties should be a boolean, indicating whether or not the specified side of the element should be rounded. DOM CHANGES AND CSS The rounded corners effect is achieved by inserting a number of new, non-semnatic elements into the DOM inside the specified element. This implementation uses "" elements since they are inherently non-semantic anyway. For each side that is being rounded, a set of five "" elements is inserted, one parent element containing four others. The effect is achieved through the use of a set of very short (in height) elements, each with a different left and right border size, something like this: -----* ---*** --**** -***** -***** The dashes in the diagram represent the outside of the corner, and the asterisks the inside, so the above diagram is of the upper left corner. The border is styled so that it is the same color as the element *outside* the specified element. The rest of the element is styled so that the background is transparent. Adding the rounding increases the height of each element by 6px on the side that is rounded, so an element that is rounded on both top and bottom will end up 12px bigger. Rounding corners also requires the code to insert a new "