
// remap jQuery to $
(function($){
	



})(window.jQuery);


if(typeof(Shadowbox) != 'undefined') {
	

	function titleFix(currentImage) {
		log(currentImage);
		var titleParts = currentImage.title.split('::');
		var title = currentImage.title;
		if(titleParts[1]){
			title = '<strong>'+titleParts[0]+'</strong><br/>'+titleParts[1];
		}
		currentImage.title = title;
	}

	Shadowbox.init({
		slideshowDelay:5,
		overlayOpacity: 0.82,
		viewportPadding: 30,
		//animate: false,
		onOpen: function(currentImage) {
			titleFix(currentImage);
			Shadowbox.play();
			Shadowbox.pause();
	    },
		onChange: function(currentImage) {
			titleFix(currentImage);
		}
	});

}
	
// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};
