jQuery.noConflict();
(function($) { 
	$(function() {
		$(document).ready(function(){
		     $("#socialmedia").slideBox({width: "100%", height: "125px", position: "top"});


    $("img").each(function() {
      if($(this).attr("src") == ""){
       $(this).css({"display":"none"});
        }
});
//ceebox
		$.fn.ceebox.videos.base.param.allowScriptAccess = "sameDomain" //added to kill the permissions problem
		$.extend($.fn.ceebox.videos,{
			uctv:{
				siteRgx: /uctv\.tv\/search\-details/i, 
				idRgx: /(?:showID=)([0-9]+)/i, 
				src: "http://www.uctv.tv/player/player_uctv_bug.swf",
				flashvars: {previewImage : "http://www.uctv.tv/images/programs/[id].jpg", movie : "rtmp://webcast.ucsd.edu/vod/mp4:[id]",videosize:0,buffer:1,volume:50,repeat:false,smoothing:true}
			}
		});
		//$().ceebox(); //used to test to make sure the init call works.
		//$(".ceebox").ceebox({boxColor:'#fff',borderColor:'#525252',textColor:'#333',videoJSON:"js/humor.json"});
		$(".ceebox").ceebox({titles:false, borderColor:'#dcdcdc',boxColor:"#fff"});
//end ceebox

$(".hoverImg").hover(function() {
	$(this).attr("src", $(this).attr("src").split("1.").join("2."));
}, function() {
	$(this).attr("src", $(this).attr("src").split("2.").join("1."));
});


$("#wrapper").append('<div id="preload" style="display: none;"></div>');
$(".hoverImg").each(function(intIndex) {
	$("#preload").append('<img src="'+$(this).attr("src").split("1.").join("2.")+'" style="display: none;" />');
});

$(".leadershipRow").first().prepend('</div><div id="hoverTip" class="hoverTip"></div>');

$(".leadershipRow").find("img").each(function(intIndex) {
	$("#preload").append('<img src="'+$(this).attr("src").split("1.").join("2.")+'" style="display: none;" />');
});

$(".leadershipRow").find("img").parent().hover(function() {
	$(this).find("img").attr("src", $(this).find("img").attr("src").split("1.").join("2."));
	$("#hoverTip").stop(true,true);
	$("#hoverTip").html($(this).find(".hoverTip").html()).animate({"opacity": "show"});
}, function() {
	$(this).find("img").attr("src", $(this).find("img").attr("src").split("2.").join("1."));
	$("#hoverTip").animate({"opacity": "hide"});
});
$(document).mousemove(function(e) {
	posX = parseInt(e.pageX,10) + 5;
	posY = parseInt(e.pageY,10) + 5;
	$("#hoverTip").css({"left": posX+"px", "top": posY+"px"});
});

	     });
	});
})(jQuery);

