$(function() {
        $('#gallery a').lightBox();
		
		$("button, input:submit, input:reset").button();

		$('#formulario').ajaxForm({ 
									// target identifies the element(s) to update with the  response 
									target: '#resultado', 
							 		//resetForm: true,
									// success identifies the function to invoke when the  response 
									// has been received; here we apply a fade-in effect to the new content 
									success: function(data) {
																				
										if( data != "sucesso" ){
											
												$("#resultado").html(data);
												
											}else{
												
												$("#resultado").html("Mensagem enviada.");
												$('#formulario')[0].reset()
											}
									} 
		}); 
		
		
		$('#proposta').dialog({
			autoOpen: false,
			width: '600px',
			show: 'bounce',
			hide: 'drop'
		});
		
		$('#btProposta').click(function() {
			$('#proposta').dialog('open');
			return false;
		});
		
		$('#fechar').click(function() {
			$('#proposta').dialog('close');
			return false;
		});
		
		$('#tabs').tabs();
		$('#tabs2').tabs();
		var icons = {
						header: "ui-icon-circle-arrow-e",
						headerSelected: "ui-icon-circle-arrow-s"
					};
								
		$("#accordion1").accordion({ header: "h3", event: "mouseover", icons: icons });
		
    });

