function initPage() {
	var pageID = $('#pageID').attr('value');
	
	$('#logo').corner({tl: { radius: 8 }, tr: { radius: 8 }, bl: { radius: 8 }, br: { radius: 8 }, antiAlias: true});
	if(pageID == 'portfolio') {
		$('#header').css({'height':'0px'});
		$('#header').empty();
		$('#logo').css({'height':'720px','background-repeat':'no-repeat'});
	}
			
	
	$('.navItem').each(function(index,ele) {
		//$(ele).corner('round 9px bottom');
		$(ele).corner({tl: { radius: 0 }, tr: { radius: 0 },bl: { radius: 8 }, br: { radius: 8 }, antiAlias: true });
	});
	
	$('.navActive').corner({tl: { radius: 0 }, tr: { radius: 0 },bl: { radius: 8 }, br: { radius: 8 }, antiAlias: true });
			
	$('#contentTitle').live('click',function() {
	    var width = $('#contentPage').css('width').substring(0,3);
	    var newWidth = parseInt(width)+14;
	    $('#contentPage').hide();
	    $('#contentMain').css({'width':newWidth + 'px','height':'24px','float':'right','margin-top':'560px'});
	    $('#minimizePage').html('maximize');
		$('#minimizePage').attr('id','maxPage');
    });
	
	var oldHeight;
	$('#minimizePage').live('click',function() {
		oldHeight = $('#contentMain').css('height');
        oldWidth = $('#contentPage').width();
		$('#contentPage').css({'display':'none'});
		//$('#contentPage').hide();
		$('#contentMain').css({'height':'24px','float':'right','margin-top':'560px','width':oldWidth + 'px'});
		$(this).attr('id','maxPage');
		$(this).html('maximize');
		
		return false;
	});
			
	$('#maxPage').live('click',function() {
		$('#contentPage').css({'display':'block'});
		$('#contentMain').css({'float':'left','margin-top':'60px','height':oldHeight});
		//$('#contentMain').css({'height':'auto','float':'left','margin-top':'60px','width':'600px'});
        //$('#contentPage').css({'display':'block'});
        $(this).attr('id','minimizePage');
        $(this).html('minimize');
        //alert('done');
        
        return false;
    });

	//$('#contentMain').corner('round 9px');
	$('#contentMain').corner({tl: { radius: 8 }, tr: { radius: 8 }, bl: { radius: 8 }, br: { radius: 8 }, antiAlias: true });
	//$('#contentMain').draggable({ appendTo: 'logo' });
}
			$(document).ready(function() {
				var oldId;
				var oldSubId;
				
				$('.navLnk').live('mouseover',function() {
					var id = $(this).parent('li').attr('id');
					if(id != 'navActive') {
						$(this).css({'font-weight':'bold'});
					}
	 				
	 				return false;
	 			});
	 			
	 			$('.navLnk').live('mouseout',function() {
	 				var id = $(this).parent('li').attr('id');
					if(id != 'navActive') {
						$(this).css({'font-weight':'normal'});  
					}
					  
					  return false;
			  	});

				$('.navBottomLnk').live('mouseover',function() {
                	$(this).css({'text-decoration':'underline'});
                });

                $('.navBottomLnk').live('mouseout',function() {
                	$(this).css({'text-decoration':'none'});
				});

				initPage();
				
			});
