
    $j(window).bind('resize', function () {
        /*alert('resizing');*/
         var docHeight = $j('#mainContent').height();
		 var wHeight = $j(window).height(); 
         var wWidth = $j(window).width(); 
		$j('#container').css({
				'min-height': (wHeight-25) +'px'
		});
        
        
        /*
        $j('#frontPageImageHolder').css({
        'width': wWidth + 'px'
        });
        */
	});		
		

/*
if content+footer+header is less than window height content = (windowheight -header -footer);
if content+footer+header is more than windw height content = content.height;
*/
        
        
	$j(document).ready(function() {

		// adjusting content area to size of screen
		var wHeight = $j(window).height(); 
        var wWidth = $j(window).width(); 
		var docHeight = $j('#mainContent').height();
        var headerHeight = $j('#HeadArea').height();
        var footerHeight = $j('#footerContainer').height();
        var footerStdHeight = 25;
        try {
        /*
            var imgHeight = $j("#frontPageMainImg").height();
            var source = $j("#frontPageMainImg").attr("src");
            var sourceSliced = source.slice(0,-4);
        */    
        } 
        
        catch (err)
        {
        }
       // console.log(wHeight);
 	
        if ((headerHeight + footerHeight + docHeight ) < wHeight){    
            $j('#container').css({
                    'min-height': (wHeight-25) +'px'
            });
         }
           /*console.log(docHeight+headerHeight+footerHeight);*/

        /*
        // centering background image -- imageName + 'a' is the larger image.
		$j('#frontPageMainImg').hide(); //Hide backup image for non javascript
        
        //'backgroundImage': 'url(' + sourceSliced +'a.jpg)',
        $j('#frontPageImageHolder').css({
            'backgroundImage': 'url(http://localhost/petitrococo/wp-content/themes/petitRococo/images/FrontPageHeadlineImage_01a.jpg)',
            'backgroundRepeat': 'repeat-x',
            'backgroundPosition': 'bottom center',
            'width': wWidth + 'px',
            'height': imgHeight+'px'
        });
        */

        
       
        /*alert('smaller');*/
        



            
		
	});
    
    


		//console.log(docHeight);
		//console.log(wHeight);
