// DOCUMENT READY
 $(document).ready( function(){ 
	_typeface_js.initialize();
	// SLIDER SUPERIOR DE LA WEB
  if ($('#slider').is('div') ) {
	$('#slider').cycle({ 
		speed:       1500, // Tiempo de la transici�n de foto a foto (milisegundos, 1000 = 1s)
		timeout:     15000, // Tiempo entre cambios de foto (milisegundos, 1000 = 1s)
		pager:      '#slider_pags', 
		pagerEvent: 'click',
		pauseOnPagerHover: true 
	});
  }
// Efecto del menú superior y fadings
	if ($.browser.msie && $.browser.version < 7) return;
        $('#partners li')
            .removeClass('fade')
            .find('a')
            .append('<span class="hover" />').each(function () {
                    var $span = $('> span.hover', this).css('opacity', 0);
                    $(this).hover(function () {
                        // on hover
                        $span.stop().fadeTo(750, 1);
                    }, function () {
                        // off hover
                        $span.stop().fadeTo(500, 0);
                    });
                });


 // font color animation 
	$("#menu a").hover(function() {
		$(this).animate({ color: "#f90" }, 600);
		},function() {
		$(this).animate({ color: "#eee" }, 500);
	});
	
	$("#menu .current_page_item a").hover(function() {
		$(this).animate({ color: "#eee" }, 600);
		},function() {
		$(this).animate({ color: "#f90" }, 500);
	});
	
	
	//Horizontal Sliding
	$('.boxgrid.slideright').hover(function(){
		$(".cover", this).stop().animate({left:'280px'},{queue:false,duration:500});
	}, function() {
		$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:500});
	});

	$("#form_contacto input[type=text], #form_contacto textarea").focusin(function() {
		$(this).animate({ borderBottomColor: "#212121", borderLeftColor: "#212121", borderRightColor:"#212121", borderTopColor:"#212121", backgroundColor:"#ffd", color:"#000" }, 500);
		}).focusout(function() {
		$(this).animate({ borderBottomColor: "#ccc", borderLeftColor: "#ccc", borderRightColor:"#ccc", borderTopColor:"#ccc", backgroundColor:"#fff", color:"#555" }, 500);
	});

	
 }); 
