// open and close language panel

$(".lang-btn").click(function(){
	$("#panel").slideToggle("slow");
	$(this).toggleClass("active"); return false;
});

$('.rounded').corner("6px");
$('#nav_mini .current a').corner("6px");
$('#section_header').corner("tr 5px").corner("tl 5px");

/// Innerfade Slideshows

$('.fade').innerFade({
    speed: 'slow',
    timeout: 3000,
    type: 'sequence',
    loop: false
});

$('.fadeloop').innerFade({
    speed: 'slow',
    timeout: 6000,
    type: 'sequence',
    loop: true
});

// Calendar Bubbles

$('a.event').each(function()
{
$(this).qtip(
{
   content: {
      text: $(this).prev('.event_bubble'),
      title: {
         text: $(this).attr('title'),
         button: '<img src="/images/css/close.png" title="close" alt="close" />'
      }
   },
   position: {
      corner: {
         tooltip: 'bottomMiddle',
         target: 'topMiddle'
      },
      adjust: {
         screen: true
      }
   },
   show: 'click',
   hide: 'unfocus',
   style: {
      background: 'white',
      width: 350,
      title: {
        'background-color': '#CEE8F4',
        'font-weight': 'normal'
    },
      border: {
         color: '#ADD9ED',
         width: 2,
         radius: 3
      },
      tip: true
   }
});
});

// Dropdown menus for IE6
<!--//--><![CDATA[//><!--

sfHover = function() {
  var sfEls = document.getElementById("nav_main").getElementsByTagName("LI");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      this.className+=" sfhover";
    }
    sfEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

