Update for Auto submenu

I had a function wich is checking if the element has a child.

And add the class "has-flyout" if it's true.

Then we don't need to add a class manually ;)