$(document).ready(function(){
$(".pon").mouseover(
function () {
$(this).animate({
backgroundColor:"#31302F"
}, 500 );
});
$(".pon").mouseout(function() {
$(this).animate({
backgroundColor:"#41403F"
}, 500 );
});
});
    
$(document).ready(function(){
$(".pn").mouseover(
function () {
$(this).animate({
backgroundColor:"#303030"
}, 500 );
});
$(".pn").mouseout(function() {
$(this).animate({
backgroundColor:"#393837"
}, 500 );
});
});


$(document).ready(function(){
$("ul.accordion").hide();
$("span.pon").click(function(){
$(this).parent().next().slideToggle();
});
});

$(document).ready(function(){
$("div.dropdown columns1").css({display: "none"}); 
$("span.ph").hover(function(){
$(this).parent().next().css({visibility: "visible",display: "none"}).slideDown(457);
},function(){
$(this).find('div.dropdown columns1').css({visibility: "hidden"});  
});
});




$.fn.Button=function(sel)
{
  var closed=true,
    th=this;
  $(sel).hide();
  $(this).removeClass('selected').click(function(){
        $(sel).toggle("fast");
        $(this).toggleClass("selected");
    closed=!closed;
    return false;
  });
  $(document).click(function(e){
    if(closed)
      return;
    var target=e.target||e.srcElement;
    while(target)
    {
      var ret=false;
      $(sel).each(function(){
        if(ret=target==this)
          return false;
      });
      if(ret)
        return;
      target=target.parentNode;
    }
    $(sel).hide('fast');
    $(th).removeClass('selected');
    closed=true;
  });
  return this;
}

$.fn.UlMenu=function()
{
  $.each(this,function(){
  $("li.submenu",this).hide();
    $("li:has(.sublnk)",this).click(function(){
      $(this).toggleClass("selected").next("li.submenu").slideToggle(300).css("display",function(){
          if($(this).css("display")=="list-item")
        return "block";
      });
    });
  });
return this;
}

$(function() {

  $( "#logindialog" ).dialog({
    autoOpen: false,
    width: 300
  });

  $('#loginlink').click(function(){
    $('#logindialog').dialog('open');
    return false;
  });
});

$(document).ready(function(){
  var tabContainers = $('#tabbs .tabcont');
    tabContainers.hide().filter(':first').show();
                
    $('#tabbs .tabmenu a').click(function () {
      tabContainers.hide();
      tabContainers.filter(this.hash).show();
      $('#tabbs .tabmenu a').removeClass('selected');
      $(this).addClass('selected');
      return false;
    }).filter(':first').click();
});


