/* ......................................................... Portfolio Pages slideshow function */
function startSlides(){
	//loop through the LIs in the slideshow until we find the first index of the class we've set above in the 'thisClass' variable
	//when we find that one, we set the theStart variable to it
	for(var i=0;i<$("#slider_large ul li").length;i++){
		if($("#slider_large ul li")[i].className==thisClass){
			theStart=i;
			break;
		}
	}
	$('#slider_large').easySlider({startSlide: theStart, esCallback: function(n, nmax){callBack(n,nmax);}, auto: false,continuous: false });
	var tempClass="";
	//now we'll loop through all LI elements and add unique classes to the array
	$("#slider_large ul").children("li").each(function(){
		if((this.className)!=tempClass){
			firstPass=false;
			tempClass=this.className;
			classAry.push(this.className);
		}
	});
}
function callBack(current,total){
	//array of all main leftcolumn links
	var linkAry = $(".holder ul li[class*='colTitle_style']");
	//if the class of the slide you've just arrived on doesnt match the temp class name, we should switch the active link
	if(thisClass!=$("#slider_large ul").children("li")[current].className){
		Cufon.replace('.colTitle_style-current', {color: '#777777',hover: true, fontFamily: 'Archer Semibold'});
		$(".colTitle_style-current").attr("class","colTitle_style");	
		//find the index of the class in the array, itll be the same as the index of the link that should be active
		var currLink=jQuery.inArray($("#slider_large ul").children("li")[current].className,classAry);
		$(linkAry[currLink]).attr("class","colTitle_style-current");
		Cufon.replace('.colTitle_style-current', {color: '#ec971a',hover: true, fontFamily: 'Archer Semibold'});
		thisClass=$("#slider_large ul").children("li")[current].className;
	}
}