/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$.getScript(wpUrl+"/wp-content/themes/sanchez/js/jquery.easing.1.3.js");
$(document).ready(function(){
    $(".centerSlide").css({display:"none",height:"0"});
    $("#slideContainer").css({marginTop:"-180px", height:"360px"});
    $(".insideOver").css({top:"195px"});

    $("#headerEnter, #langCont").hide();
    if (!$.browser.msie) {
        $("#sanchezPar, #arquitectos").css('opacity', 0.9999);

    }
    
    $(".noaction, .blockInside a").click(function(){
        //return false;
    });
    /* Center animation */
    setTimeout("load()",1000);
    

    /*    Enter animation   */
    $("#entrar, .langs li span a").click(function(){
        var link = $(this).attr("href");
        $(".centerSlide").animate({height:"0",opacity: 0.3},1000,"easeOutCirc",function(){
            $(this).hide();
        });
        $("#slideContainer").animate({marginTop:"-180px", height:"360px"},1000,"easeOutCirc",goTo(link));
        return false;
    });

    $(".blockInside").hover(function(){
        $(this).find(".insideOver").animate({top:"145px"},1000,"easeOutCirc");
    }, function(){
        $(this).find(".insideOver").animate({top:"195px"},500);
    });
});

function goTo(link){
    $(".centerSlide").animate({opacity: 1.0}, 10, function(){
        document.location.href=link;
    });
    
}
function load(){
    $(".centerSlide").animate({height:"220px"},1000,function(){
            $("#headerEnter, #langCont").fadeIn("slow");
        });
    $("#slideContainer").animate({marginTop:"-280px", height:"500px"},1000);
}
