Beginner trying to use jQuery in a custom location, but not sure where to insert the code At the moment, I'm working on a website that requires an on-mouse over effect where the things that are going to be displayed is an image. I figure that the best way to go about this is by using jQuery. 

Being a beginner at Drupal, I've noticed that all of the content in this website is generated from database calls. I was wondering if there was a module or a way to see how these calls are made so that I may be insert the correct code at the right place.
If you are customising a theme, I would add a custom jquery script you have written. In your themes template.php you can then simply call the .js file from within the theme folder.

For example you could add this to your template.php file:

drupal_add_js(drupal_get_path('theme', 'YOUR_THEME_NAME') . '/js/jquery.custom.js');


in the jquery.custom.js file you could have something like this:

(function($) {

 $(document).ready(function() {

  // hover effect
  $(".hover_effect").hover(function() { 
    //add effects here 
  }

 }); 

}(jQuery));