a{
    color:#00BBFF;
    text-decoration:none;
    outline:none;
}

#mg-gallery{
    width:100%;
    margin:20px auto;
}

#mg-gallery .pic div{
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}

#mg-gallery .pic{
    display: block;
    height: 100%;
}

#mg-gallery div.nomargin{
    margin-right:0;
}

#mg-gallery  .mg-gallery-list{
    list-style: none;
    padding: 0;
    font-size: 0;
    margin: -5px;
}

#mg-gallery  .mg-gallery-list li{
    display: inline-block;
    vertical-align: top;
    border: 1px solid #ddd;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);
    margin: 5px;
    text-align: center;
    position: relative;
}

#mg-gallery  .mg-gallery-list li img{
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}