$(document).ready(function(){
	//Baloon Vertical Sliding
	$('.boxgrid.slidedown').hover(function(){
		$(".cover", this).stop().animate({bottom:'15px'},{queue:false,duration:150});
	}, function() {
		$(".cover", this).stop().animate({bottom:'0px'},{queue:false,duration:300});
	});
	
	//Banner Logo Fading
	$('.bnr_logo').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(500, 1);
	  }, function () {
	    $span.stop().fadeTo(500, 0);
	  });
	});
});

// testimonial carousal
function mycarousel_initCallback(carousel)
{
    // 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('#mycarousel').jcarousel({
        auto: 3,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});

// LAVALAMP MAINMENU
 $(function() { $("#menu").lavaLamp({ fx: "backout", speed: 700, click: function(event, menuItem) { return true; } }); });
 
 // BACK TO TOP
 $(function () {
			$(window).scroll(function () { if ($(this).scrollTop() != 0) { $('.toTop').fadeIn(); } else { $('.toTop').fadeOut(); } });
			$('.toTop').click(function () { $('body,html').animate({
					scrollTop: 0
				},
				800);
			});
		});
 
<!--//--><![CDATA[//><!--
sfHover = function() {
	if (!document.getElementsByTagName) return false;
	var sfEls = document.getElementById("menu").getElementsByTagName("li");

	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}

}
if (window.attachEvent) window.attachEvent("onload", sfHover);



//--><!]]>

