$(document).ready(function(){

	// Slideshow Home
	$("#slideshow").carousel({ autoSlide: true, loop: true, autoSlideInterval: 5000, animSpeed: "slow" });

	// Blur en formularios
	$("input.blur").focus(function () {
		if( this.value == this.defaultValue ) { this.value = ""; }
	}).blur(function() {
		if( !this.value.length ) { this.value = this.defaultValue; }
    });
	
	// Esquinitas
	$(".sidebar h3").append("<span></span>");

	
	// Acordeón casero
	$("dd").hide();
	$("dt").click(function() {
    	$(this).next().slideToggle();
    });

	// Team
	$(".team li").hover(function() {
		$(this).children("a").slideToggle('fast');
	},function(){
		$(this).children("a").slideToggle('fast');
	});

	
	// Ampersands
	$("*:contains('&'):not(pre, code)", document.body)
		.contents()
		.each(
			function() {
			if( this.nodeType == 3 ) {
				$(this)
				.replaceWith( this
				.nodeValue
				.replace( /&/g, "<span class='amp'>&</span>" )
				);
			}
		}
	);

	$('#langFlag').click(function() {
		$('.flags').highlightFade({color:'red',speed:2000,iterator:'exponential'});
	});
});


