$(document).ready(function(){ 

  $("ul.sf-menu").superfish({  dropShadows: false, delay: 500, speed: 100 }); 

  $('#user-register #edit-field-account-is-artist-value').click(function() {
    if (!$('#user-register #artist-info').is(":visible")) {
      $('#user-register #artist-info').fadeIn();
    } else {
      $('#user-register #artist-info').fadeOut();
    }
  });

  if ($('#user-register #edit-field-account-is-artist-value').is(':checked')) {
    $('#user-register #artist-info').show();
  }
  
  $('#user-register #edit-field-artist-allow-site-visits-value').click(function() {
    if (!$('#user-register #studio-info').is(':visible')) {
      $('#user-register #studio-info').fadeIn();
    } else {
      $('#user-register #studio-info').fadeOut();
    }
  });

  if ($('#user-register #edit-field-artist-allow-site-visits-value').is(':checked')) {
    $('#user-register #studio-info').show();
  }

  $('p.toggle').hover(function() { $(this).addClass('pointer hover'); }, function() { $(this).removeClass('pointer hover'); });
  $('p.toggle').click(function() { $(this).next('div.hidden').slideToggle(); });

  $('#workspace-add-form').next('table').next('table').find('th:nth-child(1)').hide(); 
  $('#workspace-add-form').next('table').next('table').find('th:nth-child(3)').hide(); 
  $('#workspace-add-form').next('table').next('table').find('th:nth-child(4)').hide(); 
  $('#workspace-add-form').next('table').next('table').find('th:nth-child(2)').css('width', '450px'); 

  $('#workspace-add-form').next('table').next('table').find('td:nth-child(1)').hide(); 
  $('#workspace-add-form').next('table').next('table').find('td:nth-child(3)').hide(); 
  $('#workspace-add-form').next('table').next('table').find('td:nth-child(4)').hide(); 

  // side search bars
  $('#views-exposed-form-gallery-page-1 .views-exposed-widget label, #views-exposed-form-gallery-page .views-exposed-widget label').addClass('right-arrow');
  $('#views-exposed-form-gallery-page-1 .views-exposed-widget label, #views-exposed-form-gallery-page .views-exposed-widget label').click(function() { 
     if ($(this).next().is(':visible')) {
       $(this).next().slideUp(); 
       $(this).removeClass('down-arrow').addClass('right-arrow');
     } else {
       $(this).next().slideDown(); 
       $(this).removeClass('right-arrow').addClass('down-arrow');
     }
     
  });

}); 




