$(document).ready(function() { $('.titulo_imprensa').mouseover(function() { $(this).css({backgroundColor:'#e8e8c5'}); }); $('.titulo_imprensa').mouseout(function() { $(this).css({backgroundColor:'#ffffff'}); }); $('.titulo_imprensa').click(function() { window.location = $(this).children().attr('href'); }); $('.meses_imprensa').change(function() { window.location = '/imprensa/'+$(this).val(); }); $('#imprensa #buscar').click(function() { if($('#imprensa_busca').val()=='') alert('Por favor informe pelo menos um termo para a pesquisa.'); else { strOrig = $('#imprensa_busca').val(); strURL = 'BUSCAR-'+strOrig.replace(' ','+')+'.html'; window.location = '/imprensa/'+strURL; } }); $('a[rel^=Lytebox]').click(function() { a = document.getElementById($(this).attr('id')); return false; myLytebox.start(a,false,true); return false; }); function initLytebox() { myLytebox = new LyteBox(); } }); m = 02; y = 2012; check_in = ''; check_out=''; today = parseInt(1329876000); function get_Month(tipo) { $('#calendar_check_'+tipo).css({display:'block'}); $('select').css({visibility:'hidden'}); $.post ( "/calendario", { mes: m, ano: y, tipo: tipo }, function(response) { $('#calendar_check_'+tipo).html(response); }); } function calendarClose(tipo) { $('#calendar_check_'+tipo).css({display:'none'}); $('select').css({visibility:'visible'}); $('#calendar_check_'+tipo).html(''); m = 02; y = 2012; } function set_Date(tipo,int) { e = d.split('/'); var nova_data = parseInt( e[2].toString() + e[1].toString() + e[0].toString() ); eval('check_'+tipo+' = '+int+';'); if(check_in != '' && check_in < today) { alert('A data de Check-In não pode ser menor que a data atual'); return void(0); } if(check_in != '' && check_out!='') { if(check_in>check_out) { alert('A data de Check-Out não pode ser menor que a data de Check-In'); return void(0); } } $('#check_'+tipo).val(d); $('#calendar_check_'+tipo).css({display:'none'}); $('select').css({visibility:'visible'}); $('#calendar_check_'+tipo).html(''); m = 02; y = 2012; }