
jQuery(function($) {
var options = {
			loop: true,
			overlayOpacity: 0.8,
			overlayFadeDuration: 400,
			resizeDuration: 400,
			resizeEasing: "swing",
			initialWidth: 250,
			initialHeight: 250,
			imageFadeDuration: 400,
			captionAnimationDuration: 400,
			counterText: "Image {x} of {y}",
			closeKeys: [27, 88, 67],
			previousKeys: [37, 80],
			nextKeys: [39, 78]
		}
$("#lbOverlay").css("background-color","#000000");
$("#lbPrevLink").hover(
	function () {
		$(this).css("background-image","url('http://wendyknits.net/wp-content/plugins/wp-slimbox2/images/default/prevlabel.gif')");
	},
	function () {
		$(this).css("background-image","");
	}
);
$("#lbNextLink").hover(
	function () {
		$(this).css("background-image","url('http://wendyknits.net/wp-content/plugins/wp-slimbox2/images/default/nextlabel.gif')");
	},
	function () {
		$(this).css("background-image","");
	}
);
$("#lbCloseLink").css("background","transparent url('http://wendyknits.net/wp-content/plugins/wp-slimbox2/images/default/closelabel.gif') no-repeat center");
$("a[href]").filter(function() {
		return /\.(jpg|png|gif)(\?[\d\w=&]*)?$/i.test(this.href);
	}).slimbox(options, null, function(el) {
		return (this == el) || ($(this).parents("div.post, div#page")[0] && ($(this).parents("div.post, div#page")[0] == $(el).parents("div.post, div#page")[0]));
	});
$("a[href^='http://www.flickr.com/photos/'] > img:first-child[src]").parent().slimbox(options, function(el) {
	return [el.firstChild.src.replace(/_[mts]\.(\w+)$/, ".$1"),
		(el.title || el.firstChild.alt) + '<br /><a href="' + el.href + '">Flickr page</a>'];
});

});