$.vs = {
	receiver : $("#content"),
	load : function(element){
		$.ajax({
			type: 'GET',
			url: site_url,
			data: "data="+element.id,
			success: function(data){
				$("#content").html("");
				$("#content").hide();
				$("#content").html(data);
				$("#content").fadeIn("slow");
				if(element.id=="references"){
					$("div#references_content").carousel({ 
						dispItems: 2,
						autoSlide: true,
				        autoSlideInterval: 5000,
				        loop: true
					});
					$(".previous").val("");
					$(".next").val("");
				}else if(element.id == "contact"){
					$("#send").click(function(){
						$.vs.send();
					});
				}
			},
			error: function(xhr,options,thrownError){
                $("#content").html("");
                $("#content").html(xhr.responseText);	
			}
		});
	},
	send : function(){
		$.ajax({
			type: 'POST',
			url:site_url + "send.php",
			data:  $("#contact_form").serialize(),
			success:function(data){
				$("#main1").html(data);
			}
		});
	}

};
function clearme(element){
	var val = element.id;
	var pos = ['Vaše ime i prezime...','Vaša e-mail adresa...','Broj Vašeg telefona...'];
	$.each(pos, function(key,value){
		if(value == $("#"+val).val())
			$("#"+val).val("");
	});
}

