$(function () {
	$(".pics img").
		fadeTo("fast", 0.5).
		hover(function () {
			$(this).fadeTo("fast", 1.0);
		}, function () {
			$(this).fadeTo("fast", 0.5);
		});

	//$("a[rel^='prettyPhoto']").prettyPhoto({ showTitle: true, theme: 'light_square' });
});

var galleryImages = function (selector, count) {
	$.get("./gallery.htm", function (response) {
		response = $(response).
			find("div.pics.thumbnails a").
			slice(0, count || 6).
				attr("rel", "prettyPhoto[Gallery]").
				prependTo(selector).
				children("img").
					fadeTo("fast", 0.5).
					hover(function () {
						$(this).fadeTo("fast", 1.0);
					}, function () {
						$(this).fadeTo("fast", 0.5);
					}).
					end().
				prettyPhoto({
					showTitle: true,
					theme: 'light_square'
				});
	});
};

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10166294-3']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
