// Debugging-Function. Only active in Browser who support it
function pr() {
	if (!window.console) {
		return;
	}
	if (typeof window.console !== 'undefined' && typeof window.console.log === 'function') {
		console.log(pr.arguments);
	}
}

(function($) {
	// Produces correct URLs relative to Router::url('/)
	$.url = function(url) {
	  return $('meta[name=identifier-url]').attr('content')+url.substr(1);
	}

	$(function() {
		//Take care about the non-js fallback-version of the site 
		$('body').addClass('js').removeClass('no-js');
 
		// Make external links open in a new window
		$('a[rel=external]').live('click', function() {
			window.open(this.href);
			return false;
		});

		$('#slideshow').innerfade({
			animationtype: 'fade',
			speed: 3000,
			timeout: 20000,
			type: 'sequence',
			containerheight: '1em'
		});
		
		$('a[rel*=lightbox]').lightBox();

	});


})(jQuery);


