/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */




function callDialog()
{

	$('#dialogImg').show();
	$('#dialog').dialog( { position: 'top' } );
// new
//	$('#dialog').dialog( { modal: false } );

	$("input").click(function () {
        	$(this).focus();
    	});


	$('#dialog').dialog( { width: 390 } );
	$('#dialog').dialog( { height: 235 } );

	//esconde a title bar
	$('.ui-dialog-titlebar').hide();
    
    $('#dialog').live( "dialogclose", function(event, ui) {
    	$('#dialogImg').hide();
    	});
    
    $('.ui-widget-overlay').live( "click", function(event, ui) {
        // caso seja clicado na area do botao da popUp..
    	if (event.pageX >= 781 && event.pageX <= 807)
        	if (event.pageY >= 233 && event.pageY <= 250)
        		$('#dialog').dialog( "close" );
    });
    
    
    $('#dialog').live( "dialogfocus", function(event, ui) {
    	$('.ui-dialog').offset({ top:  255, left: 412 });
    	event.preventDefault();
    });
    $('#dialog').live( "dialogopen", function(event, ui) {
    	$('.ui-dialog').offset({ top:  255, left: 412 });
    	event.preventDefault();
    });
    
    $('#dialog').dialog("open");
    //event.preventDefault();
    return false;
}

function callDialogVideo()
{
    //alert("1");
    //$('#dialog_link').click(function(event) {
    // Tell jQuery that our div is to be a dialog
    $('#dialogVideos').dialog({
        modal: true,
        draggable: false,
        resizable: false,
        autoOpen: false,
        width: 550,
        height: 450,
        position: ['center',75]
    });
    $('#dialogVideos').dialog("open");
    //event.preventDefault();
    return false;
}




