jQuery.noConflict();

jQuery(document).ready(function(){
	jQuery("a[rel^='prettyPhoto']").prettyPhoto();
	jQuery(function() {
			    jQuery('ul.menu a').bind('click',function(event){
			        var jQueryanchor = jQuery(this);			        
			        jQuery('html, body').stop().animate({
			            scrollLeft: jQuery(jQueryanchor.attr('href')).offset().left
			        }, 1000,'easeInOutSine');
			        event.preventDefault();
			    });
			    jQuery('#home').bind('click',function(event){
			        
			        jQuery('html, body').stop().animate({
			            scrollLeft: jQuery('#main').offset().left
			        }, 1000,'easeInOutSine');
			        event.preventDefault();
			    });
			 
		            var offset = jQuery("#home").offset();
		            var leftPadding = 15;
		            jQuery(window).scroll(function() {
		                if (jQuery(window).scrollLeft() > offset.left) {
		                	jQuery("#home").stop().animate({
		                        marginLeft: jQuery(window).scrollLeft() - offset.left + leftPadding
		                    }, 1000,'easeInOutSine');
		                } else {
		                	jQuery("#home").stop().animate({
		                        marginLeft: 1
		                    });
		                };
		            });
		       

			    
			    
			});

//	jQuery('#image_rotate').innerfade({ 
//			speed: 2000, 
//			timeout: 8000, 
//			type: 'sequence', 
//			containerheight: '130px',
//			containerwidth: '550px'
//	});
			 			
});
