function pageLoaded() {
	Cufon.replace('h1, h2, h3, h4, h5, h6');
	Cufon.now()
};

$(function() {
		$('.field, textarea').focus(function() {
	        if(this.title==this.value) {
	            this.value = '';
	        }
	    }).blur(function(){
	        if(this.value=='') {
	            this.value = this.title;
	        }
	    });

	    $('#navigation li').hover(
	    	function() {
	    		$(this).find('> a').addClass('hover');
	    		$(this).find('> .dd').show();
	    	},
	    	function() {
	    		$(this).find('> a').removeClass('hover');
	    		$(this).find('> .dd').hide();
	    	}
	    );

	    //if ($('.home-slider').length) {
		//	$(".home-slider ul").jcarousel({
		//		auto: 5,
		///		scroll: 1,
		//		wrap: 'both',
		//		initCallback: mycarousel_initCallback,
		//		itemVisibleInCallback: mycarousel_itemVisibleInCallback,
		//		buttonNextHTML: null,
		//		buttonPrevHTML: null
		 //   });
		//};
});

function mycarousel_initCallback(carousel) {
	
	$('.home-slider .slider-controls a').click(function() {
		var slide_num = parseInt($(this).text());
		carousel.scroll(slide_num);
		return false;
	});
	
};

function mycarousel_itemVisibleInCallback(carousel, li, idx, state ) {
	
	$('.home-slider .slider-controls a').removeClass('active');
	$('.home-slider .slider-controls a').eq(idx-1).addClass('active');
    
};
