    $(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
        });
		
		$('ul.udm_menu_level_2').hover(function() {
			$(this).siblings('a').addClass("hoverover");
			}, function() {
			$(this).siblings('a').removeClass("hoverover");
		});
		
		$('a#one').click(function(){
			$('#london').slideDown(500);
			$('#brighton').fadeOut(100);
		});
		
		$('a#two').click(function(){
			$('#brighton').slideDown(500);
			$('#london').fadeOut(100);
		});
		
		$('.up').click(function(){
			$('#brighton').slideUp(500);
			$('#london').slideUp(500);
		});
		
		var linktext = ""
		var activeColor
		
		$('.profileintro p:nth-child(2)').addClass('introPara');
		
		$('.quote1TH .speaker_detail a[href*=/site/people/profile/]').addClass('quote-name');
		
		$('#squares a').hover(function() {
                $(this).stop().animate({ "width" : "26px", "height" : "26px", "left" : "0px", "top" : "-3px" }, 150);
				linktext = $(this).html();
				
				//console.log(linktext);
				
				$('#link-contents').html(linktext)
				
				if (linktext == "<span>Home</span>") {
				activeColor = "#7D0117"
				} else if (linktext == "<span>About Us</span>") {
				activeColor = "#116488"
				} else if (linktext == "<span>Our People</span>") {
				activeColor = "#2A6EBC"
				} else if (linktext == "<span>Services for you</span>") {
				activeColor = "#6D4061"
				} else if (linktext == "<span>Services for business</span>") {
				activeColor = "#95519E"
				} else if (linktext == "<span>International Law</span>") {
				activeColor = "#8791C6"
				} else if (linktext == "<span>Careers</span>") {
				activeColor = "#2B6F4C"
				} else if (linktext == "<span>News</span>") {
				activeColor = "#92406D"
				} else if (linktext == "<span>Contact us</span>") {
				activeColor = "#9E2216"
				}
				
				$('#link-contents').css({"color" : activeColor})
				
				},function() {
				$(this).stop().animate({ "width" : "20px", "height" : "20px", "left" : "0px", "top" : "0px" }, 150);
				linktext = ""
				$('#link-contents').html(linktext);
        });
			
		$('.dropdownform h1').click(function(){
			$('.dropdownform .text').slideDown(500);
		});
			
		$('#contactForm .emailclk').focus(function() {
				$('.captcha_hider').slideDown("slow");
		});
			
		$('p.close').hover(function(){
			$(this).stop().toggleClass('closeover');
			}, function() {
			$(this).stop().toggleClass('closeover');
		});
		
		$('p.close').click(function(){
			$('#container-left .dropdownform .text').slideUp();
		});
		
		// callback drop down
		
		$('#callbackLondon .emailclk').focus(function() {
				$('.captcha_hider').slideDown("slow");
		});
		
		$('.dropdowncallback h1').click(function(){
			$('.dropdowncallback .text').slideDown(500);
		});
		
		$('.dropdownbrighton h1').click(function(){
			$('.dropdownbrighton .text').slideDown(500);
		});
		
		$('#container-left .dropdownform h1').hover(function() {
			$(this).stop().toggleClass('headinghover');
			}, function() {
			$(this).stop().toggleClass('headinghover');
		});
		
		$('#container-left .dropdowncallback h1').hover(function() {
			$(this).stop().toggleClass('headinghover');
			}, function() {
			$(this).stop().toggleClass('headinghover');
		});

		$('#container-left .dropdownbrighton h1').hover(function() {
			$(this).stop().toggleClass('headinghover');
			}, function() {
			$(this).stop().toggleClass('headinghover');
		});
			
		$('#container-left .dropdowncallback p.close').click(function(){
			$('#container-left .dropdowncallback .text').slideUp();
		});
		
		$('#container-left .dropdownbrighton p.close').click(function(){
			$('#container-left .dropdownbrighton .text').slideUp();
		});
		
/////////////////////////////////////////////////////////////////////////////
		
		$('#container-left .speaker_detail a[href*=/site/people/profile/kyri.papantoniou@healys.eu]').addClass('longname'); 
		
		$('.profileintro .job_title').insertAfter('.profileintro .title h1'); // put the job title directly after name title (h1) so we can float in css
		

		
		function slideSwitch() {
    var $active = $('#slideshow-fade DIV.active');

    if ( $active.length == 0 ) $active = $('#slideshow-fade DIV:last');

    // use this to pull the divs in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow-fade DIV:first');

    // uncomment below to pull the divs randomly
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
	}

		setInterval(slideSwitch, 7500 );
		
	});
	
	