    $(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
        });
		
		
		/* AutoResponder */
				
		
		if ($('#autoRespondCont').length > 0) {
			$('#send_copy').click(function() {
				var flagCode = '<input type="hidden" value="default" name="autoflag" />';
				if ($('#autoRespondCont').html() == "&nbsp;") {
					$('#autoRespondCont').html(flagCode);
				} else {
					$('#autoRespondCont').html("&nbsp;");
				}
			});
		}
		
		$('body#home div#container-centre .newsTH').appendTo("body#home div#home-press-articles");
		
		
		$('body#press_and_media div#container-centre .relatedarticlesTH').appendTo("body#press_and_media div#press-media-article-list");
		
		
		$('#container-leftudm div h2').each(function() {
			if (jQuery("a", this).attr('href') == "/site/lawyers_trustees_executors/" && jQuery("a", this).text() == "Services for Lawyers, Executors & PRs") {
				jQuery("a", this).html("Services for Lawyers, Executors <br /> &amp; Personal Representatives");
			}
		});
		
/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

var wlprot = window.location.protocol;
var wlhost = window.location.host;
var wlpath = window.location.pathname;
var wlpathnew = wlpath.replace( /\//g, "%2F");
var pt = document.title;
var pagetitle = pt.replace(/[^a-zA-Z 0-9 -]+/g,'').replace(/  /, ' ');
var fullURL = wlprot + "//www." +  wlhost + wlpath;


var pagetitleLI = pagetitle.replace(/ /g, "+");
var emailBodyMessage = 'Check out this website! www.' + wlhost + wlpath;

var fblink = "http://www.facebook.com/share.php?u=http%3A%2F%2Fwww."+wlhost+wlpathnew;
var twlink = "http://twitter.com/share?url=http%3A%2F%2Fwww."+wlhost+wlpathnew+"&text="+pagetitle;
var lilink = "http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww"+wlhost+wlpathnew+"&title="+pagetitleLI+"&ro=false&summary=&source="
var emailLink = "mailto:?subject="+pagetitle+"&body="+emailBodyMessage;

$('a#bmfb').attr('href',fblink);
$('a#bmtw').attr('href',twlink);
$('a#bmli').attr('href',lilink);
$('a#bmel').attr('href',emailLink);

$('a#bmbm').click(function() {
	bookmarksite(pagetitle, fullURL);
});


$('a#bookmarker').click(function() {
	$('#bookmarklinks').show();

});

$('#bookmarkwidget').hover(function() {
	clearInterval(bookHover);
}, function() {
	bookHover = setInterval("$('#bookmarklinks').hide()", 2000);
});
		
    });


/*  
 * 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();
	});
