	var timeout    = 500;
	var closetimer = 0;
	var ddmenuitem = 0;
	var maxCatHeight = 0;
	
	$(document).ready(function()
	{  
	   $('#mainMenu > li').bind('mouseover', jsddm_open);
	   $('#mainMenu > li').bind('mouseout',  jsddm_timer);
	      
	   if(typeof selectFunc == 'function') { 
	   selectFunc();
	   }
	   
		$("#conf").jqm({modal: true,onHide:close});
		$("a.confirm").click(function(e){
			e.preventDefault();
			$("#confirmed").attr("href",$(this).attr("href"));
            $("#conf").jqmShow();
			});

	    document.onclick = jsddm_close;
        if(!(jQuery.browser.version.substr(0,3)=="6.0" && $.browser.msie)){

        }else{        
        /*$('body').supersleight();
        $('body').supersleight({shim: '../../Content/images/transparent.gif'});*/
        }
        
        $.preloadImages("/Content/images/hands.jpg","/Content/images/words1.jpg","/Content/images/shot.jpg","/Content/images/words2.jpg","/Content/images/oldlady.jpg","/Content/images/words3.jpg","/Content/images/helpinghand.jpg","/Content/images/words4.jpg","/Content/images/nurses.jpg","/Content/images/words5.jpg");
	$('#RotatingPics').css('visibility', 'visible').cycle({
		fx:    'fade',
		speed:  1500
	 });
        
	});
	
	jQuery.preloadImages = function()
	{
		for(var i = 0; i<arguments.length; i++)
		 {
			jQuery("<img>").attr("src", arguments[i]);
		 }
	}
	
	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;}
	}
 
	var close=function(hash) { 
	hash.o.remove();
	$("#conf").hide();
	};