if control.offset().top > $(window).outerHeight()

Added functionality if the position of the options menu extends past the visible window, then the position of the options goes above the selectbox. also added CSS classes if above or below the selectbox.

Using the slide transition will look funky if the options position is on top just because of how .slideDown() works