$(document).ready(function(){
	
	if (typeof init_map == "function") {
		init_map();
	}
	
	if (typeof init_sbox == "function") {
		init_sbox();
	}
	
	if (get('#id_sender')) {
		$('#id_sender').focus(function() {
			var cValue = $(this).attr('value');
			$(this).css('color', '#000000')
			if (cValue == "enter your email") $(this).attr('value', '');
		});
		$('#id_sender').blur(function() {
			var cValue = $(this).attr('value');
			if (cValue == "") {
				$(this).attr('value', 'enter your email');
				$(this).css('color', '');
			}
		});
		$('#id_subject').focus(function() {
			var cValue = $(this).attr('value');
			$(this).css('color', '#000000')
			if (cValue == "the subject of your enquiry") $(this).attr('value', '');
		});
		$('#id_subject').blur(function() {
			var cValue = $(this).attr('value');
			if (cValue == "") {
				$(this).attr('value', 'the subject of your enquiry');
				$(this).css('color', '');
			}
		});
		$('#id_message').focus(function() {
			var cValue = $(this).html();
			$(this).css('color', '#000000')
			if (cValue == "your message") $(this).html('');
		});
		$('#id_message').blur(function() {
			var cValue = $(this).html()
			if (cValue == "") {
				$(this).html('your message');
				$(this).css('color', '');
			}
		});
	}
	
});

function get(el) {
    if($(el).length > 0) {
        return true;
    }
}