function logoState(){
	var isShown=false;
	$('#nav').prepend("<li id='navlogo'><a href='./index.html'><img src='./images/logo_shadow.png'></a></li>");
	//$('#logo img').clone().prependTo('#navlogo a');
	$('#navlogo').css({'width':'toggle','opacity':'hide'})
	$('#navlogo').hide();
	
	$(window).scroll(
	function(){
		if($(window).scrollTop()>=28&&isShown==false){
			isShown=true;
			$('#prime').addClass('docked');
			$('#navlogo').animate({"width":"toggle","opacity":"show"},100);
		}else if($(window).scrollTop()<29&&isShown==true){
			isShown=false;$('#prime').removeClass('docked');
			$('#navlogo').animate({"width":"toggle","opacity":"hide"},25);
		}
	});
}

$(document).ready(function () {
	logoState();
	
});

/*
(function (a, b, c) {
	function f(a) {
		var b = document.documentElement.style,
		c;
		if (typeof b[a] == "string") return a;
		a = d(a);
		for (var f = 0, g = e.length; f < g; f++) {
			c = e[f] + a;
			if (typeof b[c] == "string") return c
		}
	}
	function d(a) {
		return a.charAt(0).toUpperCase() + a.slice(1)
	}
	var e = "Moz Webkit Khtml O Ms".split(" "),
	g = f("transform"),
	h = {
		csstransforms: function () {
			return !! g
		},
		csstransforms3d: function () {
			var a = !!f("perspective");
			if (a) {
				var c = " -o- -moz- -ms- -webkit- -khtml- ".split(" "),
				d = "@media (" + c.join("transform-3d),(") + "modernizr)",
				e = b("<style>" + d + "{#modernizr{height:3px}}" + "</style>").appendTo("head"),
				g = b('<div id="modernizr" />').appendTo("html");
				a = g.height() === 3,
				g.remove(),
				e.remove()
			}
			return a
		},
		csstransitions: function () {
			return !! f("transitionProperty")
		}
	};
	if (a.Modernizr) for (var i in h) Modernizr.hasOwnProperty(i) || Modernizr.addTest(i, h[i]);
	else a.Modernizr = function () {
		var a = {
			_version: "1.6ish: miniModernizr for Isotope"
		},
		c = " ",
		d,
		e;
		for (e in h) d = h[e](),
		a[e] = d,
		c += " " + (d ? "": "no-") + e;
		b("html").addClass(c);
		return a
	} ();
	if (Modernizr.csstransforms) {
		var j = Modernizr.csstransforms3d ? {
			translate: function (a) {
				return "translate3d(" + a[0] + "px, " + a[1] + "px, 0) "
			},
			scale: function (a) {
				return "scale3d(" + a + ", " + a + ", 1) "
			}
		}: {
			translate: function (a) {
				return "translate(" + a[0] + "px, " + a[1] + "px) "
			},
			scale: function (a) {
				return "scale(" + a + ") "
			}
		},
		k = function (a, c, d) {
			var e = b.data(a, "isoTransform") || {},
			f = {},
			h,
			i = {},
			k;
			f[c] = d,
			b.extend(e, f);
			for (h in e) k = e[h],
			i[h] = j[h](k);
			var l = i.translate || "",
			m = i.scale || "",
			n = l + m;
			b.data(a, "isoTransform", e),
			a.style[g] = n
		};
		b.cssNumber.scale = !0,
		b.cssHooks.scale = {
			set: function (a, b) {
				k(a, "scale", b)
			},
			get: function (a, c) {
				var d = b.data(a, "isoTransform");
				return d && d.scale ? d.scale: 1
			}
		},
		b.fx.step.scale = function (a) {
			b.cssHooks.scale.set(a.elem, a.now + a.unit)
		},
		b.cssNumber.translate = !0,
		b.cssHooks.translate = {
			set: function (a, b) {
				k(a, "translate", b)
			},
			get: function (a, c) {
				var d = b.data(a, "isoTransform");
				return d && d.translate ? d.translate: [0, 0]
			}
		}
	}
	var l = b.event,
	m;
	l.special.smartresize = {
		setup: function () {
			b(this).bind("resize", l.special.smartresize.handler)
		},
		teardown: function () {
			b(this).unbind("resize", l.special.smartresize.handler)
		},
		handler: function (a, b) {
			var c = this,
			d = arguments;
			a.type = "smartresize",
			m && clearTimeout(m),
			m = setTimeout(function () {
				jQuery.event.handle.apply(c, d)
			},
			b === "execAsap" ? 0 : 100)
		}
	},
	b.fn.smartresize = function (a) {
		return a ? this.bind("smartresize", a) : this.trigger("smartresize", ["execAsap"])
	},
	b.Isotope = function (a, c) {
		this.element = b(c),
		this._create(a),
		this._init()
	};
	var n = ["overflow", "position", "width", "height"];
	b.Isotope.settings = {
		resizable: !0,
		layoutMode: "masonry",
		containerClass: "isotope",
		itemClass: "isotope-item",
		hiddenClass: "isotope-hidden",
		hiddenStyle: Modernizr.csstransforms && !b.browser.opera ? {
			opacity: 0,
			scale: .001
		}: {
			opacity: 0
		},
		visibleStyle: Modernizr.csstransforms && !b.browser.opera ? {
			opacity: 1,
			scale: 1
		}: {
			opacity: 1
		},
		animationEngine: b.browser.opera ? "jquery": "best-available",
		animationOptions: {
			queue: !1,
			duration: 800
		},
		sortBy: "original-order",
		sortAscending: !0,
		resizesContainer: !0,
		transformsEnabled: !0,
		itemPositionDataEnabled: !1
	},
	b.Isotope.prototype = {
		_create: function (c) {
			this.options = b.extend(!0, {},
			b.Isotope.settings, c),
			this.styleQueue = [],
			this.elemCount = 0;
			var d = this.element[0].style;
			this.originalStyle = {};
			for (var e = 0, f = n.length; e < f; e++) {
				var g = n[e];
				this.originalStyle[g] = d[g] || null
			}
			this.element.css({
				overflow: "hidden",
				position: "relative"
			}),
			this._updateAnimationEngine(),
			this._updateUsingTransforms();
			var h = {
				"original-order": function (a, b) {
					return b.elemCount
				},
				random: function () {
					return Math.random()
				}
			};
			this.options.getSortData = b.extend(this.options.getSortData, h),
			this.reloadItems();
			var i = b(document.createElement("div")).prependTo(this.element);
			this.offset = i.position(),
			i.remove();
			var j = this;
			setTimeout(function () {
				j.element.addClass(j.options.containerClass)
			},
			0),
			this.options.resizable && b(a).bind("smartresize.isotope", function () {
				j.resize()
			})
		},
		_getAtoms: function (a) {
			var b = this.options.itemSelector,
			c = b ? a.filter(b).add(a.find(b)) : a,
			d = {
				position: "absolute"
			};
			this.usingTransforms && (d.left = 0, d.top = 0),
			c.css(d).addClass(this.options.itemClass),
			this.updateSortData(c, !0);
			return c
		},
		_init: function (a) {
			this.$filteredAtoms = this._filter(this.$allAtoms),
			this._sort(),
			this.reLayout(a)
		},
		option: function (a) {
			if (b.isPlainObject(a)) {
				this.options = b.extend(!0, this.options, a);
				var c;
				for (var e in a) c = "_update" + d(e),
				this[c] && this[c]()
			}
		},
		_updateAnimationEngine: function () {
			var a = this.options.animationEngine.toLowerCase().replace(/[ _\-]/g, "");
			switch (a) {
			case "css":
			case "none":
				this.isUsingJQueryAnimation = !1;
				break;
			case "jquery":
				this.isUsingJQueryAnimation = !0;
				break;
			default:
				this.isUsingJQueryAnimation = !Modernizr.csstransitions
			}
			this._updateUsingTransforms()
		},
		_updateTransformsEnabled: function () {
			this._updateUsingTransforms()
		},
		_updateUsingTransforms: function () {
			this.usingTransforms = this.options.transformsEnabled && Modernizr.csstransforms && Modernizr.csstransitions && !this.isUsingJQueryAnimation,
			this.getPositionStyles = this.usingTransforms ? this._translate: this._positionAbs
		},
		_filter: function (a) {
			var b = this.options.filter === "" ? "*": this.options.filter;
			if (!b) return a;
			var c = this.options.hiddenClass,
			d = "." + c,
			e = a.filter(d),
			f = e;
			if (b !== "*") {
				f = e.filter(b);
				var g = a.not(d).not(b).addClass(c);
				this.styleQueue.push({
					$el: g,
					style: this.options.hiddenStyle
				})
			}
			this.styleQueue.push({
				$el: f,
				style: this.options.visibleStyle
			}),
			f.removeClass(c);
			return a.filter(b)
		},
		updateSortData: function (a, c) {
			var d = this,
			e = this.options.getSortData,
			f, g;
			a.each(function () {
				f = b(this),
				g = {};
				for (var a in e) g[a] = e[a](f, d);
				b.data(this, "isotope-sort-data", g),
				c && d.elemCount++
			})
		},
		_sort: function () {
			var a = this.options.sortBy,
			b = this._getSorter,
			c = this.options.sortAscending ? 1 : -1,
			d = function (d, e) {
				var f = b(d, a),
				g = b(e, a);
				f === g && a !== "original-order" && (f = b(d, "original-order"), g = b(e, "original-order"));
				return (f > g ? 1 : f < g ? -1 : 0) * c
			};
			this.$filteredAtoms.sort(d)
		},
		_getSorter: function (a, c) {
			return b.data(a, "isotope-sort-data")[c]
		},
		_translate: function (a, b) {
			return {
				translate: [a, b]
			}
		},
		_positionAbs: function (a, b) {
			return {
				left: a,
				top: b
			}
		},
		_pushPosition: function (a, b, c) {
			b += this.offset.left,
			c += this.offset.top;
			var d = this.getPositionStyles(b, c);
			this.styleQueue.push({
				$el: a,
				style: d
			}),
			this.options.itemPositionDataEnabled && a.data("isotope-item-position", {
				x: b,
				y: c
			})
		},
		layout: function (a, b) {
			var c = this.options.layoutMode;
			this["_" + c + "Layout"](a);
			if (this.options.resizesContainer) {
				var d = this["_" + c + "GetContainerSize"]();
				this.styleQueue.push({
					$el: this.element,
					style: d
				})
			}
			this._processStyleQueue(),
			b && b.call(a),
			this.isLaidOut = !0
		},
		_processStyleQueue: function () {
			var a = this.isLaidOut ? this.isUsingJQueryAnimation ? "animate": "css": "css",
			c = this.options.animationOptions,
			d = this._isInserting && this.isUsingJQueryAnimation,
			e;
			b.each(this.styleQueue, function (b, f) {
				e = d && f.$el.hasClass("no-transition") ? "css": a,
				f.$el[e](f.style, c)
			}),
			this.styleQueue = []
		},
		resize: function () {
			this["_" + this.options.layoutMode + "ResizeChanged"]() && this.reLayout()
		},
		reLayout: function (a) {
			this["_" + this.options.layoutMode + "Reset"](),
			this.layout(this.$filteredAtoms, a)
		},
		addItems: function (a, b) {
			var c = this._getAtoms(a);
			this.$allAtoms = this.$allAtoms.add(c),
			b && b(c)
		},
		insert: function (a, b) {
			this.element.append(a);
			var c = this;
			this.addItems(a, function (a) {
				var d = c._filter(a, !0);
				c._addHideAppended(d),
				c._sort(),
				c.reLayout(),
				c._revealAppended(d, b)
			})
		},
		appended: function (a, b) {
			var c = this;
			this.addItems(a, function (a) {
				c._addHideAppended(a),
				c.layout(a),
				c._revealAppended(a, b)
			})
		},
		_addHideAppended: function (a) {
			this.$filteredAtoms = this.$filteredAtoms.add(a),
			a.addClass("no-transition"),
			this._isInserting = !0,
			this.styleQueue.push({
				$el: a,
				style: this.options.hiddenStyle
			})
		},
		_revealAppended: function (a, b) {
			var c = this;
			setTimeout(function () {
				a.removeClass("no-transition"),
				c.styleQueue.push({
					$el: a,
					style: c.options.visibleStyle
				}),
				c._processStyleQueue(),
				delete c._isInserting,
				b && b(a)
			},
			10)
		},
		reloadItems: function () {
			this.$allAtoms = this._getAtoms(this.element.children())
		},
		remove: function (a) {
			this.$allAtoms = this.$allAtoms.not(a),
			this.$filteredAtoms = this.$filteredAtoms.not(a),
			a.remove()
		},
		shuffle: function () {
			this.updateSortData(this.$allAtoms),
			this.options.sortBy = "random",
			this._sort(),
			this.reLayout()
		},
		destroy: function () {
			var c = this.usingTransforms;
			this.$allAtoms.removeClass(this.options.hiddenClass + " " + this.options.itemClass).each(function () {
				this.style.position = null,
				this.style.top = null,
				this.style.left = null,
				this.style.opacity = null,
				c && (this.style[g] = null)
			});
			var d = this.element[0].style;
			for (var e = 0, f = n.length; e < f; e++) {
				var h = n[e];
				d[h] = this.originalStyle[h]
			}
			this.element.unbind(".isotope").removeClass(this.options.containerClass).removeData("isotope"),
			b(a).unbind(".isotope")
		},
		_getSegments: function (a) {
			var b = this.options.layoutMode,
			c = a ? "rowHeight": "columnWidth",
			e = a ? "height": "width",
			f = a ? "rows": "cols",
			g = this.element[e](),
			h,
			i = this.options[b] && this.options[b][c] || this.$filteredAtoms["outer" + d(e)](!0) || g;
			h = Math.floor(g / i),
			h = Math.max(h, 1),
			this[b][f] = h,
			this[b][c] = i
		},
		_checkIfSegmentsChanged: function (a) {
			var b = this.options.layoutMode,
			c = a ? "rows": "cols",
			d = this[b][c];
			this._getSegments(a);
			return this[b][c] !== d
		},
		_masonryReset: function () {
			this.masonry = {},
			this._getSegments();
			var a = this.masonry.cols;
			this.masonry.colYs = [];
			while (a--) this.masonry.colYs.push(0)
		},
		_masonryLayout: function (a) {
			var c = this,
			d = c.masonry;
			a.each(function () {
				var a = b(this),
				e = Math.ceil(a.outerWidth(!0) / d.columnWidth);
				e = Math.min(e, d.cols);
				if (e === 1) c._masonryPlaceBrick(a, d.colYs);
				else {
					var f = d.cols + 1 - e,
					g = [],
					h,
					i;
					for (i = 0; i < f; i++) h = d.colYs.slice(i, i + e),
					g[i] = Math.max.apply(Math, h);
					c._masonryPlaceBrick(a, g)
				}
			})
		},
		_masonryPlaceBrick: function (a, b) {
			var c = Math.min.apply(Math, b),
			d = 0;
			for (var e = 0, f = b.length; e < f; e++) if (b[e] === c) {
				d = e;
				break
			}
			var g = this.masonry.columnWidth * d,
			h = c;
			this._pushPosition(a, g, h);
			var i = c + a.outerHeight(!0),
			j = this.masonry.cols + 1 - f;
			for (e = 0; e < j; e++) this.masonry.colYs[d + e] = i
		},
		_masonryGetContainerSize: function () {
			var a = Math.max.apply(Math, this.masonry.colYs);
			return {
				height: a
			}
		},
		_masonryResizeChanged: function () {
			return this._checkIfSegmentsChanged()
		},
		_fitRowsReset: function () {
			this.fitRows = {
				x: 0,
				y: 0,
				height: 0
			}
		},
		_fitRowsLayout: function (a) {
			var c = this,
			d = this.element.width(),
			e = this.fitRows;
			a.each(function () {
				var a = b(this),
				f = a.outerWidth(!0),
				g = a.outerHeight(!0);
				e.x !== 0 && f + e.x > d && (e.x = 0, e.y = e.height),
				c._pushPosition(a, e.x, e.y),
				e.height = Math.max(e.y + g, e.height),
				e.x += f
			})
		},
		_fitRowsGetContainerSize: function () {
			return {
				height: this.fitRows.height
			}
		},
		_fitRowsResizeChanged: function () {
			return ! 0
		},
		_cellsByRowReset: function () {
			this.cellsByRow = {
				index: 0
			},
			this._getSegments(),
			this._getSegments(!0)
		},
		_cellsByRowLayout: function (a) {
			var c = this,
			d = this.cellsByRow;
			a.each(function () {
				var a = b(this),
				e = d.index % d.cols,
				f = ~~ (d.index / d.cols),
				g = (e + .5) * d.columnWidth - a.outerWidth(!0) / 2,
				h = (f + .5) * d.rowHeight - a.outerHeight(!0) / 2;
				c._pushPosition(a, g, h),
				d.index++
			})
		},
		_cellsByRowGetContainerSize: function () {
			return {
				height: Math.ceil(this.$filteredAtoms.length / this.cellsByRow.cols) * this.cellsByRow.rowHeight + this.offset.top
			}
		},
		_cellsByRowResizeChanged: function () {
			return this._checkIfSegmentsChanged()
		},
		_straightDownReset: function () {
			this.straightDown = {
				y: 0
			}
		},
		_straightDownLayout: function (a) {
			var c = this;
			a.each(function (a) {
				var d = b(this);
				c._pushPosition(d, 0, c.straightDown.y),
				c.straightDown.y += d.outerHeight(!0)
			})
		},
		_straightDownGetContainerSize: function () {
			return {
				height: this.straightDown.y
			}
		},
		_straightDownResizeChanged: function () {
			return ! 0
		},
		_masonryHorizontalReset: function () {
			this.masonryHorizontal = {},
			this._getSegments(!0);
			var a = this.masonryHorizontal.rows;
			this.masonryHorizontal.rowXs = [];
			while (a--) this.masonryHorizontal.rowXs.push(0)
		},
		_masonryHorizontalLayout: function (a) {
			var c = this,
			d = c.masonryHorizontal;
			a.each(function () {
				var a = b(this),
				e = Math.ceil(a.outerHeight(!0) / d.rowHeight);
				e = Math.min(e, d.rows);
				if (e === 1) c._masonryHorizontalPlaceBrick(a, d.rowXs);
				else {
					var f = d.rows + 1 - e,
					g = [],
					h,
					i;
					for (i = 0; i < f; i++) h = d.rowXs.slice(i, i + e),
					g[i] = Math.max.apply(Math, h);
					c._masonryHorizontalPlaceBrick(a, g)
				}
			})
		},
		_masonryHorizontalPlaceBrick: function (a, b) {
			var c = Math.min.apply(Math, b),
			d = 0;
			for (var e = 0, f = b.length; e < f; e++) if (b[e] === c) {
				d = e;
				break
			}
			var g = c,
			h = this.masonryHorizontal.rowHeight * d;
			this._pushPosition(a, g, h);
			var i = c + a.outerWidth(!0),
			j = this.masonryHorizontal.rows + 1 - f;
			for (e = 0; e < j; e++) this.masonryHorizontal.rowXs[d + e] = i
		},
		_masonryHorizontalGetContainerSize: function () {
			var a = Math.max.apply(Math, this.masonryHorizontal.rowXs);
			return {
				width: a
			}
		},
		_masonryHorizontalResizeChanged: function () {
			return this._checkIfSegmentsChanged(!0)
		},
		_fitColumnsReset: function () {
			this.fitColumns = {
				x: 0,
				y: 0,
				width: 0
			}
		},
		_fitColumnsLayout: function (a) {
			var c = this,
			d = this.element.height(),
			e = this.fitColumns;
			a.each(function () {
				var a = b(this),
				f = a.outerWidth(!0),
				g = a.outerHeight(!0);
				e.y !== 0 && g + e.y > d && (e.x = e.width, e.y = 0),
				c._pushPosition(a, e.x, e.y),
				e.width = Math.max(e.x + f, e.width),
				e.y += g
			})
		},
		_fitColumnsGetContainerSize: function () {
			return {
				width: this.fitColumns.width
			}
		},
		_fitColumnsResizeChanged: function () {
			return ! 0
		},
		_cellsByColumnReset: function () {
			this.cellsByColumn = {
				index: 0
			},
			this._getSegments(),
			this._getSegments(!0)
		},
		_cellsByColumnLayout: function (a) {
			var c = this,
			d = this.cellsByColumn;
			a.each(function () {
				var a = b(this),
				e = ~~ (d.index / d.rows),
				f = d.index % d.rows,
				g = (e + .5) * d.columnWidth - a.outerWidth(!0) / 2,
				h = (f + .5) * d.rowHeight - a.outerHeight(!0) / 2;
				c._pushPosition(a, g, h),
				d.index++
			})
		},
		_cellsByColumnGetContainerSize: function () {
			return {
				width: Math.ceil(this.$filteredAtoms.length / this.cellsByColumn.rows) * this.cellsByColumn.columnWidth
			}
		},
		_cellsByColumnResizeChanged: function () {
			return this._checkIfSegmentsChanged(!0)
		},
		_straightAcrossReset: function () {
			this.straightAcross = {
				x: 0
			}
		},
		_straightAcrossLayout: function (a) {
			var c = this;
			a.each(function (a) {
				var d = b(this);
				c._pushPosition(d, c.straightAcross.x, 0),
				c.straightAcross.x += d.outerWidth(!0)
			})
		},
		_straightAcrossGetContainerSize: function () {
			return {
				width: this.straightAcross.x
			}
		},
		_straightAcrossResizeChanged: function () {
			return ! 0
		}
	},
	b.fn.imagesLoaded = function (a) {
		var b = this.find("img"),
		d = b.length,
		e = this;
		b.length || a.call(this),
		b.bind("load", function () {--d <= 0 && a.call(e)
		}).each(function () {
			if (this.complete || this.complete === c) {
				var a = this.src;
				this.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
				this.src = a
			}
		});
		return this
	};
	var o = function (a) {
		this.console && console.error(a)
	};
	b.fn.isotope = function (a) {
		if (typeof a == "string") {
			var c = Array.prototype.slice.call(arguments, 1);
			this.each(function () {
				var d = b.data(this, "isotope");
				if (!d) o("cannot call methods on isotope prior to initialization; attempted to call method '" + a + "'");
				else {
					if (!b.isFunction(d[a]) || a.charAt(0) === "_") {
						o("no such method '" + a + "' for isotope instance");
						return
					}
					d[a].apply(d, c)
				}
			})
		} else this.each(function () {
			var c = b.data(this, "isotope");
			c ? (c.option(a), c._init()) : b.data(this, "isotope", new b.Isotope(a, this))
		});
		return this
	}
})(window, jQuery);
(function ($) {
	$('a[data-reveal-id]').live('click', function (e) {
		e.preventDefault();
		var modalLocation = $(this).attr('data-reveal-id');
		$('#' + modalLocation).reveal($(this).data());
	});
	$.fn.reveal = function (options) {
		var defaults = {
			animation: 'fadeAndPop',
			animationspeed: 300,
			closeonbackgroundclick: true,
			dismissmodalclass: 'close-reveal-modal'
		};
		var options = $.extend({},
		defaults, options);
		return this.each(function () {
			var modal = $(this),
			topMeasure = parseInt(modal.css('top')),
			topOffset = modal.height() + topMeasure,
			locked = false,
			modalBG = $('.reveal-modal-bg');
			if (modalBG.length == 0) {
				modalBG = $('<div class="reveal-modal-bg" />').insertAfter(modal);
			}
			modal.bind('reveal:open', function () {
				modalBG.unbind('click.modalEvent');
				$('.' + options.dismissmodalclass).unbind('click.modalEvent');
				if (!locked) {
					lockModal();
					if (options.animation == "fadeAndPop") {
						modal.css({
							'top': $(document).scrollTop() - topOffset,
							'opacity': 0,
							'visibility': 'visible'
						});
						modalBG.fadeIn(options.animationspeed / 2);
						modal.delay(options.animationspeed / 2).animate({
							"top": $(document).scrollTop() + topMeasure + 'px',
							"opacity": 1
						},
						options.animationspeed, unlockModal());
					}
					if (options.animation == "fade") {
						modal.css({
							'opacity': 0,
							'visibility': 'visible',
							'top': $(document).scrollTop() + topMeasure
						});
						modalBG.fadeIn(options.animationspeed / 2);
						modal.delay(options.animationspeed / 2).animate({
							"opacity": 1
						},
						options.animationspeed, unlockModal());
					}
					if (options.animation == "none") {
						modal.css({
							'visibility': 'visible',
							'top': $(document).scrollTop() + topMeasure
						});
						modalBG.css({
							"display": "block"
						});
						unlockModal()
					}
				}
				modal.unbind('reveal:open');
			});
			modal.bind('reveal:close', function () {
				if (!locked) {
					lockModal();
					if (options.animation == "fadeAndPop") {
						modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
						modal.animate({
							"top": $(document).scrollTop() - topOffset + 'px',
							"opacity": 0
						},
						options.animationspeed / 2, function () {
							modal.css({
								'top': topMeasure,
								'opacity': 1,
								'visibility': 'hidden'
							});
							unlockModal();
						});
					}
					if (options.animation == "fade") {
						modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
						modal.animate({
							"opacity": 0
						},
						options.animationspeed, function () {
							modal.css({
								'opacity': 1,
								'visibility': 'hidden',
								'top': topMeasure
							});
							unlockModal();
						});
					}
					if (options.animation == "none") {
						modal.css({
							'visibility': 'hidden',
							'top': topMeasure
						});
						modalBG.css({
							'display': 'none'
						});
					}
				}
				modal.unbind('reveal:close');
			});
			modal.trigger('reveal:open')
			var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent', function () {
				modal.trigger('reveal:close')
			});
			if (options.closeonbackgroundclick) {
				modalBG.css({
					"cursor": "pointer"
				})
				modalBG.bind('click.modalEvent', function () {
					modal.trigger('reveal:close')
				});
			}
			$('body').keyup(function (e) {
				if (e.which === 27) {
					modal.trigger('reveal:close');
				}
			});
			function unlockModal() {
				locked = false;
			}
			function lockModal() {
				locked = true;
			}
		});
	}
})(jQuery);;
(function ($) {
	$.fn.ajaxSubmit = function (options) {
		if (!this.length) {
			log('ajaxSubmit: skipping submit process - no element selected');
			return this;
		}
		var method, action, url, $form = this;
		if (typeof options == 'function') {
			options = {
				success: options
			};
		}
		method = this.attr('method');
		action = this.attr('action');
		url = (typeof action === 'string') ? $.trim(action) : '';
		url = url || window.location.href || '';
		if (url) {
			url = (url.match(/^([^#]+)/) || [])[1];
		}
		options = $.extend(true, {
			url: url,
			success: $.ajaxSettings.success,
			type: method || 'GET',
			iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false': 'about:blank'
		},
		options);
		var veto = {};
		this.trigger('form-pre-serialize', [this, options, veto]);
		if (veto.veto) {
			log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
			return this;
		}
		if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
			log('ajaxSubmit: submit aborted via beforeSerialize callback');
			return this;
		}
		var n, v, a = this.formToArray(options.semantic);
		if (options.data) {
			options.extraData = options.data;
			for (n in options.data) {
				if (options.data[n] instanceof Array) {
					for (var k in options.data[n]) {
						a.push({
							name: n,
							value: options.data[n][k]
						});
					}
				}
				else {
					v = options.data[n];
					v = $.isFunction(v) ? v() : v;
					a.push({
						name: n,
						value: v
					});
				}
			}
		}
		if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
			log('ajaxSubmit: submit aborted via beforeSubmit callback');
			return this;
		}
		this.trigger('form-submit-validate', [a, this, options, veto]);
		if (veto.veto) {
			log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
			return this;
		}
		var q = $.param(a);
		if (options.type.toUpperCase() == 'GET') {
			options.url += (options.url.indexOf('?') >= 0 ? '&': '?') + q;
			options.data = null;
		}
		else {
			options.data = q;
		}
		var callbacks = [];
		if (options.resetForm) {
			callbacks.push(function () {
				$form.resetForm();
			});
		}
		if (options.clearForm) {
			callbacks.push(function () {
				$form.clearForm();
			});
		}
		if (!options.dataType && options.target) {
			var oldSuccess = options.success ||
			function () {};
			callbacks.push(function (data) {
				var fn = options.replaceTarget ? 'replaceWith': 'html';
				$(options.target)[fn](data).each(oldSuccess, arguments);
			});
		}
		else if (options.success) {
			callbacks.push(options.success);
		}
		options.success = function (data, status, xhr) {
			var context = options.context || options;
			for (var i = 0, max = callbacks.length; i < max; i++) {
				callbacks[i].apply(context, [data, status, xhr || $form, $form]);
			}
		};
		var fileInputs = $('input:file', this).length > 0;
		var mp = 'multipart/form-data';
		var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
		if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
			if (options.closeKeepAlive) {
				$.get(options.closeKeepAlive, function () {
					fileUpload(a);
				});
			}
			else {
				fileUpload(a);
			}
		}
		else {
			if ($.browser.msie && method == 'get') {
				var ieMeth = $form[0].getAttribute('method');
				if (typeof ieMeth === 'string') options.type = ieMeth;
			}
			$.ajax(options);
		}
		this.trigger('form-submit-notify', [this, options]);
		return this;
		function fileUpload(a) {
			var form = $form[0],
			el,
			i,
			s,
			g,
			id,
			$io,
			io,
			xhr,
			sub,
			n,
			timedOut,
			timeoutHandle;
			var useProp = !!$.fn.prop;
			if (a) {
				for (i = 0; i < a.length; i++) {
					el = $(form[a[i].name]);
					el[useProp ? 'prop': 'attr']('disabled', false);
				}
			}
			if ($(':input[name=submit],:input[id=submit]', form).length) {
				alert('Error: Form elements must not have name or id of "submit".');
				return;
			}
			s = $.extend(true, {},
			$.ajaxSettings, options);
			s.context = s.context || s;
			id = 'jqFormIO' + (new Date().getTime());
			if (s.iframeTarget) {
				$io = $(s.iframeTarget);
				n = $io.attr('name');
				if (n == null) $io.attr('name', id);
				else id = n;
			}
			else {
				$io = $('<iframe name="' + id + '" src="' + s.iframeSrc + '" />');
				$io.css({
					position: 'absolute',
					top: '-1000px',
					left: '-1000px'
				});
			}
			io = $io[0];
			xhr = {
				aborted: 0,
				responseText: null,
				responseXML: null,
				status: 0,
				statusText: 'n/a',
				getAllResponseHeaders: function () {},
				getResponseHeader: function () {},
				setRequestHeader: function () {},
				abort: function (status) {
					var e = (status === 'timeout' ? 'timeout': 'aborted');
					log('aborting upload... ' + e);
					this.aborted = 1;
					$io.attr('src', s.iframeSrc);
					xhr.error = e;
					s.error && s.error.call(s.context, xhr, e, status);
					g && $.event.trigger("ajaxError", [xhr, s, e]);
					s.complete && s.complete.call(s.context, xhr, e);
				}
			};
			g = s.global;
			if (g && !$.active++) {
				$.event.trigger("ajaxStart");
			}
			if (g) {
				$.event.trigger("ajaxSend", [xhr, s]);
			}
			if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
				if (s.global) {
					$.active--;
				}
				return;
			}
			if (xhr.aborted) {
				return;
			}
			sub = form.clk;
			if (sub) {
				n = sub.name;
				if (n && !sub.disabled) {
					s.extraData = s.extraData || {};
					s.extraData[n] = sub.value;
					if (sub.type == "image") {
						s.extraData[n + '.x'] = form.clk_x;
						s.extraData[n + '.y'] = form.clk_y;
					}
				}
			}
			var CLIENT_TIMEOUT_ABORT = 1;
			var SERVER_ABORT = 2;
			function getDoc(frame) {
				var doc = frame.contentWindow ? frame.contentWindow.document: frame.contentDocument ? frame.contentDocument: frame.document;
				return doc;
			}
			function doSubmit() {
				var t = $form.attr('target'),
				a = $form.attr('action');
				form.setAttribute('target', id);
				if (!method) {
					form.setAttribute('method', 'POST');
				}
				if (a != s.url) {
					form.setAttribute('action', s.url);
				}
				if (!s.skipEncodingOverride && (!method || /post/i.test(method))) {
					$form.attr({
						encoding: 'multipart/form-data',
						enctype: 'multipart/form-data'
					});
				}
				if (s.timeout) {
					timeoutHandle = setTimeout(function () {
						timedOut = true;
						cb(CLIENT_TIMEOUT_ABORT);
					},
					s.timeout);
				}
				function checkState() {
					try {
						var state = getDoc(io).readyState;
						log('state = ' + state);
						if (state.toLowerCase() == 'uninitialized') setTimeout(checkState, 50);
					}
					catch(e) {
						log('Server abort: ', e, ' (', e.name, ')');
						cb(SERVER_ABORT);
						timeoutHandle && clearTimeout(timeoutHandle);
						timeoutHandle = undefined;
					}
				}
				var extraInputs = [];
				try {
					if (s.extraData) {
						for (var n in s.extraData) {
							extraInputs.push($('<input type="hidden" name="' + n + '" />').attr('value', s.extraData[n]).appendTo(form)[0]);
						}
					}
					if (!s.iframeTarget) {
						$io.appendTo('body');
						io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
					}
					setTimeout(checkState, 15);
					form.submit();
				}
				finally {
					form.setAttribute('action', a);
					if (t) {
						form.setAttribute('target', t);
					} else {
						$form.removeAttr('target');
					}
					$(extraInputs).remove();
				}
			}
			if (s.forceSync) {
				doSubmit();
			}
			else {
				setTimeout(doSubmit, 10);
			}
			var data, doc, domCheckCount = 50,
			callbackProcessed;
			function cb(e) {
				if (xhr.aborted || callbackProcessed) {
					return;
				}
				try {
					doc = getDoc(io);
				}
				catch(ex) {
					log('cannot access response document: ', ex);
					e = SERVER_ABORT;
				}
				if (e === CLIENT_TIMEOUT_ABORT && xhr) {
					xhr.abort('timeout');
					return;
				}
				else if (e == SERVER_ABORT && xhr) {
					xhr.abort('server abort');
					return;
				}
				if (!doc || doc.location.href == s.iframeSrc) {
					if (!timedOut) return;
				}
				io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
				var status = 'success',
				errMsg;
				try {
					if (timedOut) {
						throw 'timeout';
					}
					var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
					log('isXml=' + isXml);
					if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
						if (--domCheckCount) {
							log('requeing onLoad callback, DOM not available');
							setTimeout(cb, 250);
							return;
						}
					}
					var docRoot = doc.body ? doc.body: doc.documentElement;
					xhr.responseText = docRoot ? docRoot.innerHTML: null;
					xhr.responseXML = doc.XMLDocument ? doc.XMLDocument: doc;
					if (isXml) s.dataType = 'xml';
					xhr.getResponseHeader = function (header) {
						var headers = {
							'content-type': s.dataType
						};
						return headers[header];
					};
					if (docRoot) {
						xhr.status = Number(docRoot.getAttribute('status')) || xhr.status;
						xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;
					}
					var dt = s.dataType || '';
					var scr = /(json|script|text)/.test(dt.toLowerCase());
					if (scr || s.textarea) {
						var ta = doc.getElementsByTagName('textarea')[0];
						if (ta) {
							xhr.responseText = ta.value;
							xhr.status = Number(ta.getAttribute('status')) || xhr.status;
							xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;
						}
						else if (scr) {
							var pre = doc.getElementsByTagName('pre')[0];
							var b = doc.getElementsByTagName('body')[0];
							if (pre) {
								xhr.responseText = pre.textContent ? pre.textContent: pre.innerHTML;
							}
							else if (b) {
								xhr.responseText = b.innerHTML;
							}
						}
					}
					else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
						xhr.responseXML = toXml(xhr.responseText);
					}
					try {
						data = httpData(xhr, s.dataType, s);
					}
					catch(e) {
						status = 'parsererror';
						xhr.error = errMsg = (e || status);
					}
				}
				catch(e) {
					log('error caught: ', e);
					status = 'error';
					xhr.error = errMsg = (e || status);
				}
				if (xhr.aborted) {
					log('upload aborted');
					status = null;
				}
				if (xhr.status) {
					status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success': 'error';
				}
				if (status === 'success') {
					s.success && s.success.call(s.context, data, 'success', xhr);
					g && $.event.trigger("ajaxSuccess", [xhr, s]);
				}
				else if (status) {
					if (errMsg == undefined) errMsg = xhr.statusText;
					s.error && s.error.call(s.context, xhr, status, errMsg);
					g && $.event.trigger("ajaxError", [xhr, s, errMsg]);
				}
				g && $.event.trigger("ajaxComplete", [xhr, s]);
				if (g && !--$.active) {
					$.event.trigger("ajaxStop");
				}
				s.complete && s.complete.call(s.context, xhr, status);
				callbackProcessed = true;
				if (s.timeout) clearTimeout(timeoutHandle);
				setTimeout(function () {
					if (!s.iframeTarget) $io.remove();
					xhr.responseXML = null;
				},
				100);
			}
			var toXml = $.parseXML ||
			function (s, doc) {
				if (window.ActiveXObject) {
					doc = new ActiveXObject('Microsoft.XMLDOM');
					doc.async = 'false';
					doc.loadXML(s);
				}
				else {
					doc = (new DOMParser()).parseFromString(s, 'text/xml');
				}
				return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc: null;
			};
			var parseJSON = $.parseJSON ||
			function (s) {
				return window['eval']('(' + s + ')');
			};
			var httpData = function (xhr, type, s) {
				var ct = xhr.getResponseHeader('content-type') || '',
				xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
				data = xml ? xhr.responseXML: xhr.responseText;
				if (xml && data.documentElement.nodeName === 'parsererror') {
					$.error && $.error('parsererror');
				}
				if (s && s.dataFilter) {
					data = s.dataFilter(data, type);
				}
				if (typeof data === 'string') {
					if (type === 'json' || !type && ct.indexOf('json') >= 0) {
						data = parseJSON(data);
					} else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
						$.globalEval(data);
					}
				}
				return data;
			};
		}
	};
	$.fn.ajaxForm = function (options) {
		if (this.length === 0) {
			var o = {
				s: this.selector,
				c: this.context
			};
			if (!$.isReady && o.s) {
				log('DOM not ready, queuing ajaxForm');
				$(function () {
					$(o.s, o.c).ajaxForm(options);
				});
				return this;
			}
			log('terminating; zero elements found by selector' + ($.isReady ? '': ' (DOM not ready)'));
			return this;
		}
		return this.ajaxFormUnbind().bind('submit.form-plugin', function (e) {
			if (!e.isDefaultPrevented()) {
				e.preventDefault();
				$(this).ajaxSubmit(options);
			}
		}).bind('click.form-plugin', function (e) {
			var target = e.target;
			var $el = $(target);
			if (! ($el.is(":submit,input:image"))) {
				var t = $el.closest(':submit');
				if (t.length == 0) {
					return;
				}
				target = t[0];
			}
			var form = this;
			form.clk = target;
			if (target.type == 'image') {
				if (e.offsetX != undefined) {
					form.clk_x = e.offsetX;
					form.clk_y = e.offsetY;
				} else if (typeof $.fn.offset == 'function') {
					var offset = $el.offset();
					form.clk_x = e.pageX - offset.left;
					form.clk_y = e.pageY - offset.top;
				} else {
					form.clk_x = e.pageX - target.offsetLeft;
					form.clk_y = e.pageY - target.offsetTop;
				}
			}
			setTimeout(function () {
				form.clk = form.clk_x = form.clk_y = null;
			},
			100);
		});
	};
	$.fn.ajaxFormUnbind = function () {
		return this.unbind('submit.form-plugin click.form-plugin');
	};
	$.fn.formToArray = function (semantic) {
		var a = [];
		if (this.length === 0) {
			return a;
		}
		var form = this[0];
		var els = semantic ? form.getElementsByTagName('*') : form.elements;
		if (!els) {
			return a;
		}
		var i, j, n, v, el, max, jmax;
		for (i = 0, max = els.length; i < max; i++) {
			el = els[i];
			n = el.name;
			if (!n) {
				continue;
			}
			if (semantic && form.clk && el.type == "image") {
				if (!el.disabled && form.clk == el) {
					a.push({
						name: n,
						value: $(el).val()
					});
					a.push({
						name: n + '.x',
						value: form.clk_x
					},
					{
						name: n + '.y',
						value: form.clk_y
					});
				}
				continue;
			}
			v = $.fieldValue(el, true);
			if (v && v.constructor == Array) {
				for (j = 0, jmax = v.length; j < jmax; j++) {
					a.push({
						name: n,
						value: v[j]
					});
				}
			}
			else if (v !== null && typeof v != 'undefined') {
				a.push({
					name: n,
					value: v
				});
			}
		}
		if (!semantic && form.clk) {
			var $input = $(form.clk),
			input = $input[0];
			n = input.name;
			if (n && !input.disabled && input.type == 'image') {
				a.push({
					name: n,
					value: $input.val()
				});
				a.push({
					name: n + '.x',
					value: form.clk_x
				},
				{
					name: n + '.y',
					value: form.clk_y
				});
			}
		}
		return a;
	};
	$.fn.formSerialize = function (semantic) {
		return $.param(this.formToArray(semantic));
	};
	$.fn.fieldSerialize = function (successful) {
		var a = [];
		this.each(function () {
			var n = this.name;
			if (!n) {
				return;
			}
			var v = $.fieldValue(this, successful);
			if (v && v.constructor == Array) {
				for (var i = 0, max = v.length; i < max; i++) {
					a.push({
						name: n,
						value: v[i]
					});
				}
			}
			else if (v !== null && typeof v != 'undefined') {
				a.push({
					name: this.name,
					value: v
				});
			}
		});
		return $.param(a);
	};
	$.fn.fieldValue = function (successful) {
		for (var val = [], i = 0, max = this.length; i < max; i++) {
			var el = this[i];
			var v = $.fieldValue(el, successful);
			if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
				continue;
			}
			v.constructor == Array ? $.merge(val, v) : val.push(v);
		}
		return val;
	};
	$.fieldValue = function (el, successful) {
		var n = el.name,
		t = el.type,
		tag = el.tagName.toLowerCase();
		if (successful === undefined) {
			successful = true;
		}
		if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || (t == 'checkbox' || t == 'radio') && !el.checked || (t == 'submit' || t == 'image') && el.form && el.form.clk != el || tag == 'select' && el.selectedIndex == -1)) {
			return null;
		}
		if (tag == 'select') {
			var index = el.selectedIndex;
			if (index < 0) {
				return null;
			}
			var a = [],
			ops = el.options;
			var one = (t == 'select-one');
			var max = (one ? index + 1 : ops.length);
			for (var i = (one ? index: 0); i < max; i++) {
				var op = ops[i];
				if (op.selected) {
					var v = op.value;
					if (!v) {
						v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text: op.value;
					}
					if (one) {
						return v;
					}
					a.push(v);
				}
			}
			return a;
		}
		return $(el).val();
	};
	$.fn.clearForm = function () {
		return this.each(function () {
			$('input,select,textarea', this).clearFields();
		});
	};
	$.fn.clearFields = $.fn.clearInputs = function () {
		var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
		return this.each(function () {
			var t = this.type,
			tag = this.tagName.toLowerCase();
			if (re.test(t) || tag == 'textarea') {
				this.value = '';
			}
			else if (t == 'checkbox' || t == 'radio') {
				this.checked = false;
			}
			else if (tag == 'select') {
				this.selectedIndex = -1;
			}
		});
	};
	$.fn.resetForm = function () {
		return this.each(function () {
			if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
				this.reset();
			}
		});
	};
	$.fn.enable = function (b) {
		if (b === undefined) {
			b = true;
		}
		return this.each(function () {
			this.disabled = !b;
		});
	};
	$.fn.selected = function (select) {
		if (select === undefined) {
			select = true;
		}
		return this.each(function () {
			var t = this.type;
			if (t == 'checkbox' || t == 'radio') {
				this.checked = select;
			}
			else if (this.tagName.toLowerCase() == 'option') {
				var $sel = $(this).parent('select');
				if (select && $sel[0] && $sel[0].type == 'select-one') {
					$sel.find('option').selected(false);
				}
				this.selected = select;
			}
		});
	};
	function log() {
		var msg = '[jquery.form] ' + Array.prototype.join.call(arguments, '');
		if (window.console && window.console.log) {
			window.console.log(msg);
		}
		else if (window.opera && window.opera.postError) {
			window.opera.postError(msg);
		}
	};
})(jQuery);
function trackPage() {
	try {
		var pageTracker = _gat._getTracker("UA-622471-1");
		pageTracker._trackPageview();
	} catch(err) {}
}
function thumbActions() {
	$(".unit").hover(function () {
		$(this).children('.info').stop(true, true).slideDown('fast');
	},
	function () {
		$(this).children('.info').stop(true, true).slideUp();
	});
	$(".unit a").click(function () {
		$(".unit").children('.info').stop(true, true).slideUp('fast');
	});
}
function showNotes() {
	$(".note").click(function (e) {
		e.preventDefault();
		$(".notes").stop(true, true).slideToggle('fast');
	});
}
function contact() {
	$('body').append("<div id='myModal' class='reveal-modal'></div>");
	$('body').append("<div id='successModal' class='reveal-modal'></div>");
	var current;
	$('#talk').click(function (e) {
		e.preventDefault();
		if ($(this).parent().is('.current')) {
			$(this).parent().removeClass('current');
			current.addClass('current');
			$('#myModal').trigger('reveal:close');
		} else {
			current = $('.current');
			current.removeClass('current');
			$(this).parent().addClass('current');
			$('#myModal').load('/contact #contact_form', function () {
				$('#myModal').reveal({
					animation: 'fadeAndPop',
					animationspeed: 300,
					closeonbackgroundclick: false
				});
				$('a.close').click(function (e) {
					$('#myModal').trigger('reveal:close');
					$('#talk').parent().removeClass('current');
					current.addClass('current');
				});
				$("#submit").click(function (event) {
					event.preventDefault();
					$("#contact_form").ajaxSubmit({
						beforeSubmit: function (data) {
							var name = $('input[name=name]');
							var nameVal = $('input[name=name]').val();
							var from = $('input[name=from]');
							var fromVal = $('input[name=from]').val();
							var subject = $('input[name=subject]');
							var subjectVal = $('input[name=subject]').val();
							var message = $('textarea[name=message]');
							var messageVal = $('textarea[name=message]').val();
							var validEmail = true;
							checkField(name, nameVal, "You are, again?");
							checkField(from, fromVal, "You want me to actually email you back, right?");
							checkEmail(from, fromVal, "This isn't a valid email address");
							checkField(subject, subjectVal, "What's this all about?");
							checkField(message, messageVal, "Hmmm. I'm not sure what the point is without a message.");
							function checkField(field, fieldVal, message) {
								if (!fieldVal) {
									field.attr('placeholder', message);
									field.addClass('error');
									field.keypress(function () {
										field.removeClass('error');
									});
								}
							}
							function checkEmail(field, fieldVal, message) {
								var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
								if (!filter.test(fieldVal)) {
									field.addClass('error');
									validEmail = false;
								}
							}
							if (!nameVal || !fromVal || !subjectVal || !messageVal || validEmail == false) {
								return false;
							}
						},
						success: function (data) {
							$('#myModal').load('/success .success', function () {
								$('.success').fadeOut(0);
								$('.success').fadeIn().delay(2000).queue(function () {
									$('#talk').parent().removeClass('current');
									current.addClass('current');
									$('#myModal').trigger('reveal:close');
								});
							});
						}
					});
				});
			});
		}
	});
}
function logoState() {
	var isShown = false;
	$('#nav').prepend("<li id='navlogo'><a href='/'></a></li>");
	$('#logo img').clone().prependTo('#navlogo a');
	$('#navlogo').css({
		'width': 'toggle',
		'opacity': 'hide'
	})
	$('#navlogo').hide();
	$(window).scroll(function () {
		if ($(window).scrollTop() >= 60 && isShown == false) {
			isShown = true;
			$('#prime').addClass('docked');
			$('#navlogo').animate({
				"width": "toggle",
				"opacity": "show"
			},
			150);
		} else if ($(window).scrollTop() < 55 && isShown == true) {
			isShown = false;
			$('#prime').removeClass('docked');
			$('#navlogo').animate({
				"width": "toggle",
				"opacity": "hide"
			},
			25);
		}
	});
}
function isoTrigger() {
	$(window).bind("resize", resizeWindow);
	var oldWindowWidth = $('.container').width();
	function resizeWindow(e) {
		var newWindowWidth = $('.container').width();
		if (newWindowWidth != oldWindowWidth) {
			$('#iso').isotope('reLayout');
			oldWindowWidth = $('.container').width();
		}
	}
}
$(document).ready(function () {
	$('body').prepend('<div id="edge"></div>');
	thumbActions();
	showNotes();
	contact();
	logoState();
	isoTrigger();
	$('#iso').isotope({
		itemSelector: '.unit',
		masonry: {
			columnWidth: 310
		},
		animationEngine: 'best-available',
		animationOptions: {
			duration: 750,
			easing: 'linear',
			queue: false
		}
	});
	trackPage();
});
*/
