function ext_showlayer(show,hide) {
    document.getElementById(show).style.display = 'block';
    document.getElementById(hide).style.display = 'none';
}

$(function() {
  $(".ui-accordion").accordion({
  	autoHeight: false,
  	navigation: false,
    collapsible: true
  });
});

$.widget("custom.catcomplete", $.ui.autocomplete, {
  _renderMenu: function( ul, items ) {
  	var self = this,
  	  currentCategory = "";
  	$.each( items, function( index, item ) {
      if ( item.category != currentCategory ) {
      	ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
      	currentCategory = item.category;
      }
      self._renderItem( ul, item );
  	});
  }
});

$(function() {
  $(".ui-tabs").tabs({
    cookie: {
      expires: 3
    }
  });
});

$(function() {
  $(".ui-tabs-nocookie").tabs();
});

$(function() {
  $(".ui-radio").buttonset();
});

$(document).ready(function(){
  $(".tooltip, a, input, div, span").tooltip({
    track: true,
    delay: 100,
    showBody: "::",
    opacity: 0.85
  });
});

$(function() {
  $(".ui-date").datepicker({
    showOtherMonths: true,
    selectOtherMonths: true,
    dateFormat: 'yy-mm-dd',
    showAnim: 'blind'
  });
});

$(function(){
 $('.players_link').click(function(){
    $('#players_list').toggle("fast");
 });
});

$(function(){
 $('#top').click(function(){
    window.scrollTo(0,0);
 });
});

