// JavaScript Document

$(document).ready(function(){
	$.Lightbox.construct({
		  show_helper_text:	false,
		  show_info: false,
		  show_extended_info: false,
		  show_linkback: false,
			text: {
				image:		'Zdjęcie',
				of: 'z',
				close: 'zamknij'
			} 

});
			$(".gallery img").fadeTo("fast", .8);					
				$(".gallery img").hover(function(){
						$(this).fadeTo("normal", 1);
				},function(){
						$(this).fadeTo("normal", .8);
				});								
									
				$('#MovieBoxLink').fancyZoom({width:300, height:240, Callback: cmovie});			
				flowplayer("flv-player", "/templates/default/swf/flowplayer-3.2.2.swf", {
					clip: {
					scaling: "fit"
				},
				canvas:  {
					background: '#000000',
					backgroundGradient: 'none'
				}
				});		
						
});

function cmovie(){
	if(_moveFile){
		document.getElementById('zoom_content').innerHTML='<embed width="300" height="240" loop="true" designtimesp="5311" autostart="true" '
			+'src="'+_moveFile+'" videoborder3d="-1" showstatusbar="-1" '
			+'showdisplay="0" showtracker="-1" showcontrols="true" bgcolor="darkblue" '
			+'autosize="-1" displaysize="4" name="mediaPlayer" id="mediaPlayer" '
			+'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" type="application/x-mplayer2" class="embeded-movie">'
	}
}


	
		
				
function getPageSize(){
	  var xScroll, yScroll;
	  if (window.innerHeight && window.scrollMaxY) {
	     xScroll = document.body.scrollWidth;
	     yScroll = window.innerHeight + window.scrollMaxY;
	  } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
	     xScroll = document.body.scrollWidth;
	     yScroll = document.body.scrollHeight;
	  } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	     xScroll = document.body.offsetWidth;
	     yScroll = document.body.offsetHeight;
	  }
	  var windowWidth, windowHeight;
	  if (self.innerHeight) {   // all except Explorer
	     windowWidth = self.innerWidth;
	     windowHeight = self.innerHeight;
	  } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	     windowWidth = document.documentElement.clientWidth;
	     windowHeight = document.documentElement.clientHeight;
	  } else if (document.body) { // other Explorers
	     windowWidth = document.body.clientWidth;
	     windowHeight = document.body.clientHeight;
	  }
	  // for small pages with total height less then height of the viewport
	  if(yScroll < windowHeight){
	     pageHeight = windowHeight;
	  } else {
	     pageHeight = yScroll;
	  }
	  // for small pages with total width less then width of the viewport
	  if(xScroll < windowWidth){
	     pageWidth = windowWidth;
	  } else {
	     pageWidth = xScroll;
	  }
	  arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
	  return arrayPageSize;
	}
