(function($) {
$.fn.active = function(settings) {
	var defaults = {
		addClass: "active"
	}, o = {};
	if (typeof settings == "string") {
		o.addClass = settings;
	} else {
		o = $.extend(defaults, o || {});
	}
	return this.each(function() {
		if(typeof this.href == "undefined") return;
		var plainURI = this.href.split("?")[0];
		if(this.href == window.location || this.href == document.location.protocol + "//" + window.location.hostname + window.location.pathname || window.location == plainURI) {
			$(this).addClass(o.addClass);
		}
	})
}
})(jQuery);
function slideReady(slide, className) {
	if(typeof slide == "undefined") slide = "#slide";
	if(typeof className == "undefined") className = "slideready";
	if($(slide + " li").length > 3) $(slide).addClass(className);
}
function addMemo(slide) {
	if(typeof slide == "undefined") slide = "#slide";	
	$(slide + " li a").each(function() {
		var span = document.createElement("span");
		span.style.display = "none";
		span.className = "memo";
		span.innerHTML = "Click to Enlarge Image";
		this.appendChild(span);
	});
}
$(document).ready(function() {
	if($("a[rel*=facebox]").length > 0) $("a[rel*=facebox]").facebox();
});
