/**
 * @description   aria lightbox custom js file
 * @package       schulweb
 * @revision      $Revision$
 * @lastmodified  $Date$
 */

$(function() {
	var lightboxTTnewsList = $(".singleLightbox").ariaLightbox({
		/* text strings :: start */
		titleText: function() {
			return $(".news-list-item h1").text();
		},
		closeText: "Schließen [ESC]",
		altText: function() {
			// $(this) is the triggered element (in this case the link element)
			return $(this).find("img").attr("alt");
		},
		descText: function() {
			return $(this).attr("title");
		},
		pictureText: "Bild",
		ofText: "von",
		prevText: "Bild zurück",
		nextText: "Bild vor",
		/* text strings :: end */
		useDimmer: true,
		pos: "auto"
	});
	
	/* lightbox for tt_news single view */
	var lightboxTTnewsSingle = $(".news-single-img").ariaLightbox({
		imageArray: "a.seriesLightbox",
		/* text strings :: start */
		titleText: function() {
			return $(".news-single-item h1").text();
		},
		closeText: "Schließen [ESC]",
		altText: function() {
			// $(this) is the triggered element (in this case the link element)
			return $(this).find("img").attr("alt");
		},
		descText: function() {
			return $(this).attr("title");
		},
		pictureText: "Bild",
		ofText: "von",
		prevText: "Bild zurück",
		nextText: "Bild vor",
		/* text strings :: end */
		useDimmer: true,
		pos: "auto",
		em: false
	});
	/* lightbox for tt_news single view :: text link */
	var lightboxTTnewsSingleTextLink = $(".news-single-item").ariaLightbox({
		imageArray: "a.textLightbox",
		/* text strings :: start */
		titleText: function() {
			return $(".news-single-item h1").text();
		},
		descText: function() {
			return $(this).attr("title");
		},
		pictureText: "Bild",
		ofText: "von",
		prevText: "Bild zurück",
		nextText: "Bild vor",
		/* text strings :: end */
		useDimmer: true,
		pos: "auto",
		em: false
	});
	
});


