
jQuery(function($) {
$("#lbOverlay").css("background-color","#000000");
$("#lbPrevLink").hover(
	function () {
		$(this).css("background-image","url(http://serhat-sine.com/blog/wp-content/plugins/wp-slimbox2/images/default/prevlabel.gif)");
	},
	function () {
		$(this).css("background-image","");
	}
);
$("#lbNextLink").hover(
	function () {
		$(this).css("background-image","url(http://serhat-sine.com/blog/wp-content/plugins/wp-slimbox2/images/default/nextlabel.gif)");
	},
	function () {
		$(this).css("background-image","");
	}
);

$("#lbCloseLink").css("background","transparent url(http://serhat-sine.com/blog/wp-content/plugins/wp-slimbox2/images/default/closelabel.gif) no-repeat center");
$("a[href]").filter(function() {
		return /\.(jpg|png|gif)$/i.test(this.href);
	}).slimbox({
			loop: false,
			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]
		}, 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://picasaweb.google.'] > img:first-child[src]").parent().slimbox({}, function(el) {
	return [el.firstChild.src.replace(/\/s\d+(-c)?\/([^\/]+)$/, "/s640/$2"),
		(el.title || el.firstChild.alt) + '<br /><a href="' + el.href + '">Picasa Web Albums page</a>'];
});

$("a[href^='http://www.flickr.com/photos/'] > img:first-child[src]").parent().slimbox({}, function(el) {
	return [el.firstChild.src.replace(/_[mts]\.(\w+)$/, ".$1"),
		(el.title || el.firstChild.alt) + '<br /><a href="' + el.href + '">Flickr page</a>'];
});

});