$(document).ready(function() {
	/*function fadeError () {
		$("div#msg.error").hide();
	};
	fadeError();*/
	
	$('.review').jTruncate({
	  length: 85,
	  minTrail: 0,
	  moreText: "[read more]",
	  lessText: "[read less]",
	  ellipsisText: "...",
	  moreAni: "slow",
	  lessAni: ""
	 });
	$("div#msg.error").fadeIn();
	
	/*$('.truncateMe').jTruncate();*/
	
	$("a[rel=weddings]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
	
	
});// document ready
 
 sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//Fix for IE6 CSS Flicker Bug
try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
