.rebox { position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: 1000; -webkit-filter: none !important;
    background: rgb(0, 0, 0); /* IE Fallback (Solid Colour) */
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAIElEQVQ4T2NkYGDYDMRkA8ZRAxhGw4BhNAyA+WAYpAMAIFgLQfO9BoEAAAAASUVORK5CYII=);
    background: rgba(0, 0, 0, 0.7); }
.rebox *{ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; padding: 0; margin: 0; }
.rebox-contents { position: absolute; top: 5%; left: 10%; text-align: center; width: 80%; height: 90%; }
.rebox-contents .rebox-content { cursor: pointer; border: 5px solid #fff; background-color: #fff; box-shadow: 0 0 20px #000; border-radius: 1px; max-width: 100%; max-height: 80%; margin: auto; position: absolute; bottom: 0; top: 0; left: 0; right: 0;  }
.rebox-loading { width: 31px; height: 31px; margin: -16px 0 0 -16px; position: absolute; top: 48%; left: 50%; }
.rebox-caption { display: none; position: absolute; left: 0; bottom: 0; width: 100%; text-align: center; z-index: 1000; background: #000; background: rgba(0,0,0,0.7); }
.rebox-caption p { margin: 0 auto; max-width: 70%; display: inline-block; *display: inline; *zoom: 1; padding: 10px; color: #fff; font-size: 12px; line-height: 18px; }

.rebox-button { position: absolute; z-index: 9999; min-width: 40px; height: 40px; line-height: 40px; background: rgb(0, 0, 0); opacity:0.4;
    text-decoration: none; font-size: 24px; color: #fff; text-align: center; vertical-align: middle;
    -webkit-border-radius: 32px; -moz-border-radius: 32px; -ms-border-radius: 32px; border-radius: 32px;
    -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -ms-transition: all 0.3s; transition: all 0.3s; }
.rebox-button:hover,
.rebox-button:focus { opacity: 1; -webkit-transform: scale(1.4); -moz-transform: scale(1.4); -ms-transform: scale(1.4); transform: scale(1.4); }
.rebox-close { margin-top: 0px; }
.rebox-zoomIn { margin-top: 50px; }
.rebox-zoomOut { margin-top: 100px; }
.buttons_img{
    position: absolute;
    top: 40%;
    left: 95%;
    transform: translate(-50%,-50%);
}
.rebox-next { right: 10px; top: 48%; }
.rebox-prev { left: 10px; top: 48%; }
.rebox-loading { left: 50%; top: 48%;
    -webkit-animation-name: spin; -webkit-animation-duration: 2000ms; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear;
    -moz-animation-name: spin; -moz-animation-duration: 2000ms; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear;
    -ms-animation-name: spin; -ms-animation-duration: 2000ms; -ms-animation-iteration-count: infinite; -ms-animation-timing-function: linear;
    animation-name: spin; animation-duration: 2000ms; animation-iteration-count: infinite; animation-timing-function: linear;
}

@-ms-keyframes spin {
    from { -ms-transform: rotate(0deg); }
    to { -ms-transform: rotate(360deg); }
}
@-moz-keyframes spin {
    from { -moz-transform: rotate(0deg); }
    to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
    from { transform:rotate(0deg); }
    to { transform:rotate(360deg); }
}


/* 
  ##Device = Tablets, Ipads (portrait)
  ##Screen = B/w 768px to 1024px
*/

@media (min-width: 768px) and (max-width: 1024px) {
  
    .rebox-close { margin-left: 0px; margin-top: 0; }
    .rebox-zoomIn { margin-left: 50px; margin-top: 0; }
    .rebox-zoomOut { margin-left: 100px; margin-top: 0; }
    .buttons_img{
        /*position: absolute;*/
        top: 90%;
        margin: 0 auto;
        width: 145px;
        position: relative;
        left: 0;
        transform: none;
    }
    .rebox-contents{
        /*top: 10%;*/
        height: 85%;
    }
  
}

/* 
  ##Device = Tablets, Ipads (landscape)
  ##Screen = B/w 768px to 1024px
*/

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  
    .rebox-close { margin-left: 0px; margin-top: 0; }
    .rebox-zoomIn { margin-left: 50px; margin-top: 0; }
    .rebox-zoomOut { margin-left: 100px; margin-top: 0; }
    .buttons_img{
        /*position: absolute;*/
        top: 90%;
        margin: 0 auto;
        width: 145px;
        position: relative;
        left: 0;
        transform: none;
    }
    .rebox-contents{
        /*top: 10%;*/
        height: 85%;
    }
  
}

/* 
  ##Device = Low Resolution Tablets, Mobiles (Landscape)
  ##Screen = B/w 481px to 767px
*/

@media (min-width: 481px) and (max-width: 767px) {
  
    .rebox-close {
        margin-top: 0px;
    }

    .rebox-zoomIn {
        margin-top: 50px;
    }

    .rebox-zoomOut {
        margin-top: 100px;
    }

    .buttons_img {
        position: absolute;
        top: 40%;
        left: 90%;
        transform: translate(-50%, -50%);
    }

    .rebox-contents {
        position: absolute;
        top: 5%;
        left: 10%;
        text-align: center;
        width: 80%;
        height: 90%;
    }
  
}

@media (min-width: 320px) and (max-width: 480px) {
  
    .rebox-close { margin-left: 0px; margin-top: 0; }
    .rebox-zoomIn { margin-left: 50px; margin-top: 0; }
    .rebox-zoomOut { margin-left: 100px; margin-top: 0; }
    .buttons_img{
        /*position: absolute;*/
        top: 85%;
        margin: 0 auto;
        width: 145px;
        position: relative;
        left: 0;
        transform: none;
    }
    .rebox-contents{
        top: 15%;
        height: 65%;
    }
  
}