Can someone help me figure out why this code isn't working on my page?
var gallery = $('.photos').gallerify({ margin:10,
mode:{ maxHeight: screen.height * 0.5,
breakPoints:[
{ minWidth: 1170, columns: 4, },
{ minWidth: 970, columns: 3, },
{ minWidth: 750, columns: 2, },
{ maxWidth: 750, columns: 1, }
]},lastRow:'adjust' });
.photos { margin:auto; font-size:0px; }
.photo { position: relative; }
<div class="photos">
<img class="photo" src="http://placehold.it/600x400">
<img class="photo" src="http://placehold.it/600x400">
<img class="photo" src="http://placehold.it/600x400">
<img class="photo" src="http://placehold.it/600x400">
<img class="photo" src="http://placehold.it/600x400">
<img class="photo" src="http://placehold.it/600x320">
...
</div>
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdn.rawgit.com/xremix/xGallerify/master/dist/jquery.xgallerify.min.js"></script>
.fancyboxthumbnailsgallerybook0{ max-width: 500px; height:500px; float:left; width: 23%; margin:5px 5px 0px 5px; background-color:#1E1E1E; overflow:hidden; }
@media (max-width: 1260px) { .fancyboxthumbnailsgallerybook0 { width: 30%; } }
@media (max-width: 1024px) { .fancyboxthumbnailsgallerybook0 { width: 47%; } }
@media (max-width: 500px) { .fancyboxthumbnailsgallerybook0 { width: 98%; } }
<div class="right">
<img class="fancyboxthumbnailsgallerybook0" src="http://www.starkasia.com/wp-content/uploads/book4/01.jpg" alt="Book 4"/>
<img class="fancyboxthumbnailsgallerybook0" src="http://www.starkasia.com/wp-content/uploads/book4/02.jpg" alt="Book 4"/>
...
<img class="fancyboxthumbnailsgallerybook0" src="http://www.starkasia.com/wp-content/uploads/book4/01.jpg" alt="Book 4"/>
</div>
Any ideas for setting a ratio in my jsfiddle? I need help with the height issue.