﻿    $(function(){
    	positionAdress();
    	function positionAdress(){
    		if ($(document.body).height() < $(window).height()){
    			$("#pageFooterOuter").css({position: "absolute",top:($(window).scrollTop()+$(window).height()-$("#pageFooterOuter").height())+"px"})
    		}
    		if (1000 < $(window).width()){
    			$("#pageFooterOuter").css({position: "absolute",left:($(window).width()-$("#pageFooterOuter").width()-30)+"px"})
    		}
        if ($(window).height()<580){
    			$("#pageFooterOuter").css({position: "absolute",top:(600-$("#pageFooterOuter").height())+"px"})
        }
    	}

    	$(window)
    		.scroll(positionAdress)
    		.resize(positionAdress)
    		.load(positionAdress)
      });

    $(function(){
    	positionFooter();
    	function positionFooter(){
    		if ($(document.body).height() < $(window).height()){
    			$("#content").css({position: "absolute",top:($(window).scrollTop()+$(window).height()-$("#content").height()-30)+"px"})
    		}
    		if ($(window).height()>580){
      			$(".wrapper").css({height:($(window).height())+"px"})
            }
          else{
      			$(".wrapper").css({height:"580px"})
      			$("#content").css({position: "absolute",top:(580-$("#content").height()-30)+"px"})
          }
        if ($(window).width()<980){
      			$(".wrapper").css({width:"980px"});
      			$("#content").css({width:"980px"});
            }
          else{
      			$(".wrapper").css({width:($(window).width())+"px"});
      			$("#content").css({width:($(window).width())+"px"});
            }
          }

    	$(window)
    		.scroll(positionFooter)
    		.resize(positionFooter)
        .load(positionFooter)
      });
