$(document).ready(function() {
$('#searchcriteria').focus(function() {
	if (this.value==this.defaultValue) this.value='';
}).blur(function() {
	if (this.value=='') this.value=this.defaultValue;
});
$("ul#nav li.more span.arrow").click(function(){
		$(this).next().slideToggle(500);
	$(this).parent("li").toggleClass("arrow");	
});
$(".linkfortool").tooltip({ offset: [10, 0],effect: 'fade', opacity: 0.9}).dynamic({ bottom: { direction: 'down', bounce: true } });
$(".slidetabs").tabs(".didyslides > div", {
	effect: 'fade',
	fadeOutSpeed: "slow",
	rotate: true
}).slideshow({autoplay: true, clickable: false,	interval: 6000});
$("#shopheader").css({opacity: 0.9});
$("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'});
});
