// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

////
// Behaviors
jQuery(document).ready(function($){
  
  jQuery.Lightbox.construct({
    show_info: true,
    show_extended_info: true,
    download_link: true,
		show_linkback:	false,
		opacity: 0.8,
		text: {
			image:		'Photo',
			download: 'See this photo on Flickr.',
			help: {
				close:		'',
				interact:	''
			},
			about: {
				text: 	'MossMan Scuba',
				title:	'',
				link:	'http://mossmanscuba.com'
			}
		},
		files: {
			js: {
				lightbox:	  '/javascripts/jquery.lightbox.js',
				colorBlend:	'/javascripts/jquery.color.js'
			},
			css: {
				lightbox:	'/stylesheets/jquery.lightbox.css'
			},
			images: {
				prev:		  '/images/prev.gif',
				next:		  '/images/next.gif',
				blank:		'/images/blank.gif',
				loading:	'/images/loading.gif'
			}
		}
	});

	jQuery(".lightbox-slideshow").click(function(event){
	  event.preventDefault();
	  jQuery('img[@rel*=lightbox-flickr]:first').trigger('click');
	});
	
	jQuery("a.gallery").click(function(event){
	  event.preventDefault();
	  id = jQuery(this).attr("ref");
	  //jQuery('img[@rel*=lightbox-flickr]:first').trigger('click');
	  //alert("here" + jQuery("#photo-" + id).attr("rel"));
	  jQuery("#photo-" + id).trigger('click');
	});
	 
	jQuery(".vidtabs ul").idTabs();
	
});