/* Headslider */
$(document).ready(function() {
  
  // Expand Panel
  $("#open").click(function(){
    $("div#panel").slideDown("slow");
  
  });  
  
  // Collapse Panel
  $("#close").click(function(){
    $("div#panel").slideUp("normal");  
  });    
  
  // Switch buttons from "Log In | Register" to "Close Panel" on click
  $("#toggle div").click(function () {
    $("#toggle div").toggle();
  });    
    
});



/* Fade links */
$(document).ready(function(){

$("a.icon").hover(
function() {
$(this).stop().animate({"opacity": "1"}, "fast");
},
function() {
$(this).stop().animate({"opacity": "0.8" }, "fast");
});

  
$("#navcontainer a").hover(
function() {
$(this).stop().animate({"opacity": "1"}, "fast");
},
function() {
  $(this).stop().animate({"opacity": "0.7"}, "fast");
});
 

  
  
  
});

/* Smooth transition*/
$(document).ready(function() {
 
    $("a.navigation").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(400, redirectPage);
    });
 
    $("a#christian-logo").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(400, redirectPage);
    });  

      $(".weddinglist a").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(200, redirectPage);
    });  
  
      $(".weddinglist2 a").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(200, redirectPage);
    });  
  
      $(".portfoliomenu a").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(200, redirectPage);
    });  
  
 
 
    function redirectPage() {
        window.location = linkLocation;
    }
});

