function nyroModalInitialize () {
	$.nyroModalSettings({
		bgColor: '#000000',
		//height: '200',
		//width: '200',
		cssOpt: {
			bg: {
				position: 'absolute',
				overflow: 'hidden',
				top: 0,
				left: 0,
				height: '100%',
				width: '100%',
				background: "#000000"
			}
		},
		contentLoading: '',
		hideContent: hideContent,
		showContent: showContent,
		showBackground: showBackground,
		hideBackground: hideBackground,
		closeButton: '<a href="#" class="nyroModalClose" style="position: absolute; right: 0; padding: 20px 20px 0px 0px;" id="closeBut" title="close"><img src="'+ RootDomain +'website/site_images/lightbox/close.png" /></a>'
	})
}

function showBackground(elts, settings, callback) {
	elts.bg
	.css({
		 opacity: 0.5
	})
	.show();
	callback();
};

function hideBackground(elts, settings, callback) {		elts.contentWrapper
			.css({ // Reset the CSS at the start position
				height: '100px',
				width: '100px'
			})

	.hide()
	.css({
		 opacity: 0
	})
	callback();
};

function hideContent(elts, settings, callback) {
	$('.nyroModalClose').css('display', 'none');
	elts.contentWrapper
	.css({
      width: settings.width+'px',
      marginLeft: (settings.marginLeft)+'px',
      marginTop: (settings.marginTop)+'px'
    })
	callback();
}

function showContent(elts, settings, callback) {
	elts.contentWrapper
	.css({
      width: settings.width+'px',
      marginTop: (settings.marginTop)+'px',
      marginLeft: (settings.marginLeft)+'px'
    })

	.show();
}


$(document).ready(function() {
	nyroModalInitialize();
});
