function change_carousel()
{
	clearTimeout(carousel_timer);
	if(jQuery("#img_carousel_image_" + current_carousel).data("loaded") == "1")
	{
		jQuery("div[id^=carousel_title_]").hide();
		jQuery("div[id^=dot_]").attr('class', 'landing_dot_white');
		
		
		// jQuery("div[id^=carousel_image_]").hide();
		last_carousel = (7 + (current_carousel - 1)) % 7;
		jQuery("#carousel_image_" + last_carousel).fadeOut(
			'slow',
			function(){
				jQuery("#carousel_image_" + current_carousel).fadeIn('slow');
				jQuery("#carousel_title_" + current_carousel).show();
				jQuery("#dot_" + current_carousel).attr('class', 'landing_dot_grey');
				current_carousel = (current_carousel + 1) % 7;
				carousel_timer = setTimeout(change_carousel, 8000);		
			}
		);
		
		
	}
	else
	{
		carousel_timer = setTimeout(change_carousel, 1000);
	}
}

			
function show_category_page(page)
{
}

function toggle_enquiry_form()
{
	jQuery("#div_global_enquiry_form").toggle();
}

function send_enquiry()
{
	var name = jQuery("#tb_name").val();
	var email = jQuery("#tb_email").val();
	var how_do_you_know = jQuery("#tb_how_do_you_know").val();
	var enquiry = jQuery("#tb_enquiry").val();
	var contact = jQuery("#tb_contact").val();
	
	
	jQuery.post( "send_enquiry.php", 'name=' + escape(name) + '&email=' + escape(email) + '&how_do_you_know=' + escape(how_do_you_know) + '&contact=' + contact + '&enquiry=' + escape(enquiry),
		function(data){
			if(data == 'success')
			{
				jQuery("#div_global_enquiry_form").html("<span style='color: #cccccc;'><br><br><br><br><b>Thank you for your enquiry.<br>We will get back to you as soon as possible.<br><br><br><br></b></span>");
			}
		},
		"HTML"
	);
}

function send_enquiry_form()
{
	var name = jQuery("#fm_name").val();
	var email = jQuery("#fm_email").val();
	var how_do_you_know = jQuery("#fm_how_do_you_know").val();
	var enquiry = jQuery("#fm_enquiry").val();
	var contact = jQuery("#fm_contact").val();
	
	jQuery.post( "send_enquiry.php", 'name=' + escape(name) + '&email=' + escape(email) + '&how_do_you_know=' + escape(how_do_you_know) + '&contact=' + contact + '&enquiry=' + escape(enquiry),
		function(data){
			if(data == 'success')
			{
				jQuery("#div_enquiry_form").html("<span style='color: #4c4c4c;'><br><br><br><br><b>Thank you for your enquiry. We will get back to you as soon as possible.<br><br><br><br></b></span>");
			}
		},
		"HTML"
	);
}



