Changed email layout to be called 'email-layout' so it doesn't overlap.
Added a bit of js to change the id according to view.
Created a function for settig menu layout and email layout.
Removed commented out code.