// JavaScript Document

$(document).ready(function(){
$('#searchcriteria').focus(function() {
	if (this.value==this.defaultValue) {this.value='';}}).blur(function() {if (this.value=='') {this.value=this.defaultValue;}
});
$("#stage .maintopicbox").css({opacity:0.85});
$("a[rel=fancyimage]").fancybox({	'titlePosition' : 'over',
	'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Bild ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
	},
	'transitionIn' : 'elastic',
	'transitionOut'	: 'elastic'
});
$("a[rel=fancytableimage]").each(function(i){
	if ($(this).children().attr("alt")!=''){
		$(this).attr({'title': $(this).children().attr("alt")});
	}
});
$("a[rel=fancytableimage]").fancybox({	'titlePosition':'over',
	'titleFormat': function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Bild ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
	},
	'transitionIn': 'elastic',
	'transitionOut':'elastic'
});
$(".iframe").fancybox({
	'width' : '90%',
	'height' : '95%',
	'autoScale' : false,
	'transitionIn' : 'none',
	'transitionOut' : 'none',
	'type' : 'iframe'
});
});

