var $j = jQuery.noConflict();
$j(function(){
	


});
function start() {
	 begin=setInterval("rotateImages()", 8000);


}
function stop() {
	clearInterval(begin);
}
function chip() {
	stop();
 var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = $j('#photoShow div a.chip');
           
                
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.offsetParent().css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }

function olive() {
	stop();
 var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = $j('#photoShow div a.olive');
           
                
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.offsetParent().css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }

function dessert() {
	stop();
 var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = $j('#photoShow div a.dessert');
           
                
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.offsetParent().css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }

function salsa() {
	stop();
 var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = $j('#photoShow div a.salsa');
           
                
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.offsetParent().css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }	
function baskets() {
	stop();
 var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = $j('#photoShow div a.baskets');
           
                
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.offsetParent().css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }
function chiller() {
	stop();
 var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = $j('#photoShow div a.chiller');
           
                
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.offsetParent().css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }

function rotateImages() {
            var oCurPhoto = $j('#photoShow div.current');
            var oNxtPhoto = oCurPhoto.next();
            if (oNxtPhoto.length == 0)
                oNxtPhoto = $j('#photoShow div:first');
            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }
		
		/* this handles the state selector */
		function selectState(form) {
			var stateName = "/" + form.state.value;
			parent.location = stateName  ;
			
	
}

