
BMSEVENTS.changeCountry = {

    init: function(){
    
        BMSEVENTS.changeCountry.utils.init();
        BMSEVENTS.changeCountry.events.init();
        
    },
    
    utils: {
    
        init: function(){
        
            BMSEVENTS.changeCountry.utils.setSize();
			$('#footer').remove();
            
        },
        
        imageWidth: 1300,
        imageHeight: 855,
        
        setSize: function(){
        
            $('#backgroundImg').css({
                left: '0px',
                marginLeft: '0px'
            });
            
            var bodyWidth = $('body').width();
            var bodyHeight = $('body').height();
            
            var widthDiv = BMSEVENTS.changeCountry.utils.imageWidth / bodyWidth;
            var heightDiv = BMSEVENTS.changeCountry.utils.imageHeight / bodyHeight;
            
            if (widthDiv < heightDiv) {
            
                $('#backgroundImg').css({
                    width: '100%',
                    height: 'auto',
                    visibility: 'visible'
                });
                
            }
            else {
            
                $('#backgroundImg').css({
                    width: 'auto',
                    height: '100%',
                    visibility: 'visible'
                });
                
            }
            
        }
        
    },
    
    events: {
    
        init: function(){
        
            $(window).resize(function(){
            
                BMSEVENTS.changeCountry.utils.setSize();
                
            });
            
        }
        
    }

};


//initialize all
$(document).ready(function(){

    BMSEVENTS.changeCountry.init();
    
});

