// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(document).ready(function(){
  
  // support answer toggle
  	$(".question").click(function(){
  		// jQuery(this).siblings(".answer").toggle();
  		$(".answer").hide();
  		$(this).siblings(".answer").show();
  	});
  
  
  var colors = {
    highlight: '#333',
    blurred: '#666'
  };
  $('p.hint').parents('tr').find('p.hint').css({
    'color': colors['blurred']
  });
  $('input')
    .focus(function(){
      $(this).parents('tr').find('p.hint').css({
        'color': colors['highlight']
      });
    })
    .blur(function(){
      $(this).parents('tr').find('p.hint').css({
        'color': colors['blurred']
      });
    })
    
    
});
