$(document).ready(function() {
 $('dl.menuleft> dd').hide();
//$('dl.menuleft> dd:gt(0)').hide(); use this if you want the first one to stay opened
 $('dl.menuleft> dt').click(function() {
 if($(this).find("a").attr("href")){}else{
  var $nextDT = $(this).next();
  var $visibleSiblings = $nextDT.siblings('dd:visible');

  if ($visibleSiblings.length) {
   $visibleSiblings.slideUp('normal', function() {
    $nextDT.slideToggle('normal');
   });
  } else {
   $nextDT.slideToggle('normal');
  }
  }
});

$('.menuleft dt').hover(function() {
 $(this).addClass('prettyhover');
}, function() {
 $(this).removeClass('prettyhover');
});


	$(".menuleft dt").click(function(){
		var $newdestination = $(this).find("a").attr("href");
    	if($newdestination){
	    	window.location=$newdestination;
	    }
	});
	
$('.menuleft li').hover(function() {
 $(this).addClass('prettyhoverli');
}, function() {
 $(this).removeClass('prettyhoverli');
 	var hrefParts = location.href.split('/');
	var thisPage = hrefParts[5];
	if(thisPage != ""){
		thisPage="/"+thisPage+"/";
		$('dl.menuleft li:has(a[href*=' + thisPage + '])').addClass('prettyhoverli2');
		$('dl.menuleft dt:has(a[href*=' + thisPage + '])').addClass('prettyhoverli2');
	}
});


	$(".menuleft li").click(function(){
		var $newdestination = $(this).find("a").attr("href");
    	if($newdestination){
	    	window.location=$newdestination;
	    }
	});


var hrefParts = location.href.split('/');
var thisPage = hrefParts[5];
	if(thisPage != ""){
		thisPage="/"+thisPage+"/";
		$('dl.menuleft dd:has(a[href*=' + thisPage + '])').show();
		$('dl.menuleft li:has(a[href*=' + thisPage + '])').addClass('prettyhoverli2');
		$('dl.menuleft dt:has(a[href*=' + thisPage + '])').addClass('prettyhoverli2');
	}
	
var hrefParts2 = location.href.split('/');
var thisPage2 = hrefParts2[3];
	if(thisPage2 == "contact"){
		$('dl.menuleft dt:has(a[href*=' + "contact" + '])').addClass('prettyhoverli2');
	}
});



//$(document).ready(function() {
// $('div.demo-show:eq(0)> div').hide();
// $('div.demo-show:eq(0)> h3').click(function() {
//  $(this).next().slideToggle('fast');
// });
//});
