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

$(function() {
  
	// $('#flash').fadeOut(4000);
	
	// Use this example, or...
	//$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
	// This, or...
	//$('#gallery a').lightBox(); // Select all links in object with gallery ID
	// This, or...
	$('a.lightbox').lightBox(); // Select all links with lightbox class
	// This, or...
	//$('a').lightBox(); // Select all links in the page
	// ... The possibility are many. Use your creative or choose one in the examples above

	/*
	$('.fecha').attachDatepicker({showOn: 'both', buttonImage: '/images/calendar.png', 
  buttonImageOnly: true, showWeeks: true, firstDay: 1, changeFirstDay: false, yearRange: '2000:2020',
  minDate: new Date(2000, 0, 2), maxDate: new Date(2020, 0, 6)});
  */
  
	$('.cerrar').click(function(){
		$('.cesta').slideToggle('slow');
		$('.cerrar').css("display", "none");
		$('.abrir').css("display", "block");
	});
	$('.abrir').click(function(){
		$('.cesta').slideToggle('slow');
		$('.abrir').css("display", "none");
		$('.cerrar').css("display", "block");
	});
	
	
// Efecto al pasar sobre una fila de una tabla 
 $(".index-tabla table tbody tr").mouseover( function() {
  if ($(this).hasClass("fila-par") || $(this).hasClass("fila-impar")) {
    $(this).addClass("fila-encima");
  }
  }).mouseout( function() {
    if($(this).hasClass("fila-par") || $(this).hasClass("fila-impar")){
      $(this).removeClass("fila-encima");
    }
  });  

});
