var randomnumber=Math.floor(Math.random()*6)
var featuredCareers = { "careers" : [
                                    { "careerName" : "Chef",
                                      "url" : "/hospitality/",
                                      "imageURL" : "/images/featuredCareers/chef.jpg" },
                                    
                                    { "careerName" : "Police Officer",
                                      "url" : "/crim_just/",
                                      "imageURL" : "/images/featuredCareers/police.jpg" },
									  
									{ "careerName" : "Nurse",
                                      "url" : "/nursing/",
                                      "imageURL" : "/images/featuredCareers/nurse.jpg" },  
									
									{ "careerName" : "Automotive Technician",
                                      "url" : "/automotive/",
                                      "imageURL" : "/images/featuredCareers/automotive.jpg" },
									  
									{ "careerName" : "Network Technician",
                                      "url" : "/it/",
                                      "imageURL" : "/images/featuredCareers/network.jpg" },    
									
									{ "careerName" : "Biotechnology Technician",
                                      "url" : "/biotech/",
                                      "imageURL" : "/images/featuredCareers/biotech.jpg" }  
                                  ]                                

                }; // End Employees

$(document).ready(function(e) {
    $("#careerName").text(featuredCareers.careers[randomnumber].careerName);
	$("#careerName").attr("href", featuredCareers.careers[randomnumber].url);
	$("#featuredCareerImage").attr("src", featuredCareers.careers[randomnumber].imageURL);
	$("#featuredCareerImage").show();
});


		$(function() {
            // create the image rotator
            setInterval("rotateImages()", 6000);
        });
		
        function rotateImages() {
            var oCurPhoto = $('#photoShow div.current');
            var oNxtPhoto = oCurPhoto.next();
            if (oNxtPhoto.length == 0)
                oNxtPhoto = $('#photoShow div:first');

            oCurPhoto.removeClass('current').addClass('previous');
            oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
                function() {
                    oCurPhoto.removeClass('previous');
                });
        }
