// JavaScript Document
/*$(document).ready(function() {
  $(".topnav").accordion({
    accordion:false,
    speed: 500,
    closedSign: '',
    openedSign: ''
  });
});*/

function confirmLink(theLink, theSqlQuery, key) {
  var is_confirmed = confirm(theSqlQuery);
  if (is_confirmed) {
    theLink.href += '/'+key;
  }
  return is_confirmed;
}

// Per la login box
$(document).ready(function(){
  $("form#login input")
    .each(function(){
      if (this.value) {
        $(this).prev().hide();
      }
    })
    .focus(function(){
      $(this).prev().hide();
    })
    .blur(function(){
      if (!this.value) {
        $(this).prev().show();
      }
    });
});

// News in homepage
$(document).ready(function(){
  $('#slider').bxSlider({
	mode: 'horizontal',	// 'horizontal', 'vertical', 'fade'
  });
});

