function zmen(co,kam){
  //alert('grafika/'+kam+'.png')
  co.src='grafika/'+kam+'.png';
  
}
function ukaz(co,jak){
    var objekt = document.getElementById(co);
    objekt.className = jak;
}
function note(co,jak){
    var objekt = document.getElementById(co);
    if(objekt.value=="Zadejte název")
      objekt.value="";
    ukaz(co,jak);
}
function test_nove(){
  if(document.form.galerie.value=="new"){
      ukaz("nova_galerie","show");
      ukaz("picasa","none");
  } else if(document.form.galerie.value=="picasa"){
      ukaz("picasa","show");
      ukaz("nova_galerie","none");
  } else {
    ukaz("nova_galerie","hide");
    ukaz("picasa","none");
  }  
}
function getVote(int2,id){
  if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
  } else {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xmlhttp.onreadystatechange=function(){
    if (xmlhttp.readyState==4 && xmlhttp.status==200){
      document.getElementById("anketa").innerHTML=xmlhttp.responseText;
      window.setTimeout("nactiAnketu(xmlhttp.responseText.substring(0,xmlhttp.responseText.indexOf('<!-- NOTE_START -->'))+xmlhttp.responseText.substring(xmlhttp.responseText.indexOf('<!-- NOTE_END -->')))",3500);
    }
  }
  xmlhttp.open("GET","/ankety/hlasovat.php?id="+id+"&hlas="+int2,true);
  xmlhttp.send();
  
}
function nactiAnketu(text) {
document.getElementById("anketa").innerHTML=text;
}

$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
  $("a.iframeText").fancybox({
		'hideOnContentClick': false,
    'titleShow'         : false,
    'overlayOpacity'	  :	0.6,
    'overlayColor'	    :	'#111',
    'width'             : 330,
    'height'            : 580,
    'type'              : 'iframe',
    'transitionIn'      : 'none',
    'transitionOut'     : 'none'
	});
  
  $("a.iframe").fancybox({
		'hideOnContentClick': false,
    'titleShow'         : false,
    'overlayOpacity'	  :	0.6,
    'overlayColor'	    :	'#111',
    'width'             : 670,
    'height'            : 500,
    'type'              : 'iframe',
    'transitionIn'      : 'none',
    'transitionOut'     : 'none'
	});
  $("a.iframeSmall").fancybox({
		'hideOnContentClick': false,
    'titleShow'         : false,
    'overlayOpacity'	  :	0.6,
    'overlayColor'	    :	'#111',
    'width'             : 470,
    'height'            : 300,
    'type'              : 'iframe',
    'transitionIn'      : 'none',
    'margin'            : 0,
    'padding'           : 0,
    'transitionOut'     : 'none'
	});  
	/* Apply fancybox to multiple items */

	$("a.galerie").fancybox({
		'speedIn'	:	300, 
		'speedOut' :	100, 
    'overlayOpacity' :	0.9,
    'overlayColor' :	'#111',
    'changeSpeed' : 100,
    'hideOnContentClick' : true,
    'titlePosition' : 'inside'
	}); 
  
	$("a.video").fancybox({
      'speedIn'	:	300, 
  		'speedOut' :	100, 
      'overlayOpacity' :	0.7,
      'overlayColor' :	'#111',
      'changeSpeed' : 100,
      'titlePosition' : 'inside',
      'hideOnContentClick' : false,
			'width'		  : 680,
			'height'		: 495,
			'type'			: 'swf',
			'swf'			: {
			  'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
  });
  
});
