Cufon.replace('#home',{
			  
			  textShadow:'1px 1px #250621'
			 
			  });
Cufon.replace('#menu, #greybg h2');

$(function() {


$('.gallery img:not(".start")').fadeTo('fast', 0.3);
			
var zoomFunc = function(dimension) {
return dimension * 3;
}
var shrinkFunc = function(dimension) {
return dimension * 0.8;
}

var heightFunc = function(dimension) {
return dimension * 0.8;
}

$('.gallery img').slidingGallery({
'slideSpeed':'slow',
'Lzoom':zoomFunc,
'Pzoom':zoomFunc,
'Pwidth':'133',
'Pheight':'90',
'Lshrink':shrinkFunc,
'Pshrink':shrinkFunc,
gutterWidth:35,
defaultLayout:'portrait',
container: $('div.gallery')
});

$('a#left').bind('click', $.galleryUtility.slideRight);
$('a#right').bind('click', $.galleryUtility.slideLeft);

$('.newt').click(function(){
window.open(this.href);
return false;
});

 var validator = $("#kontaktform_1").validate({
        rules: {
            name: {
                required: true
            },
              
            email: {
                required: true,
                email: true
            },
            content: {
                required: true
            },
            access: {
                required: true,
                remote: '/public/ajax/checkCode.php'
            }
        },
        messages: {
            name: {
                required: "Pole nie moĹźe byÄ� puste"
            },

            email: {
                required: "Podaj adres e-mail",
                email: "Adres e-mail jest nieprawidĹ�owy"
            },
            content: {
                required: "WprowadĹş tekst"
            },
            access: {
                required: "Podaj kod z obrazka!",
                remote: "NieprawidĹ�owy kod"
            }
        },
        errorPlacement: function(error, element) {
            if ( element.is(":radio") )
                error.appendTo(element.parent());
            else if ( element.is(":checkbox") )
                error.appendTo(element.parent());
            else
                error.appendTo(element.parent());
        },
        success: function(label) {
            // set &nbsp; as text for IE
            label.html("&nbsp;").addClass("validation ok");
        }
    });

var validator = $("#kontaktform").validate({
        rules: {
            name: {
                required: true
            },

            email: {
                required: true,
                email: true
            },
            content: {
                required: true
            }
			
        },
        
		messages: {
           name: {
                required: "Pole nie może być puste"
            },

            email: {
                required: "Podaj adres e-mail",
                email: "Adres e-mail jest nieprawidłowy"
            },
            content: {
                required: "Wprowadź tekst"
            }

                    
		
		},
        errorPlacement: function(error, element) {
            if ( element.is(":radio") )
                error.appendTo(element.parent());
            else if ( element.is(":checkbox") )
                error.appendTo(element.parent());
            else
                error.appendTo(element.parent());
        },
        success: function(label) {
            // set &nbsp; as text for IE
            label.html("&nbsp;").addClass("validation ok");
        }
    });


  });


