$(function(){      
    $("ul.navi_sub ul").parent().hoverIntent({
     over: function(){
       $(this).children("a").addClass("hover").siblings("ul").show();
    },
      timeout: 300,
      out: function(){
      $(this).children("a").removeClass("hover").siblings("ul").hide();
    }
 });


    $("#navigation>ul>li").each(function () {
        $(this).hoverIntent({
            over: function () {
                $(this).addClass("hover");
            },
            timeout: 300,
            out: function () {
                $(this).removeClass("hover");
            }
        });
    });


    // suchvorschlaege
/* macht probleme im ie7 */   
  $("#searchsuggest").autocomplete("/wtsh/_comp/wquadrat/php/search.php", {
        width: 165,
        selectFirst: false,
        minChars: 2
    });

  
/* bs, 2009-09-09 in tabs.tmpl verschoben
    // tabs jquery-tools
    $("ul.tabsonly").tabs("div.panes > div", {       
       // configuration variables 
       history: true
    });
*/

// accordion jquery-tools
    // add new effect to the tabs 
    $.tools.tabs.addEffect("slide", function(i, done) {  
      this.getPanes().slideUp(600);
	  this.getPanes().eq(i).slideDown(600, done);
    });

/* bs, 2009-09-09 in tabs.tmpl verschoben
   $("#accordion").tabs("#accordion div.pane", { 
     tabs: 'h2',  
     effect: 'slide'    
   });
*/

$("a.nyroModal").nyroModal( {bgColor: '#004470', closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="Fenster schließen">Fenster schließen</a>'} );

    /* videoplayer-links */
    $('a.videolink').click(function (e) {
        e.preventDefault();
        var newwin = window.open($(this).attr('href'), 'videoplayer', 'height=390,width=770,location=0,menubar=0,scrollbars=0,status=0,toolbar=0');
        newwin.focus();
    });
});
