$(document).ready(function(){
	
	$('.featured-thumbnails a').lightBox();
	
	var doc_height = $(document).height();
	var win_height = $(window).height();
	var con_height = $('.content').height() + 540;
	
	
	if (con_height <= win_height) {
		var h = $(document).height() - 540;
		$('.content').css('height', h);
	}	
	$(window).resize(function(){
		var doc_height = $(document).height();
		var con_height = $('.content').height() + 540;
		if (con_height < win_height) {
			var h = $(document).height() - 540;
			$('.content').css('height', h);
		}	
	});	
	
	
	$('div.wpcf7-response-output').replaceWith('');
	$('.wpcf7').prepend('<div class="wpcf7-response-output wpcf7-display-none"></div>');
	
	$('.gsom_sfi').children('INPUT').addClass('auto-hint');
	
	$('.slider-content').jCarouselLite({
        btnNext: ".next-button",
        btnPrev: ".prev-button",
		visible: 1
	});
	
	Cufon.replace('.featured-slider p')('.main H3');
	Cufon.set('fontFamily', 'Century Gothic').replace('H2')('.header .menu LI', {hover: true})('.header h6')('.header .social P')('.header .links ul li a', {hover: true})('.small-column p')('.featured-slider H2')('.bottom-data ul li')('.bottom-data P')('.sidebar UL LI')('.sidebar H1')('.sidebar H2')('.sidebar .signup P')('.more-link', {hover: true})('.wpcf7 P');
	Cufon.set('fontFamily', 'angelina').replace('.blockquote H2')
	
	setTimeout(function(){
		$('.gsom_sfi INPUT:eq(0)').attr('title', 'First Name');
		$('.gsom_sfi INPUT:eq(1)').attr('title', 'Last Name');
		$('.gsom_sfi INPUT:eq(2)').attr('title', 'Email');
		
		$('INPUT.auto-hint, .gsom_sfi INPUT').each(function(i, el){
			if($(this).val() == ''){
				$(this).val($(this).attr('title'));
			}
			$(el).focus(function(){
				if ($(this).val() == $(this).attr('title')) {
					$(this).val('');
				}       
			});
			$(el).blur(function(){
				if ($(this).val() == '') {
					$(this).val($(this).attr('title'));
				}
			});
		});
	},1500);
	
});
