jQuery.noConflict();

jQuery(document).ready(function(){
// CUFON --------------------------------------------------------------------------------------------------------------
	Cufon.replace('#content h3, .slide_desc, #content h4, h2, h3, h4, h5, caption', { fontFamily: 'ColaborateLight' });
	Cufon.replace('#feature_box h3, .post_head h3, .number, h1, th', { fontFamily: 'Colaborate-Medium' });
	Cufon.now();
	
// MAIN NAVIGATION -----------------------------------------------------------------------------------------------------
	jQuery('ul.main_nav').superfish({
		autoArrows:    true,
		disableHI:     true,
		dropShadows:   false,
		delay:         200,
		speed:         'fast',
		animation:     {opacity:'show', height:'show'}			
	});
		
// FORM LABEL & VALIDATION ----------------------------------------------------------------------------------------------			
	jQuery('label').inFieldLabels();
	
	jQuery('.contact_form').validate({
		rules: {	
					name: {
						required: true,
						minlength: 2
					},
					message: {
						required: true,
						minlength: 10
					}
				},
		submitHandler: function(form) {
			jQuery(form).ajaxSubmit({
				target: "#result",
				resetForm: true
			});
		}
	});
	
	jQuery('.subscribe_form').validate({
		rules: {	
					email: {
						required: true,
						email: true
					}
				},
		submitHandler: function(form) {
			jQuery(form).ajaxSubmit({
				target: "#result",
				resetForm: true
			});
		}
	});

// GALLERY THUMBNAILS ----------------------------------------------------------------------------------------------------
	jQuery('a.thumb,.btn').fancybox();
	
});

jQuery(window).load(function() {
// HOME PAGE ALTERNATIVE SLIDER ---------------------------------------------------------------------------------------------------	
	jQuery('#slider_container2').nivoSlider({
		effect:'random',
		slices:14,
		animSpeed:800,
		pauseTime:5000,
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:true, //1,2,3...
		pauseOnHover:false //Stop animation while hovering
	});	
});
