hi,
It's just a quick tutorial regarding loading javascript exactly when you need it and where you need it and no place else...
http://twentyfiveautumn.com/2012/03/14/loading-javascript-on-the-frontend-with-your-wordpress-plugin/
I hope this is helpful
Ray