jQuery(document).ready(function(){
    if (jQuery("a[rel='nyromodal']").length>0){
        //select all links in ul with rel = lightbox
        jQuery("a[rel='nyromodal']").nyroModal({
            contentError:'',
            type:'image',
            errorClass:'',
            resizeable:false,
            debug:false,
            css:{
                content:{
                    overflow: 'hidden'
                }
            },
        minWidth: 1,
        minHeight: 1,
        gallery:'lightbox'
        });

    //here you can alter data before output!
    jQuery.fn.nyroModal.settings.endFillContent = function(elts, settings) {
        if (elts.content[0].lastChild.nodeName == 'DIV'){
            var descDiv = elts.content[0].lastChild;
            descDiv.className = "lightboxPicDescription";
        }

        if (typeof elts.contentWrapper[0].children[1].children[0] != 'undefined' && elts.contentWrapper[0].children[1].children[0].nodeName == 'DIV'){
            var descDiv = elts.contentWrapper[0].children[1].children[0];
            descDiv.style.overflow = "hidden";
        }
    }
}

    jQuery("a[class='questionMark']").nyroModal({
        contentError:'',
        type:'image',
        errorClass:'',
        resizeable:false,
        debug:false,
        css:{content:{overflow: 'hidden'}},
        minWidth: 1,
        minHeight: 1,
        gallery:'lightbox'
    });

});
