Main reference for the bxSlider jQuery plugin:
http://bxslider.com/
https://github.com/stevenwanderski/bxslider-4
grab the latest files from the “dist” folder.
Examples with WordPress:
http://www.noeltock.com/web-design/wordpress/tutorial-wordpress-bxslider/
http://www.wrapcode.com/wordpress/custom-wordpress-content-slider-with-various-features-bxslider/
How to add a javascript to the WP_Footer
http://oikos.org.uk/2012/04/tech-notes-adding-scripts-using-wordpress-print_footer_scripts-hook/
https://gist.github.com/srikat/11533776
Ideas about the widget:
https://github.com/Automattic/jetpack/blob/master/modules/widgets/gallery.php
https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/media.php
https://core.trac.wordpress.org/browser/trunk/src/wp-includes/widgets/class-wp-widget-categories.php