// change size of background image if user scals browserwindow
	   
	//jquery
		$(function(){
		var resizeBg = function(){ 
		
			var h = $(window).height();
			var w = $(window).width();
	
			var prop = $("#bg").width() / $("#bg").height();
			
			
			
			var headerHeight = 15;
			var footerHeight = 10;
			
			var minHeight = 415;
			var maxHeight = 500;
			
			var tempHeight = h - (headerHeight + footerHeight);
			//alert (tempHeight);
			
			
			if(w > h){
				prop = $("#bg").height() / $("#bg").width();
				$("#bg").width(w);
				$("#bg").height(w*prop);
				
			}else{
				
				$("#bg").height(h);
				$("#bg").width(h*prop);
			}
			
			
			if(tempHeight < minHeight){
				$("#homePagecontent").height(minHeight);
				//alert ("in tempHeight lest than min: " + tempHeight)
			} else if (tempHeight > maxHeight){
				$("#homePagecontent").height(maxHeight);
				//alert ("in tempHeight greater than max: " + tempHeight)
			} else if (tempHeight > minHeight && tempHeight < maxHeight) {
				$("#homePagecontent").height(tempHeight);
				//alert ("in between: " + tempHeight)
			}
	
		}
		
		resizeBg();
		
		$(window).resize(function(){resizeBg();});
			
		});
		

		
		$(document).ready(function(){
   transparentbgfunction('bg_name')
 });
		


