/* You can add as many images as you want just follow this style. The string to the right of the colon is the image, to the left is the link. Make sure the last entry does not have a comma at the end and every other entry does. */

var spotlights = { 
    'images/spotlight-10.jpg':'http://giving.cofc.edu/foundation/mcleodplantation.php', 
    'images/spotlight-11.jpg':'http://www.cofc.edu/strategicplan/',
    'images/spotlight_2.jpg':'http://www.cofc.edu/magazine/', 
    'images/spotlight-7.jpg':'http://webcams.cofc.edu/'
};
var studentprofiles = { 
    'images/sp_1.jpg':'/featureprofiles/student/alexcolao.php', 
    'images/sp_2.jpg':'/featureprofiles/student/fritzstine.php',
    'images/sp_3.jpg':'/featureprofiles/student/juanmaegli.php',
    'images/sp_4.jpg':'/featureprofiles/student/jamieshafer.php',
    'images/sp_5.jpg':'/featureprofiles/student/surfteam.php',
    'images/sp_6.jpg':'/featureprofiles/student/terenceholland.php',
    'images/sp-7.jpg':'/featureprofiles/student/jordanthomas.php'
};
var facultyprofiles = { 
    'images/fp_1.jpg':'/featureprofiles/faculty/bretlott.php', 
    'images/fp_2.jpg':'/featureprofiles/faculty/davidkowal.php',
    'images/fp_3.jpg':'/featureprofiles/faculty/hollisfrance.php',
    'images/fp_4.jpg':'/featureprofiles/faculty/karenchandler.php',
    'images/fp_5.jpg':'/featureprofiles/faculty/peterpiccione.php',
    'images/fp_6.jpg':'/featureprofiles/faculty/tomhutchinson.php'
};

//*********** Do NOT edit below this line   ***************** //
$(document).ready(function() {

$('#spotlight').html('');
$('#spotlight').css('height','180px');
jQuery.each(spotlights, function(k, v) {
      var target;
      if(v.match(/cofc.edu/) == null){
        target = "_blank";
      } else {
        target = "_top";
      }
      $('#spotlight').append('<a target="'+ target +'" href="'+ v +'"><img src="'+ k +'" alt="" /></a>');
    });


$('#spotlight').cycle({ 
    timeout: 3000,
    speed:  500,
    random: 1 
}); 

$('#sp').html('');
$('#sp').css('height','180px');
jQuery.each(studentprofiles, function(k, v) {
      $('#sp').append('<a href="'+ v +'"><img src="'+ k +'" alt="" /></a>');
    });


$('#sp').cycle({ 
    timeout: 15000,
    speed:  500,
    random: 1 
}); 

$('#fp').html('');
$('#fp').css('height','180px');
jQuery.each(facultyprofiles, function(k, v) {
      $('#fp').append('<a href="'+ v +'"><img src="'+ k +'" alt="" /></a>');
    });


$('#fp').cycle({ 
    timeout: 10000,
    speed:  500,
    random: 1 
}); 

});