// JavaScript Document

var params = {};
params.menu = "false";
params.allowfullscreen = "false";
params.allowscriptaccess = "always";
params.allownetworking = "all";
params.wmode = "transparent";
var attributes = {};

$(document).ready(function() {
						   
						   
/*mostrar - ocultar formulario
$('#formulario').hide();

$('a.btnformulario').click(function() {
	$('#formulario').toggle(400);
	return false;
});

$('a.btnformularioL').click(function() {
	$('#formulario').toggle(400);
	return false;
});*/

/*shadowbox*/
	Shadowbox.init();

//Enviar formulario Contacto
    // bind form using ajaxForm 
    //$('#mailcoment').ajaxForm({ 
		//beforeSubmit: validate,
        // target identifies the element(s) to update with the server response 
        //resetForm: true, 
 
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
        //success: function() { 
           // alert("Gracias por tu comentario!"); 
        //} 
    //});
						   
});

// Valida Campos contacto

function validate(formData, jqForm, options) { 
    // fieldValue is a Form Plugin method that can be invoked to find the 
    // current value of a field 
    // 
    // To validate, we can capture the values of both the username and password 
    // fields and return true only if both evaluate to true 
 
    var nombreValue = $('input[@name=nombre]').fieldValue(); 
    var emailValue = $('input[@name=email]').fieldValue(); 
	var telValue = $('input[@name=tel]').fieldValue();
 
    // usernameValue and passwordValue are arrays but we can do simple 
    // "not" tests to see if the arrays are empty 
    if (!nombreValue[0] || !emailValue[0] || !telValue[0]) { 
        alert("Por favor debe escribir Nombre, E-mail y Teléfono"); 
        return false; 
    } 
}

/*Shadowbox*/
Shadowbox.loadSkin('classic', 'js/src/skin');
Shadowbox.loadLanguage('es', 'js/src/lang');
Shadowbox.loadPlayer(['flv', 'img', 'qt', 'swf', 'wmp'], 'js/src/player');