I'm afraid I can't debug your custom javascript effectively through this forum. You would have to sign up for a premier support ticket and we could do screen sharing. Then you could describe exactly what you are trying to do and we could reproduce the issue in context on your site and debug in order to get it resolved.