$(document).ready(function(){
	var liSelected=false;
	var nombre = 'nombre y apellido';
	var email  = 'email';
	var tel	   = 'telefono';
	var msg	   = 'mensaje';
	var user   = 'usuario';
	var pass   = '********';
	
	$("#slider").easySlider({
				controlsBefore:	'<p id="controls">',
				controlsAfter:	'</p>',
				auto: true,
				continuous: true,
				speed:600
			});
	
	
	$('.input,.textarea').live('focus',function(){	
		val = $(this).val();
		switch($(this).attr('id')){
			case 'nombre':		if(val==nombre) $(this).val('');		break;			
			case 'email':		if(val==email) 	$(this).val('');		break;			
			case 'tel':			if(val==tel)	$(this).val('');		break;			
			case 'msg':			if(val==msg)	$(this).val('');		break;			
			case 'user':		if(val==user)	$(this).val('');		break;			
			case 'pass':		if(val==pass) 	$(this).val('');		break;
		}
	});
	
	$('.input,.textarea').live('blur',function(){
		val = $(this).val();
		switch($(this).attr('id')){
			case 'nombre':		if(val=='') $(this).val(nombre);		break;			
			case 'email':		if(val=='') $(this).val(email);			break;
			case 'tel':			if(val=='') $(this).val(tel);			break;
			case 'msg':			if(val=='') $(this).val(msg);			break;
			case 'user':		if(val=='') $(this).val(user);			break;
			case 'pass':		if(val=='') $(this).val(pass);			break;
		}
	});
	
	
	//codigo para el video
	if($('#player').length>0){
	flowplayer("player", "inc/video/flowplayer-3.2.7.swf", {
            clip:  {
                autoPlay: false,
                autoBuffering: true
            }
        });
	}
	
	$('.center-contacto').stickyfloat({ duration: 400 });
	
});
