$(document).ready( function() {

	// FONT REPLACEMENT (CUFON)
	$('#nav').css('font-size', '18pt');
	$('#nav').css('top', '17px');
	$('#nav #box').show();
	$('#heading').css('font-size', '27pt');
	$('#heading').css('top', '7px');
	$('#tagline').css('top', '43px');	
	$('#tagline').css('left', '118px');	
	$('#tagline').css('font-size', '15pt');	
	$('h2').css('font-size', '22pt');	
	$('h4.cufon').css('font-size', '19pt');	
	Cufon.replace('h1');
	Cufon.replace('.cufon');
	Cufon.replace('h3');
	Cufon.replace('#nav ul li');
	Cufon.replace('h4.cufon');

	// NAVIGATION MENU (LAVALAMP)
	var style = 'easeOutBack';
	var default_left = Math.round($('#nav li.selected').offset().left - $('#nav').offset().left);
	var default_width = $('#nav li.selected').width();
	$('#box').css({left: default_left});
	$('#box .head').css({width: default_width});
	$('#nav li').hover(function () {
		left = Math.round($(this).offset().left - $('#nav').offset().left);
		width = $(this).width(); 
		$('#debug').html(left);
		$('#box').stop(false, true).animate({left: left},{duration:500, easing: style});	
		$('#box .head').stop(false, true).animate({width:width},{duration:500, easing: style});	
	}).click(function () {
		$('#nav li').removeClass('selected');	
		$(this).addClass('selected');
	});
	$('#nav').mouseleave(function () {
		default_left = Math.round($('#nav li.selected').offset().left - $('#nav').offset().left);
		default_width = $('#nav li.selected').width();
		$('#box').stop(false, true).animate({left: default_left},{duration:500, easing: style});	
		$('#box .head').stop(false, true).animate({width:default_width},{duration:500, easing: style});		
	});

	// JQUERY SLIDESHOW
	$('#slideshow').cycle({
		fx: 'fade',
		speed:  4500
	});

	// JQUERY LIGHTBOX
	$(function() {
		$('.jquery-lightbox').lightBox({fixedNavigation:false});
	});

	// FEEDBACKS DISPLAY
	$( '#feedback_newsletter' ).hide().fadeIn( 1000, function() {
		$(this).effect("shake", {}, 100);
	} );	

	// SMOOTH SCROLLING
	$.localScroll();
			

} );
