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

// This is all jQuery stuff...someday we'll pare away other libs and won't need the $j
var $j = jQuery.noConflict();

$j(document).ready(function(){
  // Element toggle
  $j('a.toggle').click(
    function(){
      var txt = $j(this).html();
      var el = '#' + $j(this).attr('href')
      switch(txt) {
        case 'show': 
          $j(this).html('hide');
          break;
        case 'hide':
          $j(this).html('show');
          break;
        case '+':
          $j(this).html('-');
          break;
        case '-':
          $j(this).html('+');
          break;
      }
      $j(el).toggle();
      return false;
    }
  );
  
  // Collapse a toggle-able element--we use JS to do this so it degrades w/o JS
  $j('.collapsed').css('display', 'none');

	// Create a lightbox
	$j('a[rel=lightbox]').lightBox({fixedNavigation:true});
	
});