jQuery.noConflict();
jQuery(document).ready(function() {
	jQuery(".fancybox").fancybox({
		fitToView	: false,
		maxWidth	: 530,
		maxHeight	: 470,
		width		: 530,
		height		: 470,
		autoSize	: true,
		closeClick	: false,
		openEffect	: 'fade',
		closeEffect	: 'fade',
                scrolling       : 'no',
                aspectRatio     : true
	});
});

document.observe("dom:loaded", function() {
        initOverImg();
        initFeedback();	
        initHome();
});

function initHome(){
        $('body').appear({ duration: 1.0, from: 0, to: 1 });
}


function initOverImg(){
	$$('.homepage .home-box .image-box').each(
		function(e){
			e.observe("mouseover",fadeOn);
                        e.observe("mouseout",fadeOff);
		}
	);
}

function initFeedback(){
	if($('feedback')){
		$('feedback').observe('mouseover', function(event) {
	  		new Effect.Morph(this, {
				style: 'width:26px;', 
				duration: 0.2
			});
		});
	        $('feedback').observe('mouseout', function(event) {
	  		new Effect.Morph(this, {
				style: 'width:20px;', 
				duration: 0.2
			});
		});	
	}	
}

function fadeOn(event){
	var element = Event.findElement(event);
	element.fade({ duration: 0.5, to: 0.7 });
}

function fadeOff(event){
	var element = Event.findElement(event);
	element.fade({ duration: 0.5, to: 1.0 });
}

var addthis_config = {
	ui_hover_direction:-1,
	ui_header_background:"#FFF",
	ui_click:1
}
