// JavaScript Document
$(document).ready(function() {
   	/*	Image Overlay http://flowplayer.org/tools/demos/overlay/index.html */
	$("div[rel]").overlay();
});
$(document).ready(function() {
	/*  Dynamic Expansion*/
	$('div.togglecontent > div').hide();
	$('div.togglecontent > b').click(function() {
		if ($(this).text() == "Show more...") { $(this).text("Hide..."); }
		else { $(this).text("Show more..."); };
		$(this).prev().slideToggle('fast');
/*		$(this).hide();*/
	});
});
$(document).ready(function() {
	$(".tooltip").tooltip({
		tip: '.tiptxt',
		relative: true,
		position: 'center center',
		opacity: '1'
	});
});
$(document).ready(function() {
	$('li.headlink').hover(
		function() { $('ul', this).css('display', 'block'); },
		function() { $('ul', this).css('display', 'none')});

		var timeout    = 100;
		var closetimer = 0;
		var ddmenuitem = 0;
		
		function jsddm_open()
		{  jsddm_canceltimer();
		   jsddm_close();
		   ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
		
		function jsddm_close()
		{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
		
		function jsddm_timer()
		{  closetimer = window.setTimeout(jsddm_close, timeout);}
		
		function jsddm_canceltimer()
		{  if(closetimer)
		   {  window.clearTimeout(closetimer);
			  closetimer = null;}}
		
		$(document).ready(function()
		{  $('#jsddm > li').bind('mouseover', jsddm_open)
		   $('#jsddm > li').bind('mouseout',  jsddm_timer)});
		
		document.onclick = jsddm_close;
});
$(document).ready(function() {
	Cufon.replace('h1, h2, h6');
});

