function autocom_card1_security(param)
{
  if ($(".sections LI").length < 2)
    $(".sections").hide();

  if (document.location.hash)
  {
    var hash = new String(document.location.hash);
    if (hash.substr(0,3) == '#Ts')
      param = hash.substr(2,2);
  }
  else
  {
    param = 's1'; // only first tab... comment this for set saved tab
  }
  if (param)
    autocom_card1_security_settab(param);
    
  $(".sections LI A").click(function(){
    var tab = $(this).attr('id');
    autocom_card1_security_settab(tab);
  });
}

function autocom_card1_security_settab(tab)
{
  $(".sections LI, .sections LI A").removeClass('active');
  $(".section-blocks").hide();
  if(tab)
  {
    $(".sections #"+tab).parent(".sections LI").addClass('active');
    $(".section-blocks#section-block-"+tab).show();
  }
}
 
function autocom_card1_swheads(tid)
{
  $("#img-"+tid).toggle();
  $("#head-"+tid).toggleClass('active');
  $("#img-"+tid+" IMG").each(function () { hs.close(this); });
}

function card_start_tiny(obj)
{
    if (e = tinyMCE.get(obj.id))
      tinyMCE.remove(e);
    $(obj).css("height", "500px");
    tinyMCE.execCommand("mceAddControl", false, obj.id);
}

$(function(){
  $("#content-main .map").click(function() { $(this).toggleClass("mapbig"); });
});
