/**
 * jquery.media_gallery 1.0.1 - Using existing thumbnails and media files (such
 *                              as YouTube thumbnails and videos) create a
 *                              clickable gallery.
 * 
 * Copyright (c) 2009 Blake Schwendiman
 * http://www.thewhyandthehow.com
 *
 * Licensed under MIT license
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Launch  : April 2009
 * Version : 1.0.0 - Apr 01 2009
 * Version : 1.0.1 - Apr 14 2009
 *
 */
;(function($){$.fn.media_gallery=function(options){var opts=$.extend({},$.fn.media_gallery.defaults,options);var cur_item=0;return this.each(function(){$this=$(this);var o=$.meta?$.extend({},opts,$this.data()):opts;$(o.media_container,$this).hide();$(o.thumbnail_element,$this).bind('click',function(){$(o.target_container).html($(o.media_container,$(this).parent()).html());}).css({'cursor':'pointer'});if(o.auto_select_first&&cur_item==0){$(o.target_container).html($(o.media_container,$this).html());}
cur_item++;});};$.fn.media_gallery.defaults={target_container:'#media_gallery',media_container:'div',auto_select_first:true,thumbnail_element:'img'};})(jQuery);
