$(function() {


	var options = {
    "id": "slider", // Required ID
    "type": "slideout",// Optional Type of transition
    "width": 600,// Required Width
    "height": 275,// Required Height
    "delay": 3000,// Optional Delay
    "speed": 400,// Optional Speed
    "steps": 10,// Optional Steps
    "onstart": function(c,l){
        sc.type=(sc.type=='slidein')?'slideout':'slidein';
        
        divs[l].className='top_news clearfix';
        divs[c].className='top_news_active clearfix';					
        },
    "onend": null // Optional Onend callback
	}; 
	
	///////////////////////////
	// Initialize The slider //
	///////////////////////////
	var sc= new sv_slider(options);
	sc.st(); // Call the stop function
	//var c_div= document.getElementById('slider_ctrl'); //Grab the outerdiv to our controls
	//var divs=c_div.children('div');//grab a list of our controls
  var divs = $('#slider_ctrl').children('div'); // MCF mod
  
	for(i=0;i<divs.length;i++){ // cycle through all the control divs.
		divs[i].num=i+1;	//store the slide number it corresponds to
		divs[i].onclick=function(){sc.gt(this.num);};//add onclick event handler
	}

	sc.ti=setTimeout(function(){sc.pl(sc);},sc.del);


});

