function JE_EMAIL(txt){var x = new RegExp('^[^@]+@([a-z,A-Z,0-9,_,-]+[.]{1})+[a-z,A-Z,0-9]{2,5}$'); if (x.exec(txt.toLowerCase())==null) return 0; else return 1;} function show(id) {if (document.getElementById(id).style.display=='none') document.getElementById(id).style.display='block'; else document.getElementById(id).style.display='none';} function showk(id,dir) {show('kategorie-'+id); if (document.getElementById('kimg'+id).src.indexOf('eshopbaby-r-plus.gif')>-1) document.getElementById('kimg'+id).src=dir+'/eshopbaby-r-minus.gif'; else document.getElementById('kimg'+id).src=dir+'/eshopbaby-r-plus.gif';} function regnews() {if(JE_EMAIL(document.getElementById('enov').value)==0) {alert('pro registraci novinek musí být e-mail zadán ve správném formátu'); return false;} else {return true;}} function myParseFloat(str){str=''+str+''; var value=str.match('[-]{0,1}(?:[1-9]+[0-9]*[,.]{0,1}[0-9]*)|(?:0[,.][0-9]*)'); if(value!=null && value.length>0){value[0]=value[0].replace(',','.'); value=parseFloat(value[0])*1; return value;}else{return 0;}} function simulateHover(obj,baseCN,typ){var myCN=obj.className.split(' ');for(var i=0; i0){ vypisy.each(function(index,element){ var h2=$(this).find('h2').eq(0); var p=$(this).find('p').eq(0); var hlavniOdkaz=$(this).find('.hlavniOdkaz').eq(0) var img=$(this).find('.hlavniImage'); var activeImage=0; var mininahled=$(this).find('.miniNahled'); var activeMininahled=0; function changeNahled(target){ var target=$(target); hlavniOdkaz.attr({'href':target.parent('a.bg-img').attr('href')}); img.eq(activeImage).fadeOut(1000); h2.text(target.attr('title')); p.text(target.attr('alt')); activeImage=(activeImage==0)?1:0; img.eq(activeImage).attr({'src':target.attr('lowsrc')}); img.eq(activeImage).fadeIn(1000); } mininahled.bind('click',{"index":index},function(ev){ ev.preventDefault(); window['jQueryObrazkovyVypis'+ev.data.index].stopAnimation(); changeNahled(ev.target); }); var jQueryObrazkovyVypisClass=function(eq){ var eq=eq; this.changeNahled=function(){ activeMininahled++; if(activeMininahled>mininahled.length-1){activeMininahled=0;} changeNahled(mininahled.get(activeMininahled)); } var interval=window.setInterval('window[\'jQueryObrazkovyVypis'+eq+'\'].changeNahled()',5000); this.stopAnimation=function(){ window.clearInterval(interval); } } window['jQueryObrazkovyVypis'+index]=new jQueryObrazkovyVypisClass(index); }); } });