/**
 *
 * function preloadImages load images
 * 
 * @param array images
 * @param string path optional default images/
 * 
 */
function preloadImages(images, path){
    
    if (typeof path === 'undefined'){
        path = 'images/';
    }
    
    if($.isArray(images)){
    
        $.each(images, function(index, image) { 
            $('<img />').attr('src', path+image);
        });
    }
    
}

/**
 * 
 * function isMobileDevice check or user use mobile device
 * function check screen size
 * 
 * @param int screenSize limit screen size in pixels optional default 1000
 */
function isMobileDevice(screenSize){
    
    if (typeof screenSize === 'undefined'){
        screenSize = 1000;
    }
    
    userScreenSize = $(window).width();
    
    if (userScreenSize < screenSize){
        return true;
    } else {
        return false;
    }
}


