replaced window.outerWidth

iOS 8 always returns 0 for window.outerWidth and window.outerHeight so
I replaced window.outerWidth with jQuery’s $(window).width().