/*
	Autor: Grzegorz Jaworek
	E-mail: grzegorz.jaworek@gmail.com
	www: http://gjaworek.pl 
	Tel.: +48 519 133 159
*/


jQuery(document).ready(function(){
		jQuery('.galeria li a img').each(function(){
			jQuery(this).css('margin-top', (135-jQuery(this).height())/2);
		});
	Cufon.replace('#menu a', {
		fontFamily: 'times',
		hover: true
	});
	jQuery('#banner').cycle({ 
		fx:     'fade', 
		speed:  'slow', 
		timeout: 5000, 
		pause:  1
	});
	var myWidth = 0, myHeight = 0;
	function getWindowSize() {
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
	}
	getWindowSize();
	if (myHeight <= 800) myHeight = 800;
	jQuery('html').css('height', myHeight);
	jQuery('body').css('height', myHeight);
	jQuery('#content .body .user-content').css('height', (myHeight-190-58-36-20));
	jQuery('#content .body .user-content').jScrollPane({showArrows:true});
	jQuery('.galeria li a').lightBox();
	jQuery('#mp3').flash({
		src: 'assets/flash/mp3.swf',
		width: 50,
		height: 20,
		wmode: 'transparent', 
		expressInstall: true
	});
	jQuery(window).load(function(){
		jQuery('.galeria li a img').each(function(){
			jQuery(this).css('margin-top', (jQuery(this).parent().height()-jQuery(this).height())/2);
		});
	}); 
});


