    $(document).ready(function() {
        $('ul.udm').superfish({
            delay:       1000,                            // one second delay on mouseout
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       'normal',                          // faster animation speed
            autoArrows:  true,                           // disable generation of arrow mark-up
            dropShadows: true                            // disable drop shadows
        });
  
		$('ul.leftudm').superfish({
            delay:       1000,                            // one second delay on mouseout
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       'normal',                          // faster animation speed
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
        });
		
		
		
		var pgLoc=location.pathname;
		if (pgLoc.indexOf("/site/library/") != -1 || pgLoc == "/site/people/" || pgLoc == "/site/contact/st_albans_office/" || pgLoc == "/site/contact/radlett_office/") {
		// do nothing 
		} else {
		$('#container-centre p:first').addClass('intro');
		$('#container-centre h1:first').appendTo('#introtext');
		$('p.intro').appendTo('#introtext');
		}
		
		$('#container-centre .job_title').appendTo('#introtext');
		
		var myH1 = $('#container-right .stafflistTH .title h1'); // This block swaps the H2 for a H1 on news, so we can use it in the generated menu
		var myH2 = $('<h2></h2>').
		append(myH1.contents());
		myH1.replaceWith(myH2);
		
		var myH3 = $('#container-right .servicedocuments h3');
		var myH2 = $('<h2></h2>').
		append(myH3.contents());
		myH3.replaceWith(myH2);
		
		var myH1 = $('#container-centre .relatedarticlesTH h1');
		var myH2 = $('<h2></h2>').
		append(myH1.contents());
		myH1.replaceWith(myH2);
		
		// Hiding extra br in departments on profile pages
		
		$('#profile .departments br:first').css('display','none');
		
		// Service lists on service page
		
		$("body#services #container-right .per").load("/site/personal/ div#container-leftudm");
		$("body#services #container-right .bus").load("/site/business/ div#container-leftudm");
		
		$("#slideshow-fade div:random").addClass("active");
		
    });
	
	// jQuery.jQueryRandom = 0;
			// jQuery.extend(jQuery.expr[":"],
			 // {
				 // random: function(a, i, m, r) {
					 // if (i == 0) {
						 // jQuery.jQueryRandom = Math.floor(Math.random() * r.length);
					 // };
					 // return i == jQuery.jQueryRandom;
				 // }
			 // });

