$(document).ready(function(){

	// for lightbox
	if ($("a[rel^='prettyPhoto']").length) {
			$(document).ready(function() {
				// prettyPhoto
				$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
			});
	}
	$('.prettyPhoto').hover(function(){
			$(this).find('.img2').stop().animate({opacity:'0'});
		}, function(){
			$(this).find('.img2').stop().animate({opacity:'1'});
		}
	)
	//text shadow
	if ($.browser.msie) {
		$('h2').textShadow('0px 0px 4px #333');
		$('#menu li a > em').textShadow('0px 0px 4px #fff');
		
	};
	// button hover
	$('.button b').css({opacity:'0'});
	$('.button').hover(function(){
			$(this).find('b').stop().animate({opacity:'1'},400)
		}, function(){
			$(this).find('b').stop().animate({opacity:'0'},400)
		}
	)
	
	$('#menu_cms').hover(
		function(event){
			$(this).find('#cms_over').stop().animate({opacity:'1'},400);
		},
		function(event){
			$(this).find('#cms_over').stop().animate({opacity:'0'},400);
		}
	);
	
	$('#menu_html').hover(
		function(event){
			$(this).find('#html_over').stop().animate({opacity:'1'},400);
		},
		function(event){
			$(this).find('#html_over').stop().animate({opacity:'0'},400);
		}
	);
	
	$('#menu_flash').hover(
		function(event){
			$(this).find('#flash_over').stop().animate({opacity:'1'},400);
		},
		function(event){
			$(this).find('#flash_over').stop().animate({opacity:'0'},400);
		}
	);
	
	$('#menu_oferta').hover(
		function(event){
			$(this).find('#oferta_over').stop().animate({opacity:'1'},400);
			$(this).stop().animate({left: "-50px"}, 400 );
		},
		function(event){
			$(this).find('#oferta_over').stop().animate({opacity:'0'},400);
			$(this).stop().animate({left: "-100px"}, 400 );
		}
	);
	
	$('#menu_kontakt').hover(
		function(event){
			$(this).find('#kontakt_over').stop().animate({opacity:'1'},400);
			$(this).stop().animate({left: "-50px"}, 400 );
		},
		function(event){
			$(this).find('#kontakt_over').stop().animate({opacity:'0'},400);
			$(this).stop().animate({left: "-160px"}, 400 );
		}
	);
	
	$('#menu_firma').hover(
		function(event){
			$(this).find('#firma_over').stop().animate({opacity:'1'},400);
			$(this).stop().animate({left: "-50px"}, 400 );
		},
		function(event){
			$(this).find('#firma_over').stop().animate({opacity:'0'},400);
			$(this).stop().animate({left: "-160px"}, 400 );
		}
	);
	
	$('#wyslij').hover(
			function(event){
				$(this).find('#wyslij_over').stop().animate({opacity:'1'},400);
			},
			function(event){
				$(this).find('#wyslij_over').stop().animate({opacity:'0'},400);
			}
		);
})
