// Cufon Text Replacement
$(document).ready(function(){
	Cufon.replace('.replace', { fontFamily: 'Dax Bold' });
	Cufon.replace('#content.home h3.replace', { fontFamily: 'Dax' });
	Cufon.replace('h4.replace', { fontFamily: 'Dax' });
	Cufon.replace('span.descripcion.replace', { fontFamily: 'Dax' });
});
    

/* Jquery Cycle
$(document).ready(function()
	{
		$('#slides').cycle({
				prev 	: '#previous-slide',
				next 	: '#next-slide',
				timeout : 3000,
				pause 	: 1
			});
	});
*/

// Input labels
 $(document).ready(function() {

	$('label').css('display', 'none');
	$('input[title], textarea[title] ').each(function() {
		if($(this).val() === '') {
			$(this).val($(this).attr('title'));
		}

		$(this).focus(function() {
			if($(this).val() === $(this).attr('title')) {
				$(this).val('').addClass('focused');
			}
		});

		$(this).blur(function() {
			if($(this).val() === '') {
				$(this).val($(this).attr('title')).removeClass('focused');
			}
		});
	});
});
 

  
// External links
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


