$(document).ready(function () {							
    $('#slider').anythingSlider({
        startStopped    : true, // If autoPlay is on, this can force it to start stopped
        width           : 549,  // Override the default CSS width
        height          : 305,  // Override the default CSS heigth
        theme           : 'minimalist-round', // Theme name
        themeDirectory  : '/plugin/AnythingSlider/css/theme-minimalist-round.css',
        autoPlay        : true,
        delay           : 3000,
        startStopped    : false,
        animationTime   : 600,
        hashTags        : true,
        buildNavigation : false,
        pauseOnHover    : true
    });
    $('#accordion-1').easyAccordion({
        autoStart       : false,
        slideInterval   : 3000
    });
    $("a[rel^='prettyPhotoSimple']").prettyPhoto({animation_speed:'slow',autoplay_slideshow: false,autoplay: false});
});
function contacto (validate_retusn)
{	 //alert (validate_retusn);
 	//  alert ($("#frmSuscripcion").validationEngine()); 
    // alert( $('#frmSuscripcion').validationEngine('validate') );
   if(validate_retusn)
	{ 	//$("a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'slow',autoplay_slideshow: false,autoplay: false});
		$.prettyPhoto.open("/inscribirse-boletin/index.php?email="+$('#email').val()+"?iframe=true&amp;width=200&amp;height=250","","");
		$('#email').val('');
	}
	//else
	//alert ("error");

}
function trim(cadena)
{
	for(i=0; i<cadena.length; )
	{
		if(cadena.charAt(i)==" ")
			cadena=cadena.substring(i+1, cadena.length);
		else
			break;
	}

	for(i=cadena.length-1; i>=0; i=cadena.length-1)
	{
		if(cadena.charAt(i)==" ")
			cadena=cadena.substring(0,i);
		else
			break;
	}
	
	return cadena;
}
