Adding js to expand medium panels