var temp=[]; $(document).ready(function() { // console.log('1: ąćęłńóśźż'); $('form.rof input[type=text], form.rof input[type=password]').each(function(i) { if ('' == $(this).val()) { $('#'+$(this).attr('id')+'_alt').css('display', 'block'); } // $('#mainInvitaion').hide(); $(this).focus(function(){ $('#'+$(this).attr('id')+'_alt').css('display', 'none'); }); $(this).blur(function(){ if ('' == $(this).val()) $('#'+$(this).attr('id')+'_alt').css('display', 'block'); }); }); $('#userbar a').mouseover(function(){ // $(this).css('color', '#275291'); $(this).css('text-decoration', 'underline'); }); $('#userbar a').mouseout(function(){ $(this).css('text-decoration', 'none'); // $(this).css('color', '#ffffff'); }); $('.fl a').mouseover(function(){ $(this).css('text-decoration', 'underline'); }); $('.fl a').mouseout(function(){ $(this).css('text-decoration', 'none'); }); // $("#zipCode").mask("99/99/9999", {placeholder:" "}); // $('#next').click(checkLogin()); // Nawigacja if (0 < $("#nav li").length) { url_fragments = window.location.toString().split('#'); if (2 == url_fragments.length) show_panel(url_fragments[1]); else { url_fragments = $('#nav li:first a').attr('href').split('#'); if (2 == url_fragments.length) { show_panel(url_fragments[1]); } } $('#nav a').click(function(){ url_fragments = $(this).attr('href').split('#'); if (2 == url_fragments.length) { show_panel(url_fragments[1]); } }); } if (0 < $("#navigation li").length) { url_fragments = window.location.toString().split('#'); if (2 == url_fragments.length) show_panel(url_fragments[1]); else { url_fragments = $('#navigation li:first a').attr('href').split('#'); if (2 == url_fragments.length) { show_panel(url_fragments[1]); } } $('#navigation a').click(function(){ url_fragments = $(this).attr('href').split('#'); if (2 == url_fragments.length) { show_panel(url_fragments[1]); } }); } $('#mainInvitaion').hide(); }); var decision; var avilableMoney = false; var amountEurogramols; function show_panel(panel) { $('.panel').hide(); $('#'+panel+'.panel').show(); $('#nav li').removeClass('sel'); $('#nav li a[href$=#'+panel+']').parent().addClass('sel'); } function format_seconds(seconds) { minutes = Math.floor(seconds/60); sMinutes = (10 > minutes) ? '0'+minutes : minutes; seconds = seconds - (minutes*60); sSeconds = (10 > seconds) ? '0'+seconds : seconds; return sMinutes+':'+sSeconds; } function sessions_timer() { refresh = false; $.each(games_sessions, function(){ this.t_minus--; if (0 >= this.t_minus) { refresh = true; this.t_minus = 0; } $('#session_'+this.hash+' h1').html(format_seconds(this.t_minus)); }); /* if (refresh) { games_sessions = null; get_games(); } */ get_games(); window.setTimeout(sessions_timer, 1000); } function get_games() { $.getJSON('/ajax/stat/', function(data){ games_sessions = data; // $('.games_sessions').html('
'
html+='
'+
'Podaj kwotę Eurogramoli jaką chcesz wymienić na złotówki oraz uzupełnij dane bankowe.
'+ '| Kwota w EUG | Kwota w PLN |
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Numer rachunku bankowego'+ ' | '+ '|
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Imię'+ ' | '+ '|
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Nazwisko'+ ' | '+ '|
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Ulica i numer'+ ' | '+ '|
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Kod pocztowy'+ ' | '+ '|
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Miejscowość'+ ' | '+ '|
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
Podaj kwotę Eurogramoli jaką chcesz wymienić na złotówki oraz adres email, do którego jest przypisane twoje konto.
'+ '| Kwota wypłaty w eurogramolach | Kwota a PLN |
| '+ ''+ ' | '+ ''+ ''+ ' | '+ '
| '+ 'Email'+ ' | '+ '|
| '+ ''+ ' | '+ '|
Twoje konto zostanie zasilone w ciągu max 3 dni roboczych.
'; $('#'+elementId).html(html); } function payByDotPay(number) { $('#fromInputId').val('36996'); var money; $('#fromInputUrlc').val('http://gramol.pl/dotpay.html'); switch(number) { case 1: { $('#fromInputKwota').val('2'); $('#fromInputOpis').val('Oplata za 100 eurogramoli.'); money = 1; break; } case 2: { $('#fromInputKwota').val('5'); $('#fromInputOpis').val('Oplata za 250+50 eurogramoli.'); money = 3; break; } case 3: { $('#fromInputKwota').val('10'); $('#fromInputOpis').val('Oplata za 500+200 eurogramoli.'); money = 7; break; } case 4: { $('#fromInputKwota').val('20'); $('#fromInputOpis').val('Oplata za 1000+500 eurogramoli.'); money = 15; break; } case 5: { $('#fromInputKwota').val('50'); $('#fromInputOpis').val('Oplata za 2500+1500 eurogramoli.'); money = 40; break; } } $.ajax( { type: 'POST', url: '/ajax/sendDotPay/', data: { value: money, sms: 0 }, dataType: 'json', success: function(response) { $('#formInputControl').val(response); if(response != null) { document.forms['dotpay'].submit(); } } }); } function smsChargingAmount(amount) { amountEurogramols = amount; $('#doladuj_eurogramole').css('display', 'none'); $('#smsem').css('display', 'block'); switch(amount) { case 100: { phoneNumber = '72068'; smsCost = "2 zł netto (2,44 zł brutto)"; break; } case 250: { phoneNumber = '75068'; smsCost = "5 zł netto (6,10 zł brutto)"; break; } case 500: { phoneNumber = '79068'; smsCost = "9 zł netto (10,98 zł brutto)"; break; } case 1000: { phoneNumber = '91968'; smsCost = "19 zł netto (23,18 zł brutto)"; break; } default: { document.location = "http://dev.gramol.pl"; break; } } $('#amount').html('AP.GRAMOL'+amountEurogramols); $('#amountEug').html(amountEurogramols+' Eurogramoli'); $('#smsCost').html('Koszt SMS: '+smsCost); $('#genid').val(amountEurogramols); $('#phoneNumber').html(phoneNumber); } function setVisibleFalse(fielId) { $('#'+fielId).css('display', 'none'); } function setVisibleTrue(fielId) { $('#'+fielId).css('display', 'block'); } function closeInvitation(tt,te) { $('#'+tt).remove(); }