$(document).ready(function() {
	nd.rollover.init();
	
	Cufon.replace('h1', { fontFamily: 'Din' });
	Cufon.replace('h5', { fontFamily: 'Din' });
	
	if ($('.contact-details').length > 0) {
		
		$('#details_50').show();
		$('#link_50').addClass('current');
		
		$('.contact-link').click(function() {
			$('.contact-link').removeClass('current');
			$(this).addClass('current'); 
			$('.contact-details').hide();
			var theID = $(this).attr('id').substr(5);
			$('#details_' + theID).show();
		});
	}
	
	if ($('.project-type')) { 
		Cufon.replace('.project-type', {fontFamily: 'Din Bold'});
	}
	
	
	if ($('#scroller').length > 0) {
		$("#scroller").simplyScroll({
				className: 'vert',
				horizontal: false,
				frameRate: 30,
				speed: 15
		});
	}
	
	if ($('#frontpage-contain').length >0 ) { 
		$('#frontpage-contain').cycle({ 
			fx:    'scrollLeft',
	    	timeout: 6000, 
	    	delay:  -2000,
	    	next:   '#arrow-left', 
    		prev:   '#arrow-right'  
		});	
	}
	
	if ($('#feature-center').length >0 ) { 
		$('#feature-center').cycle({ 
	    	timeout: 6000,
	    	delay:  -2000,
	    	next:   '#arrow-left', 
    		prev:   '#arrow-right' 
    		
    	});	
	}
	
	if ( $('.submit').length > 0 ) {
		$('.submit').click(function() { 
			$('#register').submit();
		});
	}
	
	if ( $('.map-overs').length > 0 ) {
		$(".blip-link").hover(
		  function () {
		    theID = $(this).attr('id').substr(5);
		    $('#map-over-' + theID).show();
		  }, 
		  function () {
		    $('.map-overs').hide();
		  }
		);
	}
	

});
