
$(document).ready(function() {
   
   
		$('a.ext').attr('target','_blank');

	
		/*mark active links*/
	
    
	 	$(".mmenu li a").filter(function() {

     	//Take the current URL and split it into chunks at each slash
      	var currentURL = window.location.toString().split("/");

      	//return true if the bit after the last slash is the current page name
      	return $(this).attr("href") == currentURL[currentURL.length-1];

	    //when the filter function is done, you're left with the links that match.
    	}).parent().addClass("active-trail");
	
	
		//if($('li.active-trail').has('ul')) {
	    $('li.active-trail').has('ul').addClass('open active-trail');
		//}
	
		$('li.active-trail').parents("ul").parents("li").addClass('open active-trail');
	 
		
	
	
	
		
		///////PREVENT EMAIL HARVEST
		
	
		   $('.emil').each(function() {
			  var $email = $(this);
			  var address = $email.text()
				 .replace(/\s*\[at\]\s*/, '@')
				 .replace(/\s*\[dot\]\s*/g, '.');
			  $email.html('<a href="mailto:' + address + '">'
				 + address +'</a>');
		   });
	

		
		//setup prettyPhoto lightbox for rel="prettyPhoto" links
		
		$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
	 
	
});


//function for manual link activation

function markActiveLink(idName) {


	if(idName) {
		
		$("#"+idName+"").parent().addClass("active-trail");
	}

}

function ActivateContent(arr) {
	return;
}


