jQuery(document).ready(function($) {

	  /*
	   *  Button Hover
	   * * * * * * * * * * * * * * * * * * * */
    $(function() {
       $("#comments #submit").hover(function() {
            $(this).css({"color" : "#888888", "background-image" : "url(/wp-content/themes/eeblog/images/icon_arrow_hover.png)"});
       },
       function(){
            $(this).css({"color" : "#b10101", "background-image" : "url(/wp-content/themes/eeblog/images/icon_arrow.png)"});
       })
       
       $("#content .wpcf7 form input.wpcf7-submit").hover(function() {
            $(this).css({"color" : "#888888", "background-image" : "url(/wp-content/themes/eeblog/images/icon_arrow_hover.png)"});
       },
       function(){
            $(this).css({"color" : "#b10101", "background-image" : "url(/wp-content/themes/eeblog/images/icon_arrow.png)"});
       })
    });


	  /*
	   *  Breite Bild mit Unterschrift
	   * * * * * * * * * * * * * * * * * * * */
	    $(".bild-im-text-links").css("width", $(".bild-im-text-links a").outerWidth());

      if($(".bild-im-text-links a").outerWidth() == '579') {
        $(".bild-im-text-links").css("margin-right", "0");
      }

      if($(".bild-im-text-links span.entry-content-img-original").outerWidth() == '579') {
        $(".bild-im-text-links").css("margin-right", "0");
      }

      $content_img_array = $(".entry-content-img");

      for($i=0; $i < $content_img_array.size(); $i++) {
        $latest_posts_img = $($content_img_array[$i]).css("width", $($content_img_array[$i]).find("a").outerWidth());
        
        if($($content_img_array[$i]).find("a").outerWidth() == '579') {
          $($content_img_array[$i]).css("margin-right", "0");
        }
      }


	  /*
	   *  Cover Link
	   * * * * * * * * * * * * * * * * * * * */
     $(".widget_sp_image-description p img").wrap(
            '<a href="'+$(".widget_sp_image-image-link").attr("href")+'" title="'+$(".widget_sp_image h3 span").text()+'" target="_blank" />'
      );
      $(".widget_sp_image-image-link").attr("title", $(".widget_sp_image h3 span").text());


	  /*
	   *  Autor Link
	   * * * * * * * * * * * * * * * * * * * */
     $(".widget_author_info .author-name").html(
            '<a href="'+$(".widget_author_info .author-website a").attr("href")+'" title="'+$(".widget_author_info .author-name").text()+'">'+$(".widget_author_info .author-name").text()+'</a>'
      );
      
      
	  /*
	   *  Nav-Below
	   * * * * * * * * * * * * * * * * * * * */
	   
    if ($("#nav-below").length != 0) {
       if (($("#nav-below .nav-previous").html().length == 0) && ($("#nav-below .nav-next").html().length == 0)) {
          $("#nav-below").remove();
        }
    }
    
    
	  /*
	   *  Schlagwoerter
	   * * * * * * * * * * * * * * * * * * * */

    if ($("li.widget_tag_cloud").length != 0) {
      if ($("li.widget_tag_cloud div").html().length == 0) {
          $("li.widget_tag_cloud").remove();
      }
    }
    

	  /*
	   *  Verwandte Beitraege
	   * * * * * * * * * * * * * * * * * * * */

    if ($("li.widget_yarpp_widget").length != 0) {
      if ($("li.widget_yarpp_widget div").length != 0) {
        if ($("li.widget_yarpp_widget div").html().length == 0) {
            $("#single-bottom").remove();
        }
      }
    }


});

