
$(document).ready(function () {
    $('.subscribe').click(function(){
       $('#subscribe_box').css('display', 'block');
       $('#subscribe_box').animate({
        width: "249px",
        height: "160px",
        right: "40px",
        bottom: "9px"
      }, 500);
    });
    $('.close').click(function(){
       $('#subscribe_box').animate({
        width: "115px",
        height: "53px",
        right: "42px",
        bottom: "10px"
      }, 500, function() {
          $('#subscribe_box').css('display', 'none');
      });
    });

//    $('.sf-sidemenu, .sf-menu').children('li').each(function() {
//       if ($(this).children('ul').length == 1) {
//           if ($(this).children('ul').children('li').length > 1) {
//               $(this).children('a').attr('href', '#');
//           } else {
//               var url = $(this).children('ul').children('li').children('a').attr('href');
//               $(this).children('a').attr('href', url);
//               $(this).children('ul').remove();
//           }
//       }
//    });

    $('ul.sf-menu').superfish({
            delay:       1000,                            // one second delay on mouseout
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
    });

    $('.current-cat').parents('ul').addClass('current-cat');
    var ahtmlx = $('.current-cat').children('a').text();
    $('.current-cat').children('a').html('<span class="subdeco"></span>'+ahtmlx);

    $('ul.sf-sidemenu').superfish({
            delay:       1000,                            // one second delay on mouseout
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
    });

});
