usesIE = $.browser.msie;

//CUFON
	if(!usesIE) {
        Cufon('h1, h2, h3, h4, h5, h6', {
			color: '-linear-gradient( #3E6F4B, #193320)',		
		});
		Cufon('#menu', {
			textShadow: '2px -2px 5px rgba(0,0,0,0.2)',
			hover: true
			
		});
		Cufon('footer h2', {
			color: '-linear-gradient(#FFFFFF, #CFCFCF)'
		});
	}
// IE6 MENU Hover
sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// Animate menu dropdown
function mainmenu(){
	//$(".menu ul ").css({display: "none"}); // Opera Fix
	//$(".menu li ul li a:last").css({background: "none"});
	
	if (!usesIE) {

		$("#menu li").hover(function(){
			$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(500);
			},function(){
			$(this).find('ul:first').css({visibility: "hidden"});
			});
		$(".headerLangs a, #qtranslateslug-4 a, .nivo-prevNav, .nivo-nextNav").hover(function() {
			$(this).stop().animate({opacity: '0.5'}, 300);
		}, function() {
			$(this).stop().animate({opacity: '1'}, 300);
		});
		$("ul.qtrans_language_chooser li.active a").css({opacity: '0.5'});

		}

		$('#menu li ul li a, .sidebarMenu li a').hover(function() { //mouse in
			$(this).stop().animate({ paddingLeft: '10px' }, 150);
				}, function() { //mouse out
			$(this).stop().animate({ paddingLeft: '0px' }, 150);
				});
	
}


$(document).ready(function() {
	
	$.preloadCssImages();

	$('#slider').nivoSlider({
		effect:'fade,sliceUpDown', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:500,
		pauseTime:6000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});


$("#home-services li:last-child").css('margin-right' ,'0');

mainmenu();

});
