$(document).ready(function() {
  $('#detail .leva .dalsi-img a').attr('onclick','');
  $('#detail .leva .obr a').attr('rel','fancy');
  $('#detail .leva .dalsi-img a').attr('rel','fancy');
  $("#detail .leva .obr a").fancybox();
  $("#detail .leva .dalsi-img a").fancybox();

  $("#detail .detail-sklad a").fancybox({
    'autoScale'     	: true,
    'transitionIn'		: 'none',
    'transitionOut'		: 'none',
    'type'				: 'iframe'
  });

});

function display(myimage) {
return false;
html = "<HTML><HEAD>" 
+ "<style type=text/css>body{margin:0;padding:0;}</style>"
+ "</HEAD><BODY> <CENTER>" 
+ "<a href='javascript:window.close();'><IMG SRC='" + myimage + "' BORDER=0 NAME=image " 
+ "onload='window.resizeTo(document.image.width+50,document.image.height+70)' /></a>"
+ "</CENTER>" 
+ "</BODY></HTML>";
popup=
window.open
('','image','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
popup.document.open();
popup.document.write(html);
popup.document.close()
};

/* puvodni JS z MN.cz */
var zobrazena="data";
function zalozky(polozka, obj ){
  if( polozka != zobrazena ){
    if(document.getElementById(zobrazena)){
      document.getElementById(zobrazena).style.display= "none";
      document.getElementById(zobrazena+"_1").className="";
    }
    document.getElementById(polozka).style.display= "block";
    obj.className="active";
    zobrazena=polozka;
  }
}


function mena( mena ){
  var id;
  if(mena == 'eur') {
    // EURO
    id = 7;
  } else {
    // CZK
    id = 1;
  }
  location.href= '/inshop/scripts/shop.aspx?action=DoChangeCurrency&CurrID=' + id;
}


function openWindow( src ){
  window.open(src ,"pict",'toolbar=0,location=0,scrollbars=0,width=500,height=450,resizable=0,top=20,left=20');
}


function menu( iDdmenu ){
  var blok = '';
  if( document.getElementById( 'lvlID_' + iDdmenu ) ){
    blok = document.getElementById( 'lvlID_' + iDdmenu );
  }
  if( document.getElementById( iDdmenu ) ){
    blok = document.getElementById( iDdmenu );
  }
  if( blok  != '' ){
    if( blok.style.display == "none" ){
        blok.style.display = "block";
    } else {
        blok.style.display = "none";
    }
    return false;
  }
}

function zmensit( Id ){
  var blok = document.getElementById( Id );
  if( document.getElementById( Id ) ){
    if( blok.style.visibility == "hidden" ){
        blok.style.visibility = "visible";
        blok.style.height = "135px";
    } else {
        blok.style.visibility = "hidden";
        blok.style.height = "0";
    }
    return false;
  }
}


function otevrit5(id) {
  if(document.getElementById(id)){
    document.getElementById(id).style.visibility = "visible";
    if(document.getElementById('youtube1')){
      document.getElementById('youtube1').style.visibility = "hidden";
    }
  }
}
function zavrit5(id) {
  if(document.getElementById(id)){
    document.getElementById(id).style.visibility = "hidden";
    if(document.getElementById('youtube1')){
      document.getElementById('youtube1').style.visibility = "visible";
    }
  }
}

function powerPartnerImg(par) {
  nodkaz=par.href;
  nobraz='/img/powerpartner-'+par.name+'.jpg';
  document.getElementById('vodkaz').href=nodkaz;
  document.getElementById('vobraz').src=nobraz;
  document.location='http://powerpartner.moderni-naradi.cz/#'+par.name;
  return false;
}
