  $(document).ready(function(){

      $("div.teaser-more").click(function(event) {
		window.location = ($(this).find("a").attr("href"));
	});

      $("div.back").click(function(event) {
		window.location = ($(this).find("a").attr("href"));
	});

      $("div.teaser-text").click(function(event) {
		window.location = ($(this).find("a").attr("href"));
	});

		$("a.page-numbers").html('<img src="/wp-content/themes/fiesefalle/images/nav-inactive.png" width="12" height="12" />');
		$(".page-numbers.current").html('<img src="/wp-content/themes/fiesefalle/images/nav-active.png" width="12" height="12" />');
		
		$('#share-button').click(function() {
		  $('#sharing-bar').toggle('slow', function() {
		  });
		});

		$("#share-button").hover(
		  function () {
		    $("#heart").css("color", "red");
		  }, 
		  function () {
		    $("#heart").css("color", "black");
		  }	
		);
		

		var loaderImg = $('<img />').attr('src', '/wp-content/themes/fiesefalle/images/swipe_wait.gif');

		$(".swipefield").touchwipe({
		     wipeLeft: function() { if (typeof ($(".page-numbers .next").attr("href")) != 'undefined') { $('.swipefield .status').html(loaderImg); window.location = $(".page-numbers .next").attr("href");}  },
		     wipeRight: function() { if (typeof ($(".page-numbers .prev").attr("href")) != 'undefined') { $('.swipefield .status').html(loaderImg); window.location = $(".page-numbers .prev").attr("href");} },
		});

		$('html.no-touch .swipefield').hide();
		$('html.touch #logo').replaceWith('<span id="logo"><img src="/wp-content/themes/fiesefalle/images/swipe_intro-20.png" /></span>');
	
		$("li.search").appendTo("ul.page-numbers");
		

  });


