A Jquery script to dynamically switch content into different views