trying to combine javascript with media queries