/*
  JS Grundfunktionen | © 2010 by sport-kohlschmid.de
____________________________________________ */

$(function (){

	$.fn.SportKohlschmidScripts = function(settings) {

    $("#slider").nivoSlider({
      effect:'random',
      slices:10,
      animSpeed:500,
      pauseTime:5000,
      startSlide:0,
      directionNav:true, 
      directionNavHide:false,
      controlNav:true,
      controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false,
      controlNavThumbsSearch: '.jpg',
      controlNavThumbsReplace: 'bg/arrows.png',
      keyboardNav:true,
      pauseOnHover:true,
      manualAdvance:false,
      captionOpacity:0,
      beforeChange: function(){},
      afterChange: function(){},
      slideshowEnd: function(){},
      lastSlide: function(){},
      afterLoad: function(){}
    });

    $("#nav-category li").hover(function() {
      $('ul', this).css('display', 'block');
    }, function() {
      $('ul', this).css('display', 'none');
    });

    var SidebarHight = $("#content").height();
    $("#left,#right").css('height', SidebarHight);

    $(".right a:last-child").css({
        padding: '7px 12px 7px 7px',
        background: 'none'
      });
      
    $("#right .box .listitem:last-child").css({
        marginBottom: '0',
        border: '0'
      });
      
	// Search Watermark
	var watermark = "Ihr Suchbegriff ...";
	if ($(".hb-search-right input").val() == "") {
		$("#q").val(watermark);
	}
      
	$(".hb-search-right input")
		.focus(	function() {
			if (this.value == watermark) {
				this.value = "";
			}
		})
		.blur(function() {
			if (this.value == "") {
				this.value = watermark;
			}
		});

  };
  
  // Activate SportKohlschmidScripts if HTML is ready
  $("html").SportKohlschmidScripts();

});
