/******************************************************************************************/
/* AJAX */

    function GetXmlHttpObject()
    {
        var xmlHttp=null;
        try
          {
              // Firefox, Opera 8.0+, Safari
              xmlHttp=new XMLHttpRequest();
          }
        catch (e)
          {
          // Internet Explorer
          try
            {
                xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
            }
          catch (e)
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
          }
        return xmlHttp;
    }

/******************************************************************************************/
/* Vertical Menu */

function mainmenu()
{
    $(" #nav ul ").css({display: "none"}); // Opera Fix
	$(" #nav li").hover(function()
	{
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
	},function()
		{
			$(this).find('ul:first').css({visibility: "hidden"});
		});
	}
         
    $(document).ready(function()
	{					
		mainmenu();
    });


/******************************************************************************************/
/* jCarousel */

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#vendors').jcarousel({
        auto: 4,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});


/******************************************************************************************/


