function changeVid(vidid) {
  var newurl = videos[vidid];
  var newtitle = videostitle[vidid];
  $f("player", {src:"/flash/flowplayer-3.1.5.swf", wmode:"transparent"}, {
    onLoad: function() {    // called when player has finished loading
        this.setVolume(60);    // set volume property
    },
    clip: {
        url: newurl,
        fadeInSpeed: 3000,
        autoPlay: true,
        autoBuffering: true
    },
    plugins: {
        controls: null
    },
    play: {
        label: null,
        replayLabel: null
    }
});
  $("#a-flow-control").html("ES LÄUFT:");
  $("#a-flow-control").attr("onClick","stopVid(); return false;");
  $("#vid-title").html(newtitle);
  $("li.share-facebook a").attr("href","http://www.facebook.com/sharer.php?u=" + encodeURIComponent(window.location.href) + "&mp;t=" + encodeURIComponent(newtitle));
  $("li.share-twitter a").attr("href","http://www.twitter.com/home?status=" + encodeURIComponent(window.location.href + " " + newtitle));
}

function startVid() {
  $f("player").play();
  $("#a-flow-control").html("ES LÄUFT:");
  $("#a-flow-control").attr("onClick","stopVid(); return false;");
}
function stopVid() {
  $f("player").pause();
  $("#a-flow-control").html("STARTEN:");
  $("#a-flow-control").attr("onClick","startVid(); return false;");
}

function next() {
  actPage = actPage + 1;
  if (actPage >= offPage) {
    actPage = offPage;
  }
  else if (actPage <= 0) {
    actPage = 1;
    $('#p-prev').hide();
  }
  $('.presse-left .content').hide();
  $('#content-' + actPage).show();

  if (actPage >= offPage) {
    $('#p-next').hide();
  }
  if (actPage < offPage) {
    $('#p-next').show();
  }
  if (actPage <= 1) {
    $('#p-prev').hide();
  }
  if (actPage > 1) {
    $('#p-prev').show();
  }
  if (actPage > 1 && actPage < offPage) {
    $('#p-prev').show();
    $('#p-next').show();
  }
}
function prev() {
  actPage = actPage - 1;
  if (actPage <= 1) {
    actPage = 1;
  }
  else if (actPage >= offPage) {
    actPage = offPage;
    $('#p-next').hide();
  }
  $('.presse-left .content').hide();
  $('#content-' + actPage).show();

  if (actPage >= offPage) {
    $('#p-next').hide();
  }
  if (actPage < offPage) {
    $('#p-next').show();
  }
  if (actPage <= 2) {
    $('#p-prev').hide();
  }
  if (actPage > 1) {
    $('#p-prev').show();
  }
  if (actPage > 1 && actPage < offPage) {
    $('#p-prev').show();
    $('#p-next').show();
  }
}

function dispDetail() {
  $(".presse-left").hide();
  $(".presse-right").hide();
  $(".presse-pic-detail").fadeIn('fade');
  $(".navi-multiplevideo").fadeIn('fade');
}
function hideDetail() {
  $(".presse-pic-detail").hide();
  $(".navi-multiplevideo").hide();
  $(".presse-left").show();
  $(".presse-right").show();
}
