function popup(url, width, height)
{
      var options = "toolbar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+";"
      popupWindow=window.open(url,"_blank",options);
}

function wjPopup(url, width, height)
{
//  url=/components/gallery/show_gallery_image.jsp?src=/images/gallery/spolecne/s_fs-banka-klient_zakladni-pravidla-vztahu.jpg

      var adr = url.replace("/components/gallery/show_gallery_image.jsp?src=","")
      adr = adr.substring(0,adr.lastIndexOf("/")+1);
      var img = url.substring(url.lastIndexOf("/")+3);
      
      //jQuery.prettyPhoto.open(adr+img,'','');

    Shadowbox.open({
        content:    adr+img,
        player: 'img'
    });
}

function openVideo(url) {
  $.ajax({ 
    url: "/components/_common/flvplayer2.jsp?video="+url, 
    success: function(data){
      alert(data);
      Shadowbox.open({
        content:    data,
        player:     "html",
        height:     320,
        width:      240
      });
    }
  });
}

function headerImage(imgUrl) {
  $(function () {
    var img = new Image();
    $(img).load(function () {
      $(this).hide();
      $('#headerImage').append(this);
      $(this).addClass('headerImage');
      $(this).fadeIn(2000);
    }).attr('src', imgUrl);
});}


