function setupPrettyphoto(q) {
	q.prettyPhoto({
		animationSpeed: 'slow', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.6, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: ' of ', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded' /* light_rounded / dark_rounded / light_square / dark_square */
	});
}
$(function() {
	$('a[href$=.jpg]').attr({rel : "prettyPhoto"});
	$('a[href$=.jpeg]').attr({rel : "prettyPhoto"});
	$('a[href$=.JPG]').attr({rel : "prettyPhoto"});
	$('a[href$=.JPEG]').attr({rel : "prettyPhoto"});
	$('a[href$=.gif]').attr({rel : "prettyPhoto"});
	$('a[href$=.GIF]').attr({rel : "prettyPhoto"});
	$('a[href$=.png]').attr({rel : "prettyPhoto"});
	$('a[href$=.PNG]').attr({rel : "prettyPhoto"});
	$('.gallery a[href$=.jpg]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.jpeg]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.JPG]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.JPEG]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.gif]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.GIF]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.png]').attr({rel : "prettyPhoto[gallery]"});
	$('.gallery a[href$=.PNG]').attr({rel : "prettyPhoto[gallery]"});
	setupPrettyphoto($("a[rel^='prettyPhoto']"));
});