$(function(){
  
  togglePanel = function(link)
  {
    if($(link).hasClass('hide-panel'))
    {
      $('#side-panel').hide();
      $('#content').addClass("full-screen");
      $(link).text('show panel').attr('class', 'show-panel');
    } else {
      $('#side-panel').show();
      $('#content').removeClass("full-screen");
      $(link).text('hide panel').attr('class', 'hide-panel');    
    }
  }
  toggleSection = function(link, parent, item, cls_a, cls_b)
  {
    item = $(link).parents(parent).children(item);
    visible = $(link).hasClass(cls_a);
    
    if(visible)
    {
      $(item).hide();
      $(link).attr('class',cls_b).text('more');
    } else {
      $(item).show();
      $(link).attr('class',cls_a).text('less');
    }
  }
  
  $('.required').each(function(){
    $(this).parent().append('<span class="icn-required">*</span>');
    //$(this).css("background","red")
    
  });

});
