jQuery.noConflict();

var ac = {

	init: function() {
		this.prepareDocument();
		this.enableFancybox();
		this.enableIntro();
	},

	prepareDocument: function() {
		jQuery('html').addClass('js');
	},
	
	enableIntro: function() {
		var intro = jQuery('#intro');
		jQuery('#intro a, #controls a').hover(
			function() {
				intro.find('div').hide();
				jQuery('#'+ this.hash.slice(1)).find('div').fadeIn(300);
			},
			function() {
				intro.find('div').fadeOut(200);
			}
		);
	},
	
	enableFancybox: function() {
		jQuery('body:not(.home)').find('a:has(img)').attr('rel', 'gallery').fancybox({
			'transitionIn': 'fade',
			'transitionOut': 'fade',
			'opacity': false,
			'overlayShow': true,
			'overlayColor': '#fff',
			'hideOnContentClick': true,
			'showCloseButton': false,
			'titleShow': false,
			'speedIn': 200,
			'speedOut': 200,
			'padding': 7
		});
	}
};

jQuery(function() {
	ac.init();
});
