/***** inline JavaScript *****/
jQuery(document).ready(function($) {

$("a:has(img)").each(function(index, obj) {

if ($(obj).attr("href").match('\.(?:jpe?g|gif|png|bmp)')) {

var $nestedElement = $(obj).children(0);
if ($nestedElement.is("img")) {
var $nestedElementClassAttribute = $nestedElement.attr("class");

var $groupId = $nestedElementClassAttribute.match('colorbox-[0-9]+') || $nestedElementClassAttribute.match('colorbox-manual');

if ($groupId && !$nestedElementClassAttribute.match('colorbox-off')) {

$groupId = $groupId.toString();

if ($groupId == "colorbox-manual") {
$groupId = false;
}


$(obj).colorbox({
rel:$groupId,
title:$nestedElement.attr("title"),
slideshowAuto:false,scalePhotos:false,                                    slideshowSpeed:"2500",
close:"close",
next:"next",
previous:"previous",
slideshowStart:"start slideshow",
slideshowStop:"stop slideshow",
current:"{current} of {total} images"
});
}
}
}
});
});

