/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(function() {

    //run the currently selected effect
    //set effect from select menu value
    $(".apic").click(function() {

        document.getElementById("slider-container").style.visibility="visible";
        document.getElementById("slider-container").style.display="block";

        var id = $(this).attr("id");
        var nid = id.replace("pic0", "");
        window.location.hash = nid;

        $(function() {
            jQuery(function(){
                $('div#slider').slide({
                    preloadImg: false
                });
            });
        });
    });
});

$(function() {

    //run the currently selected effect
    //set effect from select menu value

    $("#menuHome").click(function() {
        $("#main-content-right-content").fadeOut(500, function(){
            $("#main-content-right-content").load("./planes/lear/index.php", function (){
                $("#main-content-right-content").fadeIn(500);
            });
        });

//$("#menuHome").click(function() {
//        $("#main-content-right-content").hide();
//        $("#main-content-right-content").load("vehicle-info.php", function (){$("#main-content-right-content").fadeIn(1500);});

        return false;
    });
    $("#menuContact").click(function() {
        $("#main-content-right-content").fadeOut(500, function(){
            $("#main-content-right-content").load("contact.php", function (){
                $("#main-content-right-content").fadeIn(500);
            });
        });
//        $("#main-content-right-content").hide();
//        $("#main-content-right-content").load("contact.php", function (){$("#main-content-right-content").fadeIn(2000);});

        return false;
    });
    $("#menuListings").click(function() {
        $("#main-content-right-content").fadeOut(500, function(){
            $("#main-content-right-content").load("listings.php", function (){
                $("#main-content-right-content").fadeIn(500);
            });
        });
        return false;
    });
    $("#menuJets").click(function() {
        $("#main-content-right-content").fadeOut(500, function(){
            $("#main-content-right-content").load("jets.php", function (){
                $("#main-content-right-content").fadeIn(500);
            });
        });
        return false;
    });
    $("#menuAbout").click(function() {
        $("#main-content-right-content").fadeOut(500, function(){
            $("#main-content-right-content").load("aboutUs.php", function (){
                $("#main-content-right-content").fadeIn(500);
            });
        });
        return false;
    });
});

function closeit (){
    $(function() {
        $("#slider-container:visible").removeAttr('style').hide().fadeOut();
    })
}


//$(function() {
//
//    //run the currently selected effect
//    function runEffect(){
//        //get effect type from
//
//        //most effect types need no options passed by default
//        var options = {};
//        //check if it's scale, transfer, or size - they need options explicitly set
//
//        //run the effect
//        $("#effect").show("drop",{ direction: "up" },800);
//    };
//
//    //callback function to bring a hidden box back
//    function callback(){
//        setTimeout(function(){
//            $("#effect:visible").removeAttr('style').hide().fadeOut();
//        }, 0);
//    };
//
//    //set effect from select menu value
//    $("#pic01").click(function() {
//        runEffect();
//        return false;
//    });
//
//    $("#effect").click(function() {
//        callback();
//    })
//
//    $("#effect").hide();
//});