/**
 * Created by Intel on 25-Dec-20.
 */

function submitContactForm(){

    var reg = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;

    var firstname = $('#firstname').val();
    var lastname = $('#lastname').val();
    var apt = $('#apt').val();
    var address = $('#address').val();
    var city = $('#city').val();
    var state = $('#state').val();
    var zip = $('#zip').val();
    var country = $('#country').val();
    var phone = $('#phone').val();
    var email = $('#email').val();
    var about = $('#about').val();
    var size = $('#size').val();

    if(firstname.trim() == '' ){
        $('#firstname').focus();
        return false;
    }
    else if(lastname.trim() == '' ){
        $('#lastname').focus();
        return false;
    }
    else if(apt.trim() == '' ){
        $('#apt').focus();
        return false;
    }
    else if(address.trim() == '' ){
        $('#address').focus();
        return false;
    }
    else if(email.trim() != '' && !reg.test(email)){
        $('#email').focus();
        return false;
    }
    else if(city.trim() == '' ){
        $('#city').focus();
        return false;
    }
    else if(state.trim() == '' ){
        $('#state').focus();
        return false;
    }
    else if(zip.trim() == '' ){
        $('#zip').focus();
        return false;
    }
    else if(country.trim() == '' ){
        $('#country').focus();
        return false;
    }
    else if(phone.trim() == '' ){
        $('#phone').focus();
        return false;
    }
    else if(about.trim() == '' ){
        $('#about').focus();
        return false;
    }
    else if(size.trim() == '' ){
        $('#size').focus();
        return false;
    }
    else{
        $.ajax({
            type:'POST',
            url:'contact_do.php',
            data:'contactFrmSubmit=1&firstname='+firstname+'&lastname='+lastname+'&apt='+apt+'&address='+address+'&city='+city+'&state='+state+'&zip='+zip+'&country='+country+'&phone='+phone+'&email='+email+'&about='+about+'&size='+size,
            beforeSend: function () {
                $('.contact-form').hide();
                $('.loading-main-div').show();
            },
            success:function(msg){

                $('.loading-main-div').hide();
                $('.contact-form').show();

                if(msg == 'ok'){

                    //$('.contact-form').hide();
                    //$('.loading-main-div').hide();
                    //$('.send-main-div').show();

                    //$(".contact-form")[0].reset();
                }
                else{
                    //$('.loading-main-div').hide();
                    //$('.contact-form').show();
                }
            }
        });
    }
}

$(".contact-back-btn").click(function(){

    $('.send-main-div').hide();
    $('.contact-form').show();
});

$(document).ready(function(){

    var clicked_image_1 = false;
    var clicked_image_2 = false;
    var clicked_image_3 = false;
    var clicked_image_4 = false;
    var clicked_image_5 = false;
    var clicked_image_6 = false;
    var clicked_image_7 = false;

    $(".image-1").hover(function(){
        $(".image-1").css("transition-duration","3s");
        $(".image-1").css("background-position-y","100%");

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">DENOVO EXECUTIVE RESIDENCES</h4><p>Panama City, Panama</p><p class="mb-0"><b>Description:</b></p><p>Executive residences<br/>200.000 Sq. Ft<br/>Project Cost: US$18.000.000<br/>Year 2007<br/><b>Developer</b></p></div>');
    });

    $(".image-1").mouseout(function(){
            $(".image-1").css("transition-duration", "");
            $(".image-1").css("background-position-y", "0%");

        if(!clicked_image_1) {
            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });


    $(".image-2").hover(function(){
        $(".image-2").css("transition-duration","1s");
        $(".image-2").css("background-position-x","100%");

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');
    });

    $(".image-2").mouseout(function(){
        $(".image-2").css("transition-duration","");
        $(".image-2").css("background-position-x","0%");

        if(!clicked_image_2) {

            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });

    $(".image-3").hover(function(){
        $(".image-3").css("transition-duration","3s");
        $(".image-3").css("background-position-y","100%");

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">MARY BRICKELL VILLAGE</h4><p>Miami, Florida</p><p class="mb-0"><b>Description:</b></p><p>Urban Lifestyle Center<br/>195.000 Sq. Ft of leasing area<br/>Project Cost US$150.000.000<br/>Year 2006<br/><b>Development Management</b></p></div>');
    });

    $(".image-3").mouseout(function(){
        $(".image-3").css("transition-duration","");
        $(".image-3").css("background-position-y","0%");

        if(!clicked_image_3) {

            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });

    $(".image-4").hover(function(){
        $(".image-4").css("transition-duration","3s");
        $(".image-4").css("background-position-x","100%");

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">CALIFORNIA CLUB</h4><p>Aventura City, Florida</p><p class="mb-0"><b>Description:</b></p><p>Residential Tower<br/>220.000 Sq. Ft<br/>Project Cost US$85.000.000<br/>Year 2006<br/><b>Acquisition/Profitability Analysis</b></p></div>');
    });

    $(".image-4").mouseout(function(){
        $(".image-4").css("transition-duration","");
        $(".image-4").css("background-position-x","0%");

        if(!clicked_image_4) {

            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });

    $(".image-5").hover(function(){
        $(".image-5").css("transition-duration","3s");
        $(".image-5").css("background-position-y","0%");

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">1500 OCEAN DRIVE</h4><p>Miami Beach, Fl</p><p class="mb-0"><b>Description:</b></p><p class="mb-5">Mixed use residential, retail and<br/>office<br/>53,000 Sq. Ft<br/>Project Cost US$100.000.000<br/>Year 1996<b>Pre-construction Management</b></p><p class="pro-foo">*Adsum principals participated in the development process of these projects through association with other parties.</p></div>');
    });

    $(".image-5").mouseout(function(){
        $(".image-5").css("transition-duration","");
        $(".image-5").css("background-position-y","100%");

        if(!clicked_image_5) {

            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });

    $(".image-6").hover(function(){
        $(".image-6").css("transition-duration","3s");
        $(".image-6").css("background-position-x","100%");

        $(".ani-con").html(' <div class="pro-det px-4"><h4 class="mb-0">COCOWALK</h4><p>Miami, Florida</p><p class="mb-0"><b>Description:</b></p><p class="mb-5">Urban Entertainment Destination<br/>150.000 Sq. Ft<br/>53,000 Sq. Ft<br/>Project Cost US$60.000.000<br/>Year 1990<br/>Project Management Services</p><p class="pro-foo">*Adsum principals participated in the development process of these projects through association with other parties.</p></div>');
    });

    $(".image-6").mouseout(function(){
        $(".image-6").css("transition-duration","");
        $(".image-6").css("background-position-x","40%");

        if(!clicked_image_6) {

            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });

    $(".image-7").hover(function(){
        $(".image-7").css("transition-duration","3s");
        $(".image-7").css("background-position-y","100%");

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">500 BOYLSTON STREET</h4><p>Boston, MA</p><p class="mb-0"><b>Description:</b></p><p class="mb-5">Mixed use retail and office<br/>715,000 Sq. Ft of leasing area Project Cost <br/>US$120.000.000<br/>Year 1986<br/><b>Project Engineering</b></p><p class="pro-foo">*Adsum principals participated in the development process of these projects through association with other parties.</p></div>');
    });

    $(".image-7").mouseout(function(){
        $(".image-7").css("transition-duration","");
        $(".image-7").css("background-position-y","0%");

        if(!clicked_image_7) {

            $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');
        }
    });

    $(".back-portolio-btn").click(function(){

        $(".back-portolio").hide();

        $(".col-bor-img").css("background-image","");

        $(".col-bor-img").removeClass('port-image');

        $(".portfolios").show();

        $(".ani-con").html('<p class="box_center mb-2 p-head px-4">1,561,000 Sq. Ft. Developed Total Cost of Projects $551,000,000.00</p><p class="box_center px-4 p-con">Click on the images to view some of our projects</p>');

    });

    $(".image-1").click(function(e){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image1.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">DENOVO EXECUTIVE RESIDENCES</h4><p>Panama City, Panama</p><p class="mb-0"><b>Description:</b></p><p>Executive residences<br/>200.000 Sq. Ft<br/>Project Cost: US$18.000.000<br/>Year 2007<br/><b>Developer</b></p></div>');

        clicked_image_1 = true;
    });

    $(".image-2").click(function(){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image2.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');

        clicked_image_2 = true;
    });

    $(".image-3").click(function(){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image3.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');

        clicked_image_3 = true;
    });

    $(".image-4").click(function(){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image4.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');

        clicked_image_4 = true;
    });

    $(".image-5").click(function(){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image5.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');

        clicked_image_5 = true;
    });

    $(".image-6").click(function(){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image6.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');

        clicked_image_6 = true;
    });

    $(".image-7").click(function(){

        $(".portfolios").hide();

        $(".col-bor-img").addClass('port-image');

        $(".col-bor-img").css("background-image","url('images/portfolio/image7.jpg')");

        $(".back-portolio").show();

        $(".ani-con").html('<div class="pro-det px-4"><h4 class="mb-0">TWELFTH ON WEST</h4><p>Miami Beach, Florida</p><p class="mb-0"><b>Description:</b></p><p>Boutique Condominium<br/>28.000 Sq. Ft<br/>Project Cost US$18.000.000<br/>Year 2007<br/><b>Co-Developer</b></p></div>');

        clicked_image_7 = true;
    });

    $(".back-ser").click(function(){

        $(".s-ser").fadeOut();

        $(".s-main").fadeIn(800);
    });

    $(".s-fa").click(function(){

        $(".s-main").fadeOut();

        $(".s-fa-div").fadeIn(800);
    });

    $(".s-pa").click(function(){

        $(".s-main").fadeOut();

        $(".s-pa-div").fadeIn(800);
    });

    $(".s-dd").click(function(){

        $(".s-main").fadeOut();

        $(".s-dd-div").fadeIn(800);
    });

    $(".s-ba").click(function(){

        $(".s-main").fadeOut();

        $(".s-ba-div").fadeIn(800);
    });

    $(".s-cc").click(function(){

        $(".s-main").fadeOut();

        $(".s-cc-div").fadeIn(800);
    });

    $(".s-or").click(function(){

        $(".s-main").fadeOut();

        $(".s-or-div").fadeIn(800);
    });

    $(".s-mas").click(function(){

        $(".s-main").fadeOut();

        $(".s-mas-div").fadeIn(800);
    });

    $(".s-ir").click(function(){

        $(".s-main").fadeOut();

        $(".s-ir-div").fadeIn(800);
    });

    $(".s-cm").click(function(){

        $(".s-main").fadeOut();

        $(".s-cm-div").fadeIn(800);
    });

    $(".s-ca").click(function(){

        $(".s-main").fadeOut();

        $(".s-ca-div").fadeIn(800);
    });

    $(".back-team").click(function(){

        $(".back-team").hide();

        $(".t-ser").fadeOut();

        $(".t-main").fadeIn(800);
    });

    $(".t-jv").click(function(){

        $(".back-team").show();

        $(".t-main").fadeOut();

        $(".t-jv-div").fadeIn(800);
    });

    $(".t-jlb").click(function(){

        $(".back-team").show();

        $(".t-main").fadeOut();

        $(".t-jlb-div").fadeIn(800);
    });

    $(".t-lmr").click(function(){

        $(".back-team").show();

        $(".t-main").fadeOut();

        $(".t-lmr-div").fadeIn(800);
    });

    $(".footerexpend").click(function(){

        $("footer p").css("top","0px");
        //$("<p class='black-col mb-0'>at the <b>Developers & Builders Alliance Award</b> banquet for superior design and services previously not available in Panama.</p>").insertAfter("footer p");
        $(".black-col").removeClass('d-none');
        $(".down-pdf").removeClass('d-none');

        $(".footer-col").removeClass('col-lg-5');
        $(".footer-col").addClass('col-lg-6');
    });

    $(".t-developer").click(function(){
        $('.team-inner div').hide();
        $('.developer-content').show();
    });

    $(".t-sales").click(function(){
        $('.team-inner div').hide();
        $('.sale-content').show();
    });

    $(".t-architect").click(function(){
        $('.team-inner div').hide();
        $('.architect-content').show();
    });

    $(".t-advertising").click(function(){
        $('.team-inner div').hide();
        $('.advertising-content').show();
    });

    $(".sound-on").hide();

    var x = document.getElementById("myaudio");

    $(".sound-off").click(function(){
        x.pause();
        $(".sound-off").hide();
        $(".sound-on").show();
    });

    $(".sound-on").click(function(){
        x.play();
        $(".sound-on").hide();
        $(".sound-off").show();
    });

    function playAudio() {
alert('Hello');
        x.play();
    }

    function pauseaudio() {
alert('Hello');
        x.pause();
    }

});