This is a simple demonstrate code for how to create a jQuery plugin which integrates WP Media Uploader into your own Theme or Plugin options. Just download and extract all files into your theme directory, then require wptuts.php within functions.php file.
leepham/Wordpress-Media-Uploader-Jquery
Integrating the WP Media Uploader Into Your Theme With jQuery
PHP