Changed css and resize code make sense outside of jsfiddle context.