jQuery(document).ready(function($){
       // Do jQuery stuff using $












$('#markenchecker').submit(function(){ 

	return false;
});


 // markenchecker 
        var markenchecker = $('#searchresult');
        $('#searchword').keyup(function (event) {
            // cache the 'this' instance as we need access to it within a setTimeout, where 'this' is set to 'window'
            var t = this; 
            		// press actions
			var ACTIONS = {
				ENTER: 13,
				LEFT: 37,
				UP: 38,
				RIGHT: 39,
				DOWN: 40
			}

            // only run the check if the username has actually changed - also means we skip meta keys
            if (event.keyCode == ACTIONS.ENTER)
            	{
				var currentVal = $('#searchword').val();
                // the timeout logic means the ajax doesn't fire with *every* key press, i.e. if the user holds down
                // a particular key, it will only fire when the release the key.
                                
                if (this.timer) clearTimeout(this.timer);
                
                if (currentVal.length >= 1) {
                $('#searchresult').html('<img src="/fileadmin/img/uploader.gif">');
                // fire an ajax request in 1/5 of a second
                this.timer = setTimeout(function () {
                    $.ajax({
                        type: "GET",
						url: "/markenchecker_en.php",
						data: "searchWord=" + t.value,
						dataType: "html",
                        success: function(html) {
                        
						// $('#searchresult').html(html).hide().slideDown("slow");
						$('#searchresult').html(html).slideDown("slow");

						
						$('tr').click(
							function() {
								$(this).find('form').submit();
							
							});
						
						}
                    });
                }, 300);
                
                } else {
				$('#searchresult').hide();            
                }
                
                // copy the latest value to avoid sending requests when we don't need to
                this.lastValue = this.value;
             }
                        
        });

// hover for vert_nav 
$("#vertical-nav ul li.parent").hover(function () {
      $("#vertical-nav ul li.over ul").slideToggle();
});


// hover for trademarksearchresultrow
$("form.dpmasuche").click(function () {
      $(this).submit();
});



/*
$('#vertical-nav ul').accordion({
            header: 'a',
            selectedClass: 'active',
            event: 'mouseover'
        });
*/



	

// $("#nizza :checkbox").click(displayClasses);
// $("#nizza :checkbox").html('xxx');

//$("#nizza").html('test');




});

