function init_thumb_footer_div(selector){$(selector).each(function(){if($(this).css('cursor').indexOf('pointer')!=-1){$(this).bind('click',function(){var href;href=$(this).parent().find('a').attr('href');if(href.length>0)
window.location.href=href;});}});}
function init_hover_div(div){$(div).each(function(){$(this).bind({mouseenter:function(){var obj;obj=$(this).find('.thumb_hover');obj.stop(true,true).fadeIn();$(obj).bind({mouseleave:function(){obj.unbind();obj.stop(true,true).fadeOut();},click:function(){var href;href=obj.parent().find('a').attr('href');if(href.length>0)
window.location.href=href;}});}});});}
function resizeImage(img){var w,h,wd,hd;w=$(img).width();h=$(img).height();wd=$(img).parent().width();hd=wd/(w/h);if(w>wd||h>hd){var d_r;if(h>w)
i_r=wd/w;else
i_r=hd/h;d_r=1.0/((w*h)/(wd*hd)*i_r);$(img).width(w*d_r);$(img).height(h*d_r)}
$(img).show();}
function newslettersubmit(obj){var regexp=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;name=obj.name.value;if(name.length>80||name.length<6){alert("Nome invalido !!!");return false;}
mail=obj.email.value;if(mail.length>80||mail.length<6||!regexp.test(mail)){alert("E-mail invalida !!!");return false;}
obj.email.value='';obj.name.value='';$.ajax({type:"POST",url:"ajx/send_mail.php",data:{'name':name,'email':mail},dataType:"html",success:function(html){}});$.fancybox.close();return false;}
