$(document).ready(function(){	
	/* Funcion para el flash */
	
	$(function() {
		$('.media').media({ 
			autoplay:  true,
			width: 987,
			height: 280,
			flashvars: { autostart: 'true' } , 
			params:    { wmode: 'transparent', quality: 'high' }, // object params/embed attrs 
			caption:   false // supress caption text 
		}); 
	});
	Shadowbox.init();
});

/*****************************************************************************
    The sIFR configuration should typically go in `sifr-config.js`, but in order to
    keep the config file clean, and to give a quick overview, it's done here instead.
    *****************************************************************************/

  var helvetica = {
      src: '/swf/fuentes/HelveticaLTCondensedLight.swf'
    };

    // You probably want to switch this on, but read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad> first.
    // sIFR.useStyleCheck = true;
    sIFR.activate(helvetica);

    sIFR.replace(helvetica, {
      selector: '.titulo'
	  ,css: {'.sIFR-root': { 'color': '#076ba7', 'font-size' : '24px','background-color' : 'transparent','letter-spacing': -0.5 } }
	  ,wmode : 'transparent'
    });

	sIFR.replace(helvetica, {
      selector: '.titulo2'
	  ,css: {'.sIFR-root': { 'color': '#5d5d5d', 'font-size' : '20px','background-color' : 'transparent', 'font-weight':'normal','letter-spacing': -0.5} }
	  ,wmode : 'transparent'
	  ,offsetLeft: 10
    });

	sIFR.replace(helvetica, {
      selector: '.campo'
	  ,css: {'.sIFR-root': { 'color': '#89d3ff', 'font-size' : '15px','background-color' : 'transparent', 'font-weight':'normal'} }
	  ,wmode : 'transparent'
	  ,forceSingleLine : true
	  ,tuneWidth:2
    });
	
	sIFR.replace(helvetica, {
      selector: '.dato'
	  ,css: {'.sIFR-root': { 'color': '#ffffff', 'font-size' : '15px','background-color' : 'transparent', 'font-weight':'normal'} }
	  ,wmode : 'transparent'
	  ,forceSingleLine : true
	  ,tuneWidth:2
    });

function newsletterSubmit(value){
	var filter=/^[a-zA-Z0-9\._]+@[a-zA-Z0-9\.-]+\.[a-zA-Z]{2,4}$/;

	//
	
	if (filter.test(value)) {
		$('#ok-request').attr('href', '/newsletter-request.php?email='+value);
		Shadowbox.init();
		$('#ok-request').click();
		$('#newsEmail').val('');
	 }
	else {
		$('#error-request').click();
	 }	
}