/*
*       Site skripty
*
*/
var lang='cz';    


$(document).ready(
  function adminDocumentLoad()
  {
    // corners
    DD_roundies.addRule('.rounded', '5px', true);
    DD_roundies.addRule('.rounded-top', '5px 5px 0 0', true);
    DD_roundies.addRule('.rounded-topleft', '5px 0 0 0', true);
    DD_roundies.addRule('.rounded-topright', '0 5px 0 0', true);
    DD_roundies.addRule('.rounded-bottomleft', '0 0 5px 0', true);
    DD_roundies.addRule('.rounded-bottomright', '0 0 0 5px', true);
    
    
    $('.menu ul.menu-level-0').tabs('.submenu .submenu-item', 
    { 
      current : 'selected', 
      tabs: '.menu .menu-level-0 li.menu-level-0 > a', 
      //event: 'mouseover',
      initialIndex: $('.menu-level-0 li').index($('.menu-level-0 li.menu-item-selected'))
    });
    
    $('.menuItem_10800020 > a').click(function () {document.location='/'+lang+'/profil.html';});
    $('.menuItem_10800023 > a').click(function () {document.location='/'+lang+'/pravni-sluzby.html';});
    $('.menuItem_10800026 > a').click(function () {document.location='/'+lang+'/advokati-spolecnici.html';});
    $('.menuItem_10800568 > a').click(function () {document.location=$(this).attr('href');});
    
    $('.menuItem_10800035 > a').click(function () {document.location=$(this).attr('href');});
    $('.menuItem_10800032 > a').click(function () {document.location=$(this).attr('href');});
    $('.menuItem_10800029 > a').click(function () {document.location=$(this).attr('href');});
    
    
    $('.popup-menu').parent().hoverIntent(
    {
      timeout: 200, 
      over: function() 
      {
        $(this).children('.popup-menu').show();
      }, 
      out: function() 
      {
        $(this).children('.popup-menu').hide();
      }
    });
    
    $('.flags').parent().hoverIntent(
    {
      timeout: 200, 
      over: function() 
      {
        $(this).children('.flags').show();
      }, 
      out: function() 
      {
        $(this).children('.flags').hide();
      }
    });
  });
  
function addContact()
{
    jQuery.getJSON("/CMSSystem.aspx?cm_action=ajax_addcontact&Name="+$('#contactName').val()+"&email="+encodeURIComponent($('#contactMail').val()), 
            function(json, status) 
                  {
                    if (json.Status == "OK")
                      alert('Váš požadavek byl zpracován.');
                    else
                      alert('Chyba. ' + json.Message);
                 });
}  
  

