added initial modal dialog support. if screen size is less than 767, will not use modal.