reworked code into jquerytastic goodness