
$(document).ready(function(){
	$('button').hover(
		function(){ 
			$(this).addClass("ui-state-hover"); 
		},
		function(){ 
			$(this).removeClass("ui-state-hover"); 
		}
	);

	if($('#searchbox').hasClass('telefon_email_en')) {
		var startq = 'Work, Composer or Instrument';
	}
	else {
		var startq = 'Werk, Komponist oder Instrument';
	}

	$('#StartQ,').attr('value', startq);

	$('#StartQ').focus(function(){
		var attr = $('#StartQ').attr('value');
		if(attr == startq) {
			$(this).attr('value', '');
		}
		$(this).addClass('activeSearch');
	});
	$('#StartQ').blur(function(){
		var attr = $('#StartQ').attr('value');
		if(attr == '') {
			$('#StartQ').attr('value', startq);
		}
		$(this).removeClass('activeSearch');
	});

	// var q = "";
	if($('.q').length) {
		var q = $('.q').text();
		$('#StartQ').attr('value', q).addClass('activeSearch');
	}
		

	// var pos = $('.verleih').css("background-position");
	// var temp = pos.split(' ');
	// var v = '('+temp[0] + ' 0px)';
	// var vh = temp[0] + ' -28px';
	// 
	// $('.verleih').animate({
	// 		backgroundPosition: "-250px 250px"
	// 	}, 500 );

	// $('#navbar a').each(function(){
	// 	var pos = $(this).css("background-position");
	// 	var temp = pos.split(' ');
	// 	var v = '('+temp[0] + ' 0px)';
	// 	var vh = temp[0] + ' -28px';
	// 
	// 	$(this).css('backgroundPosition', v).animate({
	// 			backgroundPosition: vh
	// 		}, 500 );
	// 	
	// 	
	// 	// $(this).mouseover(function(){
	// 	// 	$(this).animate({
	// 	// 			backgroundPosition: vh
	// 	// 		}, 1500 )
	// 	// 	});
	// });
	
	// $('#navbar a')
	// 	.css( {backgroundPosition: "0 0"} )
	// 	.mouseover(function(){
	// 		var pos = $(this).css("background-position");
	// 		var temp = pos.split(' ');
	// 		var v = temp[0] + ' 0px';
	// 		var vh = temp[0] + ' -28px';
	// 
	// 		$(this).stop().animate(
	// 			{backgroundPosition:vh, 
	// 			{duration:500})
	// 		})
	// 	.mouseout(function(){
	// 		$(this).stop().animate(
	// 			var pos = $(this).css("background-position");
	// 			var temp = pos.split(' ');
	// 			var v = temp[0] + ' 0px';
	// 			var vh = temp[0] + ' -28px';
	// 
	// 			{backgroundPosition:v}, 
	// 			{duration:500})
	// 		});
	

		// .mouseover(function(){
		// 	$(this).stop().animate(
		// 		{backgroundPosition:"(0 -28px)"}, 
		// 		{duration:500})
		// 	})
		// .mouseout(function(){
		// 	$(this).stop().animate(
		// 		{backgroundPosition:"(0 0)"}, 
		// 		{duration:500})
		// 	})


});
