/*
 * Author => Company       : Prodo Ltd
 *        => Website       : http://www.prodo.com
 * Code   => Last Modified : 11 February 2010
 */

$(function() {
	
	/*
	 * 
	 */
	$(document).pngFix();
	
	/*
	 * Make external links open in a new window
	 */
	$('a[rel=external]').click(function(e) {
		open(this.href);
		e.preventDefault();
	}).attr('title', 'Opens in a new window');
	
	/*
	 * FancyBox
	 */
	$('.gallery ul li a[rel=group]').fancybox({
		titlePosition : 'over',
		transitionIn  : 'elastic',
		transitionOut : 'elastic'
	});
	
	/*
	 * 
	 */
	$('.navigation ul li:last').addClass('last-item');
	
	/*
	 * Manipulate Umbraco's image alignment
	 */
	$('#content img').each(function(e) {
		if($(this).css('float') == 'left') {
			$(this).addClass('left');
		}
		else if($(this).css('float') == 'right') {
			$(this).addClass('right');
		}
	});
	
});
