/* 
A fix for flickering CSS bg images on links in IE6. More info: mister-pixel.com
there is also an IIS fix available: www.aspnetresources.com/blog/cache_control_extensions.aspx */
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}


$(document).ready(function(){
	
	// Fix mouseover behaviour on shortcut menus
	//$("ul.shortcut li").hover(function(){ $("ul", this).slideDown("fast"); }, function() { $("ul", this).fadeOut("fast"); });
	
	// IE gets some :hover action
	if (document.all) {
		$("ul.shortcut li").hoverClass("Hover");
		$("ul.shortcut li ul").hoverClass("Hover"); //change border around submenu
		$("#nav>ul>li").hoverClass("Hover");
	}

	// magic pullquotes
	$("span.pullquote").each(function(){
		var quote = '<blockquote class="pullquote"><span class="qstart">&#8220;</span>' + $(this).text() + '<span class="qend">&#8221;</span>';
		$(this.parentNode).before(quote);
	});
	

	//if we don't want extra markup for making the mouseover border
	//on sections and segments, we could use this:
	//$("div.section>h3>a").append('<b></b>');
	
			
});


// Generic function for adding .hover on any element in IE<7
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};

