ajax loading optimized.. some problems with inside javascripts