$(function() {

    /* fetch link from image inside tile
     * and open it no matter where clicking on the tile
     *
     * depends on layout defined in "paragraph_kachel.htm"
     */
    $('[id^=kachel] .item')
      .css({cursor:'pointer'})
      .click(function(){
               var location = $(this).find('.img_large a[href]').attr('href');
               window.location = location;
               return false;
             })
      .hover(function(){
               var location = $(this).find('.img_large a[href]').attr('href');
               window.status = location
             },
             function(){
               window.status = '';
             });
	
    //Pragraphen ein- und ausblenden
    $(".toggle_parent").css("height", "90px");
    $(".toggle").css("display", "none");

		$(".toggle_parent").click(function () {
				                            $(this).siblings(".toggle:first").toggle();
				                          });

		$(".toggle_parent").toggle(
			function () {
				$(this).css("height", "91px");
				$(this).children(".toggle_button").addClass("active");
				$(this).children(".toggle_button").html("hide details");
			},
			function () {
				$(this).css("height", "90px");
				$(this).children(".toggle_button").removeClass("active");
				$(this).children(".toggle_button").html("show details");
			}
		);
		

		$("#MarketingPlanerLogin").children(":first").next().toggle(
			function(){
      	$(".MarketingPlanerLogin_Form").show("slow")
		    $(this).removeClass("MarketingPlanerLogin_Image").addClass("MarketingPlanerLogin_Sent")    	
		  },
		 	function(){
		 		check_register_form() 
        $(".MarketingPlanerLogin_Form").hide("slow")
		    $(this).removeClass("MarketingPlanerLogin_Sent").addClass("MarketingPlanerLogin_Image")   			    		
		  }
		);
		
});