Added support for layouts based on jQuery selector