function mmsL (param) { $('.posmenu').css('display', 'none'); $('#s'+param.id).css('display', 'inline'); var elLeft =param.offsetLeft-document.getElementById('container').offsetLeft; var elMid = (document.getElementById('mainMenuS').offsetWidth/2); var elParMid = (param.offsetWidth/2); var pos = elLeft-elMid+elParMid; if (pos <15 ) pos=15; document.getElementById('mainMenuS').style.marginLeft=pos+'px'; document.getElementById('mainMenuS').style.visibility='visible'; } function mmsLHide (param) { document.getElementById('mainMenuS').style.visibility='hidden'; } function scrollDiv0() { //var ilosc = $('.slider'); //alert(ilosc[1]); //if (text.height()>textCont.height()) //{ // $(".slider").slider(); //var textCont = $('.slider').prev('div'); //var text = textCont.children(":nth-child(1)"); $( ".slider" ).slider( { max:0 } ); //$( ".slider" ).slider( { min: -( $(".slider").prev('div').children(":nth-child(1)").height()-$(".slider").prev('div')) } ); //$( ".slider" ).slider( { min: -( $(this).prev('div').children(":nth-child(1)").height()-$(this).prev('div').height()) } ); $( ".slider" ).slider( { value:0 } ); $( ".slider" ).slider( { orientation: 'vertical' } ); $( ".slider" ).slider( { animate: true } ); $(".slider").slider("option", "min", -( $(this).prev('div').children(":nth-child(1)").height()-$(this).prev('div').height())); //min: {-( $(this).prev('div').children(":nth-child(1)").height()-$(this).prev('div').height()); } $( ".slider" ).slider({ slide: function(event, ui) { $(this).prev('div').children(":nth-child(1)").css('margin-top', ui.value); } }); //$('#debdiv').html($('#text').height()+'-'+$('#textCont').height()); // //} /* if ($('#text').height()>$('#textCont').height()) { $(".slider").slider(); $( ".slider" ).slider( { orientation: 'vertical' } ); $( ".slider" ).slider( { animate: true } ); $( ".slider" ).slider( { max:0 } ); $( ".slider" ).slider( { min: -($('#text').height()-$('#textCont').height()) } ); $( ".slider" ).slider( { value:0 } ); $( ".slider" ).slider({ slide: function(event, ui) { $('#text').css('margin-top', ui.value); } }); $('#debdiv').html($('#text').height()+'-'+$('#textCont').height()); } */ } /* function handleSliderChange(e, ui) { var maxScroll = $(this).prev(".content-scroll").attr("scrollWidth") - $(this).prev(".content-scroll").width(); $(this).prev(".content-scroll").animate({scrollLeft: ui.value * (maxScroll / 100) }, 1000); }*/ function getMin(e, ui) { var textCont = $(this).prev('div'); var text = textCont.children(":nth-child(1)"); var min = -(text.height()-textCont.height()); return min; } //var textCont = $(this).prev('div'); //var text = textCont.children(":nth-child(1)"); //-($(this).prev('div').children(":nth-child(1)").height() - $(this).prev('div').height()), /* function scrollDiv() { $(".slider").slider({ animate: true, disabled: false, max: 0, min: -100, orientation: 'vertical', slide: handleSliderSlide, start: handleSliderSlide }); } */ function scrollDiv() { function handleSliderSlide(e, ui) { // var maxScroll = $(this).prev("div").attr("scrollWidth") - $(this).prev(".content-scroll").width(); //$(this).prev(".content-scroll").attr({scrollLeft: ui.value * (maxScroll / 100) }); var textCont = $(this).prev('div'); var text = textCont.children(":nth-child(1)"); var diff = (text.height() - textCont.height()); if (diff>0) { var scroll = ((diff)/100)*ui.value; text.css('margin-top', scroll); text.css('margin-top', scroll); } // $("#debI").html(diff); } $(".slider").each( function() { var overSize = $(this).prev('div').children(":nth-child(1)").height()-$(this).prev('div').height(); if (overSize>0) { $(this).slider( { animate: true, disabled: false, max: 0, min: -100, orientation: 'vertical', slide: handleSliderSlide, start: handleSliderSlide }); } }); } function iLikeIt(param) { var order; order='¶m=ilikeit&value='+param; $.post('http://millionwishesbook.com/'+'js/ajax.php5', order, function(data){ switch (data) { case '2': { $('.wlikes').text('Już lubisz to marzenie'); } break; case '1': { $('.wlikes').text('Lubisz to marzenie!'); likes='¶m=showlikes&value='+param; $.post('http://millionwishesbook.com/'+'js/ajax.php5', likes, function(data){ $('#wlikes').text(data); }); } break; } }); } function SelectAll(param) { param.focus(); param.select(); } function delFile() { $('#obrazek').attr('src', 'http://millionwishesbook.com//images/logo-trans.png'); $('#fobrazek').attr('value', ''); $('#label_file').html(''); } function comp(response) { $('#obrazek').attr("src","http://millionwishesbook.com/temporary/mini/"+response); $('#fobrazek').attr("value",response); $('#label_file').html('Usuń'); } function uploadFile() { $("#uploadify").uploadify({ 'uploader' : 'http://millionwishesbook.com/js/uploadify.swf', 'script' : 'http://millionwishesbook.com/uploadFile.php5', 'cancelImg' : 'http://millionwishesbook.com/images/cancel.png', 'folder' : 'http://millionwishesbook.com/temporary/', 'buttonText' : 'Wybierz plik', 'fileDesc' : '*.jpg, *.jpeg, *.png', 'fileExt' : '*.jpg;*.jpeg;*.png', 'auto' : true, 'multi' : false, 'onComplete' : function(event, queueID, fileObj, response){comp(response)} }); }; function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } function mptext(param) { var lang_pl = '

Czym jest millionwishesbook.com?

Nasza Misja
Podejmując przemyślane działania można zrealizować każde marzenie.
Niemożliwe staje się możliwe, dzięki odważnym decyzjom oraz wytrwałości w dążeniu do celu.

'; var lang_en = '

Czym jest millionwishesbook.com?
- Zbieramy Milion Marzeń od ludzi z całego świata.
- Realizujemy 7 marzeń wybranych przez internautów.
- Organizujemy wyprawę dookoła świata promującą ten pomysł.
- Robimy film pokazujący nasze przygody, napotkanych ludzi, ich domy, codzienną pracę, oraz ich MARZENIA.

Nasza Misja
Szerzenie idei wzajemnej pomocy w realizacji marzeń.
Promocja hasła: „Dobrze zaplanowaną oraz aktywną działalnością - realizujemy marzenia
i ulepszamy otaczającą nas rzeczywistość”.

'; var nlang_pl = 'Polski'; var nlang_en = 'English'; var tlang_pl = 'Na całym świecie ludzie mają Miliony Marzeń'; var tlang_en = 'All around the world people have millions of wishes.'; if (param=='pl') {$('#mPageText').html(lang_pl); $('#mLName').html(nlang_pl); $('#mTitle').html(tlang_pl);} if (param=='en') {$('#mPageText').html(lang_en); $('#mLName').html(nlang_en); $('#mTitle').html(tlang_en);} } function dymekPomoc(e,v, param, offset){ var obj=document.getElementById('pomoc'); obj.style.display='block'; document.getElementById('pomocText').innerHTML=param; v.onmouseover=function() { obj.style.display='block'; document.getElementById('pomocText').innerHTML=param;} v.onmouseout=function() { obj.style.display='none';} v.move=function(e){ e=e||event; if (e.pageX || e.pageY) {posx = e.pageX; posy = e.pageY;} else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } obj.style.left=posx - 40 - offset +"px"; obj.style.top=posy - 40 + "px"; //document.title=document.body.scrollTop;*/ } v.move(e); v.onmousemove=function(e){v.move(e);} } function dymek() { $('#box1').jOverlay({color:'black', opacity : 0.3}); } function initializeSteps0 () { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(52.173931692568, 18.8525390625), 2); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); var baseIcon = new GIcon(G_DEFAULT_ICON); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); function createMarker(point, tekst) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(""+tekst+""); }); return marker; } var latlng = new GLatLng(22.1655, 42.4655); map.addOverlay(createMarker(latlng, 'fasola from krakow
')); var latlng = new GLatLng(12.1655, 52.4655); map.addOverlay(createMarker(latlng, 'fasola from krakow
')); var latlng = new GLatLng(13.123, -23.1231); map.addOverlay(createMarker(latlng, 'asd from warszawa
')); var polyline = new GPolyline([ new GLatLng(22.1655, 42.4655),new GLatLng(12.1655, 52.4655),new GLatLng(13.123, -23.1231), ], "#ff0000", 10); map.addOverlay(polyline); } } function sprawdzLogin() { var login = document.getElementById('formlogin').value; if (window.XMLHttpRequest) ObiektXMLHttp = new XMLHttpRequest(); else if (window.ActiveXObject) ObiektXMLHttp = new ActiveXObject('Microsoft.XMLHTTP'); var url = encodeURIComponent('param') + '=' + encodeURIComponent('login') + '&' + encodeURIComponent('value') + '=' + encodeURIComponent(login); ObiektXMLHttp.open('GET', 'http://millionwishesbook.com//js/ajax.php5?'+url); ObiektXMLHttp.onreadystatechange = function() { if (login.match(/^\s+/) || login.length == 0) {} //document.getElementById('loginstatus').innerHTML='Podaj login
'; else { if (ObiektXMLHttp.readyState != 4) document.getElementById('loginstatus').innerHTML='Sprawdzanie...'; if (ObiektXMLHttp.readyState == 4) { if (ObiektXMLHttp.responseText=='ok') document.getElementById('loginstatus').innerHTML='Login jest dostępny'; if (ObiektXMLHttp.responseText=='exists') document.getElementById('loginstatus').innerHTML='Wybrany login jest już zarejestrowany
'; } } } ObiektXMLHttp.send(null); }; jQuery.fn.imageScroller = function(params){ this.each(function(){ var p = params || { width:150, child:"div", auto:true }; var _btnNext = $(this).next('div').children(':nth-child(2)'); var _btnPrev = $(this).next('div').children(':nth-child(1)'); var _imgFrame = $(this).children(":nth-child(1)"); var _width = p.width; var _child = p.child; var _auto = p.auto; var _itv; var turnRight = function(){ _btnNext.unbind("click",turnRight); if(_auto) autoStop(); var imag = _imgFrame.find(_child+":first").width(); _imgFrame.animate( {marginLeft:-imag}, 'fast', '', function(){ _imgFrame.find(_child+":first").appendTo( _imgFrame ); _imgFrame.css("marginLeft",0); _btnNext.bind("click",turnRight); if(_auto) autoPlay(); }); }; var turnLeft = function(){ _btnPrev.unbind("click",turnLeft); if(_auto) autoStop(); var imag = _imgFrame.find(_child+":last").width(); _imgFrame.find(_child+":last").clone().show().prependTo( _imgFrame ); _imgFrame.css("marginLeft",-imag); _imgFrame.animate( {marginLeft:0}, 'fast' ,'', function(){ _imgFrame.find(_child+":last").remove(); _btnPrev.bind("click",turnLeft); if(_auto) autoPlay(); }); $(".lightbox").lightbox(); }; _btnNext.css("cursor","hand").click( turnRight ); _btnPrev.css("cursor","hand").click( turnLeft ); var autoPlay = function(){ _itv = window.setInterval(turnRight, 3000); }; var autoStop = function(){ window.clearInterval(_itv); }; if(_auto) autoPlay(); }); }; function reportWish() { var order; var mid; var powod; mid = $('#mid').val(); powod = $('#powod').val(); order='¶m=report&mid='+mid+'&powod='+powod; $.post('http://millionwishesbook.com/'+'js/ajax.php5', order, function(data){ switch (data) { case '2': { $('#reportcont').text('TEXT_WISH_REPORTED_ALREADY'); } break; case '1': { $('#reportcont').text('marzenie zostało zgłoszone'); } break; } }); }