// JavaScript Document


if (document.images) {
   	var arrow1 = new Image();
   	var arrow2 = new Image();
	arrow1.src = "images/arrow_off_F3.jpg";
   	arrow2.src = "images/arrow_off_FF.jpg";
}

// for e-mail obscuring
var mailprefix = 'kevin';
var mailsuffix = 'kevinsodenmd.com';


function thisMovie(movieName) {if (navigator.appName.indexOf("Microsoft") != -1) {return window[movieName];} else {return document[movieName];}}
function playVideo(file,img) {thisMovie("flashPlayer").sendToPlayer(file,img);}

$(document).ready(function() {
						   
						   $("a[title!=Visit]").attr('target','_self');
						   $("a[title^=Visit]").attr('target','_blank'); // all external links have "Visit ...." starting the title

						   // Home Page
						   $(".video .content .item").click(function() { 
																  	
															var id = $(this).find('a').attr('id');
															var urls = id.split(':');
															playVideo(urls[0],urls[1]);
																																
													}).hover(
													
														function() { 
															
															$(this).find('a').css({'color':'yellow'});
															$(this).find('img').css({'border':'1px solid yellow'}); 
															
															},
														function() { 
															
															$(this).find('a').css({'color':'white'});
															$(this).find('img').css({'border':'1px solid #333'}); 
															
															}
														
														
							);
						   
						   // Video Page
						   $(".video .gallery .item").click(function() { 
																  	
															var id = $(this).find('a').attr('id');
															var urls = id.split(':');
															playVideo(urls[0],urls[1]);
																																
													}).hover(
													
														function() { 
															
															$(this).find('a').css({'color':'blue'});
															$(this).find('img').css({'border':'1px solid blue'}); 
															
															},
														function() { 
															
															$(this).find('a').css({'color':'#333'});
															$(this).find('img').css({'border':'1px solid #333'}); 
															
															}
														
														
							);
						   
						    $(".linkrow ul li").hover(function() {$(this).addClass("overF3");}, function() {$(this).removeClass("overF3");});
						    $(".middle .more a").hover(function() {$(this).addClass("overF3a");}, function() {$(this).removeClass("overF3a");});
						    $(".about .more a").hover(function() {$(this).addClass("overFFa");}, function() {$(this).removeClass("overFFa");});
							$(".articles .more a").hover(function() {$(this).addClass("overFFa");}, function() {$(this).removeClass("overFFa");});
							$(".books .more a").hover(function() {$(this).addClass("overFFa");}, function() {$(this).removeClass("overFFa");});
							$(".topics .more a").hover(function() {$(this).addClass("overFFa");}, function() {$(this).removeClass("overFFa");});
							$(".contact .more a").hover(function() {$(this).addClass("overFFa");}, function() {$(this).removeClass("overFFa");});
						    $(".schedule .more a").hover(function() {$(this).addClass("overFFa");}, function() {$(this).removeClass("overFFa");});
						  						   
						   
		});

