//Set #content Height;
//resizeImages();

if(document.getElementById("slide") || document.getElementById("project")) {

var winH = $(window).height();
$("#content").css({
  height: (winH - 120) + "px"
//  width: (winW + "px"
});

$(window).resize(function() { 
if(document.getElementById("slide") || document.getElementById("project")) {  
  var winH = $(window).height();
  $("#content").css({
    height: (winH - 120) + "px"
  });
  
}  
});

}

$("#enter").click(function() { 
  $("#home-splash").fadeOut(500, function() {
    $("#project").show();
  });  
  return false;
});

function resizeImages() {
  var winH = $(window).height(),
      winW = $(window).width(),
      thisImg = $("#slide").find("img"),
      tImgH = $(thisImg).height(),
      tImgW = $(thisImg).width(),
      imgCap = $("#slide").find(".ic");
      
      if($(thisImg).hasClass("p")) {
        var newLeft = $(thisImg).offset().left + $("#slide").find("img").width();
        $(imgCap).css({left: newLeft + "px"});      
      } 
}

$(".press-item").mouseenter(function() { 
  var thisid = $(this).attr("data-id");
  $(".press-img").hide();
  $(".image-"+ thisid).show();
});


$("#slide").find(".img").click(function() { 
  nextLookbook();
});

function nextLookbook() {
	var nextWork = $(".next"),
			nextWorkHref = $(nextWork).attr("href");			
			if(nextWorkHref) {
				window.location = nextWorkHref;
			} 
}
