$(function(){
    $("img.z").each(function (i) {
        var h = $(window).height();
        $(this).css('max-height',"none");
        var imgh = $(this).attr("height");
        $(this).css('max-height',"92%");
        if (imgh < h) {
            var m = "-"+(imgh/2)+"px";
            console.log(m);
            $(this).css("margin-top",m);
            $(this).removeClass("z");
        } 
    });
    $("img.z").toggle(
        function(){
            $(this).css('max-height',"none");
            $(this).parent().css('height',"auto");
        },
        function(){
            $(this).css('max-height',"92%");
            $(this).parent().css('height',"100%");  
        }
    );

  $("#jpId").jPlayer( {
    ready: function () {
      $(this).setFile("/mp3s/1.mp3"); // Defines the mp3
    }
  });

});