/* addMargin function was added to give margin-top to the outerMain div dynamically. */
function addMargin(){
	/*var viewport = parseInt($(window).height());
	var outerMainDiv = parseInt($(".outerMain").height());
	var topMargin = (viewport - outerMainDiv)/2;

	if(topMargin < 0)
	{
		topMargin = '2%';	
	}
	
	$(".outerMain").css('margin-top',topMargin);
	
	
	var viewPortWidth = parseInt($(window).width());*/
	//$(".outerMain").css('width',viewPortWidth);
	
	
}

$(window).resize(function() {
 addMargin();
});


$(document).ready(function(){
		addMargin();
		//$(document).pngFix();	
		
});


function approval(Video_id,dream_no){
	$( "#dialog:ui-dialog" ).dialog( "destroy" );
	$( "#dialog-confirm" ).html("<p>Approve or Reject the Dream number "+dream_no+"</p>");
	
	$( "#dialog-confirm" ).dialog({
			resizable: false,
			height:140,
			modal: true,
			buttons: {
				"Approve": function() {
					//call approve function here
					//confirmAction(dream_no, Video_id);
					$( this ).dialog( "close" );
				},
				"Reject": function() {
					//call Reject function here
					//confirmAction(dream_no, Video_id);
					$( this ).dialog( "close" );
				}
			}
		});
	
}
