a bit of js tweaking 

refactored to an immediately called anonymous functions to preserve the initial state of noConflict