$().ready(function(){
	$('#slide').nivoSlider({
		effect: 'fold',
		slices: 20,
		animSpeed: 600,
		pauseTime: 3000
	});
	$('.nivo-control').each(function(){$(this).text(parseInt($(this).text()) + 1);});
	$('.gallery li a').fancybox({
		'transitionIn' : 'fade',
		'transitionOut' : 'fade',
		'titleShow' : false
	});
	if($('#error').length > 0) {
		$('#contact-form').addClass('error');
	}
});

/* sIFR */
if(typeof sIFR == "function"){
	// This is the preferred "named argument" syntax
	sIFR.replaceElement(named({sWmode:'transparent',sCase:'upper',sSelector:"h1,h2",sFlashSrc:"/_common/flash/myriadpro-boldcond.swf",sColor:"#FFFFFF",sLinkColor:"#FFFFFF",sBgColor:"#000000",sHoverColor:"#CCCCCC",nPaddingTop:0,nPaddingBottom:0,sFlashVars:"textalign=left&offsetTop=6"}));
	sIFR.replaceElement(named({sWmode:'transparent',sCase:'upper',sSelector:"#sidebar h3",sFlashSrc:"/_common/flash/myriadpro-boldcond.swf",sColor:"#888888",sLinkColor:"#888888",sBgColor:"#000000",sHoverColor:"#888888",nPaddingTop:0,nPaddingBottom:0,sFlashVars:"textalign=left&offsetTop=6"}));
	sIFR.replaceElement(named({sWmode:'transparent',sCase:'upper',sSelector:".services li h3 a",sFlashSrc:"/_common/flash/myriadpro-boldcond.swf",sColor:"#ab9371",sLinkColor:"#ab9371",sBgColor:"#000000",sHoverColor:"#ab9371",nPaddingTop:0,nPaddingBottom:0,sFlashVars:"textalign=left&offsetTop=6"}));
};
