/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
 function fecharMainPopup() {
    $("#MainPopup").hide();
 }
 
 function exibirMainPopup() {
    var t = $("#MainPopup");
    var ml = 0;
    var mt = 0; 
    
    ml = '-' + (t.outerWidth()  / 2) + 'px';
    mt = '-' + (t.outerHeight() / 2) + 'px';
    
    ml = parseInt(ml, 10) + $(window).scrollLeft();
    mt = parseInt(mt,  10) + $(window).scrollTop(); 
            

    t.css({
        marginLeft: ml,
        marginTop: mt,
        left: '50%',
        top: '-200px'
    });    
    
    t.show().animate({  
        top: '50%'
        }, 2000 
    );
 }


$(document).ready(function () {

	$("#whatwhyhow-answers").scrollable({
		vertical:true,
		size:1,
		clickable:false,
		keyboard:'false'
	}).navigator("#whatwhyhow-questions");

	$("#whatwhyhow-questions a").click(function(event){
		event.preventDefault();
		$('#whatwhyhow-arrow').animate({
			top:$(this).attr("rel")
			});
	});

	
	$(function() {
		$("#dialog").dialog();
	});
	
});




