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;
}
}
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+"
Nieprawidłowy adres e-mail";
required++;
}
else
{
$.get("Registration.html", { ajaxData: "get", userMail: mailValue },
function(data){
if(data == 'MAIL_EXIST')
{
$(".userProfileEmail").css('border', errorStyle);
alert("Podany adres e-mail jest już używany w serwisie");
required++;
}
else if(data == 'MAIL_EMPTY')
{
$(".userProfileEmail").css('border', errorStyle);
required++;
}
else
{
$(this).css('border', okStyle);
}
$.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(); $("#CartWidget").hover ( function() { $("#CartWidget").stop(true, false).animate({marginLeft: "-224"}, "medium"); }, function() { $("#CartWidget").stop(true, false).animate({marginLeft: "-75"}, "medium"); }, 500 ); $(function() { $("a[rel^='prettyPhoto'], a.lightbox").prettyPhoto({theme:'facebook'}); $("#FBWidget").hover ( function() { $("#FBWidget").stop(true, false).animate({marginLeft: "-242"}, "medium"); }, function() { $("#FBWidget").stop(true, false).animate({marginLeft: "-38"}, "medium"); }, 500 ); $('#slider1').bxSlider ({ auto: true, mode: 'fade', controls: false, pager: true, pause: 6000 //autoControls: true }); $.datepicker.regional['pl'] = { closeText: 'Zamknij', prevText: '<Poprzedni', nextText: 'Następny>', currentText: 'Dziś', monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'], monthNamesShort: ['Sty', 'Lu', 'Mar', 'Kw', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Pa', 'Lis', 'Gru'], dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'], dayNamesShort: ['Nie', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So'], dayNamesMin: ['N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], weekHeader: 'Tydz', dateFormat: 'yy-mm-dd', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: '' }; $.datepicker.setDefaults($.datepicker.regional['pl']); $('#footer .column').height(Math.max($('#footer .column.A').height(), $('#footer .column.B').height(), $('#footer .column.C').height(), $('#footer .column.D').height())); $('.main-news .news_item h4').height(Math.max($('.main-news .news_item.item1 h4').height(), $('.main-news .news_item.item2 h4').height(), $('.main-news .news_item.item3 h4').height(), $('.main-news .news_item.item4 h4').height())); $('.newsContent').height($('.main-news .news_item').height() - 60); $('.main-news .news_item').height(Math.max($('.main-news .news_item.item1').height(), $('.main-news .news_item.item2').height(), $('.main-news .news_item.item3').height(), $('.main-news .news_item.item4').height())); }); $(".Rotator").css({opacity: 0.0}).hide(); $(".Rotator:first").css({opacity: 1.0}).show(); setInterval('gallery()', 15000); $(".FindText").focus ( function() { if ($(this).val() == 'wpisz wyszukiwane słowo lub frazę') $(this).val(''); } ); $(".FindText").blur ( function() { if ($(this).val() == '') $(this).val('wpisz wyszukiwane słowo lub frazę'); } ); function gallery() { var current = ($('.Rotator.show') ? $('.Rotator.show') : $('.Rotator:first')); var next = ((current.next('.Rotator').length) ? ((current.next('.Rotator').hasClass('show')) ? ('.Rotator:first') : current.next('.Rotator')) : $('.Rotator:first')); next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000).show(); current.animate({opacity: 0.0}, 1000).removeClass('show').hide(); }