$(document).ready(function() {
  /*$(':submit').each(function(){
    $(this).hide().after('<span class="input-button">').next('span.input-button').text($(this).val()).click(function(){
        $(this).prev(':submit').click();
    });
  });*/
  Cufon.replace(".box h2, #contact span, #contact p, #sale h2, .box .next, .price, #content h2, .ui-tabs-na, #left_column h3.ui-accordion-header, a.button, span.input-button");
  Cufon.replace("#content h2");
  $(".tabs").tabs();
  $( ".tabs" ).tabs( "option", "selected", 0 );
  $(".galleryTabs").tabs();
  $(".accordion").accordion({
    autoHeight: false,
	animated: false
  });
  // menu active
  
   // highlight tab function
  var path = location.pathname;
  var active = 'item6';
  switch (path){
	case "/":
	  active = 'item0';
	  break;
	case "/programok":
	  active = 'item1';
	  break;
	case "/tudnivalok":
	  active = 'item2';
	  break;
	case "/bemutatkozas":
	  active = 'item3';
	  break;
	case "/galeriak":
	  active = 'item4';
	  break;
	case "/vendegkonyv":
	  active = 'item5';
	  break;
  }
  
  $('#navigation ul').addClass(active);
  
  $('.gallery-items a').lightBox();
  
  $('.faq a.more').click(function(){
	  $(this).parent().children('div.more').show();
	  $(this).parent().children('a.more').hide();
	  $(this).parent().children('div.less').hide();
	  $(this).parent().children('a.less').show();
  });
  
  $('.faq a.less').click(function(){
	  $(this).parent().children('div.more').hide();
	  $(this).parent().children('a.more').show();
	  $(this).parent().children('div.less').show();
	  $(this).parent().children('a.less').hide();
  });
  
});
