$(document).ready(function(){ 
	$("ul.sf-menu").superfish({
		 delay:       1000,                            
		animation:   {opacity:'show',height:'show'},  
		speed:       'fast',                          
		autoArrows:  false,                           
		dropShadows: false 					  
	}); 
}); 

function swapImages(){
	  $('.staticContent').hide(); // hides static content. this content shows when js is disabled.
      var $active = $('#billboard .active');
      var $next = ($('#billboard  .active').next().length > 0) ? $('#billboard  .active').next() : $('#billboard  div:first');
	  var elId =  "#" + $next.attr("id");
	  var bgPath =  $(elId).css("background-image");
	  $('#mainBd').css('background-image',  bgPath );
      $active.fadeOut(function(){
      $active.removeClass('active');
      $next.fadeIn().addClass('active');
	  });
    }

    $(document).ready(function(){
      // Run our swapImages() function every 5secs
      setInterval('swapImages()', 10000);
    }
);

$(document).ready(function() {
		
if ($.browser.msie /*&& $.browser.version.substr(0,1)<7*/) {
 	
	$(function() {
		var zIndexNumber = 1000;
		$('div').each(function() {
			$(this).css('zIndex', zIndexNumber);
			zIndexNumber -= 10;
		});
	});

}
  /***search***/
 var sLabel = $('.searchForm label').remove().text();
 $('#search').addClass('placeholder').val(sLabel).focus(function() {
																  
  if (this.value == sLabel) {
		  $(this).removeClass('placeholder').val('');
		  
  };
  
}).blur(function() {
if(this.value == '') {
  $(this).addClass('placeholder').val(sLabel);	
};
});

 
 

(function($) {
	$.fn.customFadeIn = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(!$.support.opacity)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).fadeOut(speed, function() {
			if(!$.support.opacity)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeTo = function(speed,to,callback) {
		return this.animate({opacity: to}, speed, function() {
			if (to == 1 && jQuery.browser.msie)
				this.style.removeAttribute('filter');
			if (jQuery.isFunction(callback))
				callback();
		});
	};
})(jQuery);							   
							 
							   
						
							   
			});				  

