checking device width using js, falling back on ie7