$(document).ready(function(){
	$(".loginUser").focus(function(){
		if($(this).attr('value') == "LOGIN")
			$(this).attr('value', '');
	});
	
	$(".loginUser").blur(function(){
		if($(this).attr('value') == "")
			$(this).attr('value', 'LOGIN');
	});
	
	$(".loginPW").focus(function(){
		if($(this).attr('value') == "Passwort")
			$(this).attr('value', '');
	});
	
	$(".loginPW").blur(function(){
		if($(this).attr('value') == "")
			$(this).attr('value', 'Passwort');
	});

	$('#HeaderPic').cycle({ 
    		fx:    'fade', 
    		speed:  1600 
 	});
		
 	if($(".scrollable").length > 0)
	{
		$(".scrollable").scrollable({ vertical: true, circular: true, speed: 650 }).autoscroll({intervall: 3000});
	}

	if($('.scoreSheetText').length >0)
	{
		$('.scoreSheetText').expander({
		slicePoint:       390,  
		expandText:       '&nbsp;', 
		expandPrefix:	  '', 	
		collapseTimer:    0, 
		userCollapseText: '&nbsp;' 
		});
	}

	if($('.newsShortText').length >0)
	{
		$('.newsShortText').expander({
		slicePoint:       100,  
		expandText:       '', 
		expandPrefix:	  '', 	
		collapseTimer:    0, 
		userCollapseText: '... weniger Info' 
		});
	}


	if($("#myform").length > 0)
	{
		$("#myform :input").tooltip({
	
		// place tooltip on the right edge
		position: "center right",
	
		// a little tweaking of the position
		offset: [-2, 10],
	
		// use the built-in fadeIn/fadeOut effect
		effect: "fade",
	
		// custom opacity setting
		opacity: 0.7
	
		});
	}

	if($("#guestbookForm").length > 0)
	{
		$("#guestbookForm :input").tooltip({
	
		// place tooltip on the right edge
		position: "center right",
	
		// a little tweaking of the position
		offset: [-2, 10],
	
		// use the built-in fadeIn/fadeOut effect
		effect: "fade",
	
		// custom opacity setting
		opacity: 0.7
	
		});
	}
	if($("a.single_image").length > 0)
	{
 		$("a.single_image").fancybox();
	}

	if($(".galleryThumb").length > 0)
	{
		$(".galleryThumb").mouseover(function()
		{
			$(this).fadeTo("fast", 1.0);
			$(this).css("border", "1px solid #3B3553");
		})
		.mouseout(function(ev)
		{
			$(this).fadeTo("fast", 0.6);
			$(this).css("border", "1px solid #fff");
		}); 
	}

});

// $(function() {		
// 		
// 	// initialize scrollable with mousewheel support
// 	$(".scrollable").scrollable({ vertical: true });	
// 	
// });

