jQuery.noConflict();
jQuery(document).ready(function(){
    jQuery('p.img a').attr('rel','lightbox[caerleon]');
});

jQuery(document).ready(function() {
  function filterPath(string) {
	return string
	  .replace(/^\//,'')
	  .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
	  .replace(/\/$/,'');
  }
  jQuery('a[href*=#]').each(function() {
	if ( filterPath(location.pathname) == filterPath(this.pathname)
	&& location.hostname == this.hostname
	&& this.hash.replace(/#/,'') ) {
	  var $targetId = jQuery(this.hash), $targetAnchor = jQuery('[name=' + this.hash.slice(1) +']');
	  var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : false;
	   if ($target) {
		 var targetOffset = $target.offset().top;
		 jQuery(this).click(function() {
		   jQuery('html, body').animate({scrollTop: targetOffset}, 800);
		   return false;
		 });
	  }
	}
  });
  jQuery('p.img a img').parent().css('padding','0').css('backgroundColor','transparent').css('height','auto');
  jQuery("div#nav ul.nav").superfish();
	
  });
