Run a script with an anonymous function

Hello friends,
I have a serious and very hard (i think) problem for you.
In my template a have a div that has to run a script with an anonymous function.

Please help me to solve it.
I am trying 5 days now

Thank you in advance for your time