$(document).ready(function () {
	$(".submit").click(function () {
		$(this).parents("form").submit();
		return false;
	});
	
	$("#contracts").simplyScroll({
		className: 'contracts',
		autoMode: 'loop',
		horizontal: false,
		pauseOnHover: true,
		frameRate: 25,
		speed: 1
	});
	
	$("a[rel='colorbox']").colorbox();
    
    $('.projectsSlide').live('click', function () {
    	$(this).parent().find('a.projectImage').colorbox({open:true});
    	return false;
    });
    
    var flowbar = new ImageFlow();
    flowbar.init({ ImageFlowID: 'flowbar',
                      circular: false,
                      reflections: false,
		      imagesHeight : 0.7,
		      reflectPath : '/',
                      reflectionP: 0.05,
		      reflectionPNG : true,
                      slider: false,
		      preloadImages: false,
		      percentLandscape: 115,
                      captions: false,
                      opacity: true,
                      xStep: 230,
		      onClick : function() {
			var link = $("<a/>", {href: $(this).attr('src'), alt: '', rel: '', title: ''}).colorbox({width:'550px', height:'500px', open:true});
			console.debug(link);
		      },
                      imageFocusM: 1.5,
                      startID: 5 });
});
