I'm working on an animated menu: two rows of tabs scrolling on mouse over, as they might be wider than their container. I want the upper tab to load the content of the lower one without refreshing the browsers window.
I have a following structure: one div for the upper row containing one ul (this works fine), another div for the lower row, empty when the page loads, and another hidden div containing multiple divs (each with one ul) to be loaded by one of my functions.
One of my functions should clone the content chosen by clicking on the upper row to the lower row. This works fine. The other is responsible for sliding of the rows. It works only if I put an ul to the second div manually, but then the ul there is cloned, it stops working. I assume it's the case of refreshing variables in the second function, but I can't cope with it. I'll be grateful for any hint.
Here are the functions: