$(document).ready(function() {

	/**
	 * Set target="_blank" on external Links 
	 */
	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});

	/**
	 * Imageflow
	 */
	if ($('#imageflow').length > 0) {
		var instanceOne = new ImageFlow();
		instanceOne.init({
			'aspectRatio': 4,
			'buttons': true,
			'captions': false,
			'imageCursor': 'pointer',
			'ImageFlowID': 'imageflow',
			'imageScaling': true,
			'mousewheelscroll' : false,
			'percentLandscape' : 150,
			'percentOther' : 150,
			'reflections': false,
			'slider': false,
			'startID': 2,
			'xStep': 170
		});
	}

});

/**
 * Bookmarks in favorites
 */
function favorites(title, url)
{
	if (window.sidebar)
	{
		window.sidebar.addPanel(title, url, '');
	}
	else if(window.opera && window.print)
	{
		var elem = document.createElement('a');
		elem.setAttribute('href', url);
		elem.setAttribute('title', title);
		elem.setAttribute('rel', 'sidebar');
		elem.click();
	}
	else if(document.all)
	{
		window.external.AddFavorite(url, title);
	}
}

