Fixed issue with the inner content wrapping of panels

Panels with no inner content were still having their empty content wrapped in a div.  This was also appending child divs on panels with tags such as img which should not have any children.  Added a not empty selector to remove empty panels from the matched elements.