function validate_formmail(f)
{
antyspam_answer = $(".antyspamVer").attr('answer');
antyspam_value = $(".antyspamVer").val();
antyspam_title = $(".antyspamVer").attr('title');
if(antyspam_answer != antyspam_value || antyspam_value == '')
{
alert("Odpowiedz na pytanie weryfikujące");
return false;
}
required = 0;
wymagane = $(".required_field");
$.each(wymagane, function () {
title = $(this).attr('title');
wartosc = $(this).val();
if(wartosc.length < 3)
{
alert('Wypelnij pole obowiązkowe: '+title);
required++;
}
});
if(required > 0)
{
return false;
}
}
$(".redirect").click(function() {
parent.location.href=$(this).attr('href');
return false;
});
function registration()
{
required = 0;
required_titles = '';
wymagane = $(".required_field");
errorStyle = "solid 1px #FA5A5A";
okStyle = "solid 1px #BDBDBD";
var ErrorMsg = '';
mailValue = $(".userProfileEmail").val();
if(!MailIsValid(mailValue))
{
$(".userProfileEmail").css('border', errorStyle);
ErrorMsg = ErrorMsg + "
Bledny email";
required++;
}
else
{
$.get("Registration.html", { ajaxData: "get", userMail: mailValue },
function(data){
if(data == 'MAIL_EXIST')
{
$(".userProfileEmail").css('border', errorStyle);
alert("E-mail istnieje");
required++;
}
else if(data == 'MAIL_EMPTY')
{
$(".userProfileEmail").css('border', errorStyle);
required++;
}
else
{
$(this).css('border', okStyle);
}
pass1 = $("#register1").val();
pass2 = $("#register2").val();
if(pass1 != pass2)
{
ErrorMsg = ErrorMsg+"
Hasla roznia sie";
$("#register1, #register2").css('border', errorStyle);
required++;
}
$.each(wymagane, function () {
title = $(this).attr('title');
wartosc = $(this).val();
if(wartosc.length < 1)
{
//alert('Wypelnij pole obowiązkowe: '+title);
//required_titles = required_titles+"
Wypełnij poprawnie wszystkie wymagane pola
Pola które musisz wypełnić zostały oznaczone czerwonym kolorem"+ErrorMsg+"
dostawiam
"); console.log('xxx'); }, function(){ }); function tooltip() { xOffset = 10; yOffset = 20; $(".pokazOpis").hover(function(e){ t = $(this).attr('title'); baseTitle = t; $(this).removeAttr('title'); $("body").append(""+ t +"
"); $("#tooltipA") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ title = baseTitle; $(this).attr('title', title); $("#tooltipA").remove(); }); $(".pokazOpis").mousemove(function(e){ $("#tooltipA") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); } tooltip(); $(document).ready ( function() { FancyBox(); FacebookWidget(); } ); function FancyBox() { $('.fancybox').fancybox ({ mouseWheel : false, helpers : { thumbs : { width : 150, height : 150 } } }); } function FacebookWidget() { $("#FBWidget").hover ( function() { $("#FBWidget").stop(true, false).animate({marginLeft: "-242"}, "medium"); }, function() { $("#FBWidget").stop(true, false).animate({marginLeft: "-38"}, "medium"); }, 500 ); }