
// Start jQuery

$(document).ready(function() {
						   
Cufon.replace('h1, h4, .ge-phone', { fontFamily: 'mentone', textShadow: '0px 1px 0px #000000' });
Cufon.replace('h2, h3', { fontFamily: 'mentone' });
Cufon.replace('.tab h2', { fontFamily: 'mentone', color: '#d29466' });
Cufon.replace('td.product', { fontFamily: 'mentone', color: '#4B4B4B' });
Cufon.replace('.stretcher h4', { fontFamily: 'mentone', color: '#4B4B4B' });
Cufon.replace('form h1, form h3, .about-project h3, form h4', { fontFamily: 'mentone', color: '#000000' });
Cufon.replace('form h2', { fontFamily: 'mentone', color: '#4b4b4b' });

$(document).ready(function() {
   	$('.in-testimonials').cycle({fx:'fade', timeout:7000,  speed:2000});
});

$(document).ready(function() {
	$('#in-quote-form').ajaxForm(function(data) {
		if (data==1){alert('Please fill out the required fields to submit your enquiry.')}
		else if (data==0){alert('Your enquiry has been submitted. We will get back to your shortly.'); $('#in-quote-form').resetForm();}
	});
});	



$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        slices:15,
        animSpeed:500, //Slide transition speed
        pauseTime:3000,
        startSlide:0, //Set starting Slide (0 index)
        directionNav:false, //Next & Prev
        directionNavHide:false, //Only show on hover
        controlNav:true, //1,2,3...
        controlNavThumbs:false, //Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, //Use image rel for thumbs
        controlNavThumbsSearch: '.jpg', //Replace this with...
        controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
        keyboardNav:true, //Use left & right arrows
        pauseOnHover:true, //Stop animation while hovering
        manualAdvance:false, //Force manual transitions
        captionOpacity:0.8, //Universal caption opacity
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){}, //Triggers after all slides have been shown
        lastSlide: function(){}, //Triggers when last slide is shown
        afterLoad: function(){} //Triggers when slider has loaded
    });
});




// GLOBALS //

/* Hover functionality site-wide **********************************************/
	
	$('.hover').hover(function() {
	  $(this).addClass('active');
	}, function() {
	  $(this).removeClass('active');
	});
	

/* Fade toggler ***************************************************************/

	$.fn.fadeToggle = function(speed) {
	   return this.animate({opacity: 'toggle'}, speed);
	};

/* Newsletter *****************************************************************/
	
	$('form#newsletter').hide();
	$('a.signup').click(function () {
		$('form#newsletter').fadeToggle(200);
		return false;
	});


}); // End jQuery
