    $(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:       'fast',                          // faster animation speed
            autoArrows:  true,                           // disable generation of arrow mark-up
            dropShadows: true                            // disable drop shadows
        });
		
	var menuTitle = $('#container-left #container-leftudm .title h2.leftudm_h2_active a').html();

	if (menuTitle == "Financial") {
		$('h2.leftudm_h2_active a:first').addClass(menuTitle);
		$('.serviceareas .text .title h2 a.Financial').parents('h2').parents('.title').remove();
	} else if (menuTitle == "Legal") {
		$('h2.leftudm_h2_active a:first').addClass(menuTitle);
		$('.serviceareas .text .title h2 a.Legal').parents('h2').parents('.title').remove();
	} else if (menuTitle == "Property") {
		$('h2.leftudm_h2_active a:first').addClass(menuTitle);
		$('.serviceareas .text .title h2 a.Property').parents('h2').parents('.title').remove();
	};
	
	$('#container-centre h2:first').addClass("seoh2");
	$('body#home #container-centre h2:first').removeClass("seoh2");
	
	$('#container-right .quote .speaker_detail a:first').addClass("quotename");
		
	// for homepage
	var randomnumber = Math.floor(Math.random()*4)
	
	switch(randomnumber) {
	case 0:
	$('body#home #contentWrapper2').css({"background" : "transparent url(/images/hpsafehands1.jpg) no-repeat scroll 5px 142px"});
	break;
	case 1:
	$('body#home #contentWrapper2').css({"background" : "transparent url(/images/hpsafehands2.jpg) no-repeat scroll 8px 142px"});
	break;
	case 2:
	$('body#home #contentWrapper2').css({"background" : "transparent url(/images/hpsafehands3.jpg) no-repeat scroll 42px 112px"});
	break;
	case 3:
	$('body#home #contentWrapper2').css({"background" : "transparent url(/images/hpsafehands4.jpg) no-repeat scroll 43px 142px"});
	break;
	case 4:
	$('body#home #contentWrapper2').css({"background" : "transparent url(/images/hpsafehands5.jpg) no-repeat scroll 25px 142px"});
	break;
	}
	
	// Service Areas
	var pgLoc=location.pathname;
	
	if (pgLoc.indexOf("/site/services/legal/") != -1 ) {
		$('#contentWrapper2').css({
		"padding-bottom" : "200px",
		"background" : "url(/images/ctimage1.gif) 448px 100% no-repeat"
		});
	} else if (pgLoc.indexOf("/site/services/financial/") != -1 ) {
		$('#contentWrapper2').css({
		"padding-bottom" : "200px",
		"background" : "url(/images/ctimage2.gif) 448px 100% no-repeat"
		});
	} else if (pgLoc.indexOf("/site/services/property/") != -1 ) {
		if (pgLoc == "/site/services/property/properties_for_sale/" || pgLoc == "/site/services/property/properties_to_let/" || pgLoc == "/site/services/property/commercial_properties/") {
		// do nothing
		} else if (pgLoc == "/site/services/property/lettings_guide_for_landlords/" || pgLoc == "/site/services/property/lettings_guide_for_tenants/") {
		$('#contentWrapper2').css({
		"padding-bottom" : "200px",
		"background" : "url(/images/ctimage5.jpg) 448px 100% no-repeat"
		});
		} else {
		$('#contentWrapper2').css({
		"padding-bottom" : "200px",
		"background" : "url(/images/ctimage4.jpg) 448px 100% no-repeat"
		});
		}
	}
	
	// Service Homepage
	$('li#leftudm_menu_item_property a').addClass('Property');
	$('li#leftudm_menu_item_financial a').addClass('Financial');
	$('li#leftudm_menu_item_legal a').addClass('Legal');
	
	
	
	
	$('.staffmemberTH2 .text .name').before('<div class="contact-title">Contact:</div>');
	$('.staffmemberTH2 .text .DDI').prepend("DD: ");
	
	
	});


	
	
	

/*  
 * jQuery ifixpng plugin
 * (previously known as pngfix)
 * Version 2.1  (23/04/2008)
 * @requires jQuery v1.1.3 or above
 *
 * Examples at: http://jquery.khurshid.com
 * Copyright (c) 2007 Kush M.
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
 
 /**
  *
  * @example
  *
  * optional if location of pixel.gif if different to default which is images/pixel.gif
  * $.ifixpng('media/pixel.gif');
  *
  * $('img[@src$=.png], #panel').ifixpng();
  *
  * @apply hack to all png images and #panel which icluded png img in its css
  *
  * @name ifixpng
  * @type jQuery
  * @cat Plugins/Image
  * @return jQuery
  * @author jQuery Community
  */
 
(function($) {

	/**
	 * helper variables and function
	 */
	$.ifixpng = function(customPixel) {
		$.ifixpng.pixel = customPixel;
	};
	
	$.ifixpng.getPixel = function() {
		return $.ifixpng.pixel || 'images/pixel.gif';
	};
	
	$.ifixpng('/images/pixel.gif'); 
	
	var hack = {
		ltie7  : $.browser.msie && $.browser.version < 7,
		filter : function(src) {
			return "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";
		}
	};
	
	/**
	 * Applies ie png hack to selected dom elements
	 *
	 * $('img[@src$=.png]').ifixpng();
	 * @desc apply hack to all images with png extensions
	 *
	 * $('#panel, img[@src$=.png]').ifixpng();
	 * @desc apply hack to element #panel and all images with png extensions
	 *
	 * @name ifixpng
	 */
	 
	$.fn.ifixpng = hack.ltie7 ? function() {
    	return this.each(function() {
			var $$ = $(this);
			// in case rewriting urls
			var base = $('base').attr('href');
			if (base) {
				// remove anything after the last '/'
				base = base.replace(/\/[^\/]+$/,'/');
			}
			if ($$.is('img') || $$.is('input')) { // hack image tags present in dom
				if ($$.attr('src')) {
					if ($$.attr('src').match(/.*\.png([?].*)?$/i)) { // make sure it is png image
						// use source tag value if set 
						var source = (base && $$.attr('src').search(/^(\/|http:)/i)) ? base + $$.attr('src') : $$.attr('src');
						// apply filter
						$$.css({filter:hack.filter(source), width:$$.width(), height:$$.height()})
						  .attr({src:$.ifixpng.getPixel()})
						  .positionFix();
					}
				}
			} else { // hack png css properties present inside css
				var image = $$.css('backgroundImage');
				if (image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)) {
					image = RegExp.$1;
					image = (base && image.substring(0,1)!='/') ? base + image : image;
					$$.css({backgroundImage:'none', filter:hack.filter(image)})
					  .children().children().positionFix();
				}
			}
		});
	} : function() { return this; };
	
	/**
	 * Removes any png hack that may have been applied previously
	 *
	 * $('img[@src$=.png]').iunfixpng();
	 * @desc revert hack on all images with png extensions
	 *
	 * $('#panel, img[@src$=.png]').iunfixpng();
	 * @desc revert hack on element #panel and all images with png extensions
	 *
	 * @name iunfixpng
	 */
	 
	$.fn.iunfixpng = hack.ltie7 ? function() {
    	return this.each(function() {
			var $$ = $(this);
			var src = $$.css('filter');
			if (src.match(/src=["']?(.*\.png([?].*)?)["']?/i)) { // get img source from filter
				src = RegExp.$1;
				if ($$.is('img') || $$.is('input')) {
					$$.attr({src:src}).css({filter:''});
				} else {
					$$.css({filter:'', background:'url('+src+')'});
				}
			}
		});
	} : function() { return this; };
	
	/**
	 * positions selected item relatively
	 */
	 
	$.fn.positionFix = function() {
		return this.each(function() {
			var $$ = $(this);
			var position = $$.css('position');
			if (position != 'absolute' && position != 'relative') {
				$$.css({position:'relative'});
			}
		});
	};

})(jQuery);

    $(document).ready(function() {
		$('img[src$=.png]').ifixpng(); 
		$('div').ifixpng();
		$('a').ifixpng();
	});