// JavaScript Document
$(document).ready(function() {
	$('#password').focus(function() {  $(this).removeClass('password') });
	$('#password').blur(function() { 
		if ($(this).attr("value") == '') {
			$(this).addClass('password')
		}
	});


	$('#user').focus(function() {  $(this).removeClass('user') });
	$('#user').blur(function() { 
		if ($(this).attr("value") == '') {
			$(this).addClass('user')
		}
	});

	$('#admin').focus(function() {  $(this).removeClass('admin') });
	$('#admin').blur(function() { 
		if ($(this).attr("value") == '') {
			$(this).addClass('admin')
		}
	});
})

function openFooter(){
	if(document.getElementById('container_contact').style.display == 'none'){
		$('#container_contact').slideDown("slow")
		mOn(document.getElementById('footerOpenBtn'))
		document.getElementById('container_contact').style.display = 'block'
	}else{
		$('#container_contact').slideUp("slow")
		mOut(document.getElementById('footerOpenBtn'))
		document.getElementById('container_contact').style.display = 'none'
	}
}

function mOn(obj) {
	var ext = obj.src.slice(-3)
	if(obj.src.indexOf('_o.'+ ext)==-1){
		obj.src=obj.src.replace('.'+ ext,'_o.'+ ext)
	}
}
function mOut(obj) {
	var ext = obj.src.slice(-3)
	obj.src=obj.src.replace('_o.'+ext,'.'+ext)
}
