$(document).ready(function() {

	//search box focus
	$('.edit').focus(function() { $(this).css("color","#404040"); });
	$('.edit').blur(function() { $(this).css("color","#999999"); });

	// ticker
	var options = { newsList: "#ticker_rss", startDelay: 10, placeHolder1: " ", tickerRate: 10, loopDelay: 2000 }
	$().newsTicker(options);

	//odd table rows
   $("table.alternate").find("tr:odd").addClass("odd");

   	$("ul.nav li:last-child").addClass('last-tab');
	$("ul.nav li:first-child").addClass('first-tab');

/*
	$("ul.youtube_list li div.play img.thumb").click(function() {
		$(this).parent().addClass('hide');
		$(this).parent().siblings("span.close_btn").addClass('show');
		$(this).parent().siblings("object").addClass('show');
		$(this).parent().siblings("div.inner").addClass('fit');
	});

	$("ul.youtube_list li span.play_btn").click(function() {
		$(this).parent().addClass('hide');
		$(this).parent().siblings("span.close_btn").addClass('show');
		$(this).parent().siblings("object").addClass('show');
		$(this).parent().siblings("div.inner").addClass('fit');
	});

	$("ul.youtube_list li div p.title").click(function() {
		$(this).parents().siblings("div.play").addClass('hide');
		$(this).parents().siblings("span.close_btn").addClass('show');
		$(this).parents().siblings("object").addClass('show');
		$(this).parents().addClass('fit');
	});
	
	$("ul.youtube_list li span.close_btn").click(function() {
		$(this).siblings("div.play").removeClass('hide');
		$(this).siblings("object").removeClass('show');
		$(this).siblings("div.inner").removeClass('fit');
		$(this).removeClass('show');
	});
*/	
});


sfHover = function() {
var sfEls = document.getElementById("main_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);

/*
$(function() {  
$(".short_news .container").jCarouselLite({  
         vertical: true,  
         visible: 10,  
         auto:5000,  
         speed:50  
     });  
});
*/
$(function() {  
$(".company_profiles").jCarouselLite({  
         vertical: false,  
         visible: 4,  
         auto:8000,  
         speed:800,
		 circular: true,
         scroll:4
     });  
 });

