Enclosing sidebar and search js in immediately invoked function expressions to avoid conflicts