// When the DOM is ready, init scripts.
jQuery(function( $ ){

	/*
	// Bind the mouse enter and mouse leave events using
	// the convenience method, hover().
	$( "#widget-rss" ).hover(
	function(){
		console.log( "mouseEnter" );
	},
	function(){
		console.log( "mouseLeave" );
	}
	);
	*/


	$(document).ready(function(){
		$("#tags-slide").click(function(){
			$("#form-section-tags").slideToggle("slow");
		});
	});
	
	$(document).ready(function(){
		$("#aufloesung-link").click(function(){
			$("#aufloesung").slideToggle("slow");
		});
	});
	
	/*
	$(document).ready(function(){
		$(".search-btn").hover(function() {
				$(this).find('img').stop(true, true).fadeIn(200);
			}, function(){
				$(this).find('img').removeClass("hover").stop(true, true)
					.fadeOut(600); 
		});	
	});
	*/

	$(document).ready(function(){
		$(".widget-single").hover(function() {
				$(this).find('img').stop(true, true).fadeIn(400);
			}, function(){
				$(this).find('img').removeClass("hover").stop(true, true)
					.fadeOut(600); 
		});	
	});
	
	/*
	$(document).ready(function(){
		$("#menu1").hover(function() {
				$("#home").stop(true, true).fadeOut('200');
			}, function(){
				$("#menu1").find('#home').removeClass("hover").stop(true, true).fadeIn('slow'); 
		});	
	});
	*/
	
	$(document).ready(function(){
		$(".topmenu").hover(function() {
				$(this).find('img').stop(true, true).fadeIn(400);
			}, function(){
				$(this).find('img').removeClass("hover").stop(true, true).fadeOut(600); 
		});	
	});
	
	$(document).ready(function(){
		$(".entry-meta-img").mouseenter(function() {
				$(this).find('img').stop(true, true).fadeTo(400, 0.5);
			/*}, function(){
				$(this).find('img').removeClass("hover").stop(true, true).fadeTo(600, 0.7); */
		});
		$(".entry-meta-img").mouseleave(function() {
			$(this).find('img').stop(true, true).fadeTo(600, 1);
		});
	});
	
	
	$(document).ready(function(){
		$(".widget-btn").hover(function() {
				$(this).find('img').stop(true, true).fadeIn(400);
			}, function(){
				$(this).find('img').removeClass('hover').stop(true, true).fadeOut(400); 
		});	
		
		$('#recent-posts').find('.widget-btn').click(function() {
			$('#recent-posts').find('.widget-content').stop(true, true).slideToggle('slow');
		});
		
		$('#widget-friends').find('.widget-btn').click(function() {
			$('#widget-friends').find('.widget-content').stop(true, true).slideToggle('slow');
		});
		
		$('#widget-adds').find('.widget-btn').click(function() {
			$('#widget-adds').find('.widget-content').stop(true, true).slideToggle('slow');
		});
		
		$('#widget-archives').find('.widget-btn').click(function() {
			$('#widget-archives').find('.widget-content').stop(true, true).slideToggle('slow');
		});
		
		$('#recent-posts').find('.widget-btn').toggle(function() {
			$('#recent-posts').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/frisch.jpg)');
			$('#recent-posts').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/frisch_h.jpg');
		},
		function () {
			$('#recent-posts').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/frischu.jpg)');
			$('#recent-posts').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/frisch_hu.jpg');
		});
		
		$('#widget-friends').find('.widget-btn').toggle(function() {
			$('#widget-friends').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/freunde.jpg)');
			$('#widget-friends').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/freunde_h.jpg');
		},
		function () {
			$('#widget-friends').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/freundeu.jpg)');
			$('#widget-friends').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/freunde_hu.jpg');
		});
		
		$('#widget-archives').find('.widget-btn').toggle(function() {
			$('#widget-archives').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/archivu.jpg)');
			$('#widget-archives').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/archiv_hu.jpg');
		},
		function () {
			$('#widget-archives').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/archiv.jpg)');
			$('#widget-archives').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/archiv_h.jpg');
		});
		
		$('#widget-adds').find('.widget-btn').toggle(function() {
			$('#widget-adds').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/top_angebote.jpg)');
			$('#widget-adds').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/top_angebote_h.jpg');
		},
		function () {
			$('#widget-adds').find('.widget-btn').css('background-image',  'url(http://losac.co/wp-content/themes/losac-co/library/media/images/top_angeboteu.jpg)');
			$('#widget-adds').find('.widget-btn img').attr('src','http://losac.co/wp-content/themes/losac-co/library/media/images/top_angebote_hu.jpg');
		});
		
	});
	


	
	
/*END*/
});

