I personally use the next code in functions.php to be able to load jQuery and hang variables that I have to use within my jQuery script (width and height from the publish thumbnail).

<?php
if( !is_admin()){
   wp_deregister_script('jquery');
   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"), false, '');
   wp_enqueue_script('jquery');
   wp_localize_script( 'jquery', 'MyThumbSize', array( 'width' => '240px','height' => '160px' ) );
}?>

These variables are difficult coded (240px and 160px) but I must determine if you'll be able to instantly obtain these values from the Wordpress function and what will be the syntax (Since I am a bad coder).

I understand these configurations are positioned through the admin the dashboard under Media Configurations.

You will get the media dimensions like so:

   <?php 
    $thumbnail_width = get_option( 'thumbnail_size_w' );
        $thumbnail_height = get_option( 'thumbnail_size_h' );
        $medium_width = get_option( 'medium_size_w' );
        $medium_height = get_option( 'medium_size_h' );
        $large_height = get_option( 'large_size_w' );
        $large_width = get_option( 'large_size_w' );
   ?>

Eliminate the php tags if you work with this inside your functions.

So that your code need to look such as this i believe:

<?php
$thumbnail_width = get_option( 'thumbnail_size_w' );
$thumbnail_height = get_option( 'thumbnail_size_h' );

if( !is_admin()){
   wp_deregister_script('jquery');
   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"), false, '');
   wp_enqueue_script('jquery');
   wp_localize_script( 'jquery', 'MyThumbSize', array( 'width' => $thumbnail_width,'height' => $thumbnail_height ) );
}?>