jQuery(function($){
/*
var 
	// viewport Y-size
     wheight=$(window).height(),
    
	// element Y-position
     top=$('#iphone').offset().top;
	
	
	// iPhone-Scrolling
	$(window).scroll(function(){ 
		// current viewport Y-position
		var scr=$(document).scrollTop()||$(window).scrollTop();
		if(scr<=45){$("#iphone,#androidg1").stop().animate({top:'45px'},500);}
		else{$("#iphone,#androidg1").stop().animate({top:scr+5},500);}
    });
*/
	
	// Men�hoveranimation
	$('.menu li a').hover(
		function(){$(this).stop().animate({lineHeight:'26px'},300);}, 
		function(){$(this).stop().animate({lineHeight:'31px'},300);}
	);
	
	
	// Suchbegriff Farbwechsel Value
	$('#searchquery').unsetTextfield({text:'suchen...'});
	$('#searchquery').unsetTextfield({text:'search...'});
	 
	$('#searchquery').bind("focus blur", function(){
		if($(this).val() == "suchen..." || $(this).val() == "search..."){$(this).css("color","#ccc");}
		else {$(this).css("color","#222");}
	});
	
	
	// Slidemen� ein- und ausklappen 
  	$("#bt_mobileappz").click(function(event){ 
		this.blur();
		event.preventDefault();
		$('.slidemenu').slideToggle('slow');
  	});
	$(".slidemenu a.bt_up,.slidemenu a.bt_close").click(function(event){ 
		this.blur();
		event.preventDefault();
		$('.slidemenu').slideUp('slow');
  	});
	
	
	// Screens zoomen
	$(".functions .screens a").fancybox({
		'hideOnContentClick':false,'overlayShow':true,'zoomSpeedIn':600,'zoomSpeedOut':500,'easingIn':'easeOutBack','easingOut':'easeInBack'});	
	
	
	// Socialbookmarks 
	$('#bookmarks a').bind("mouseover mouseout", function(event){
		var text = $(this).attr('title');											
		if (event.type == "mouseover") {
			$('#bookmarktext').html(text);
		} else {
			$('#bookmarktext').html('...');
		}													
	});
	
	$('.showcomments').click(function(event) {
		event.preventDefault();
		$(this).parents('.bug').find('.commentlist').slideToggle("slow");
		
		if ($(this).find('span').hasClass('arrow_down')) {
			$(this).find('span').addClass('arrow_up').removeClass('arrow_down');
		}
		else {
			$(this).find('span').addClass('arrow_down').removeClass('arrow_up');
		}
	});

});



