﻿			$(document).ready(function() {
				$("div#video_semiCircle a").fancybox({
					overlayShow: true,
					'frameWidth':476,
					'frameHeight':386
				});
				$(window).bind("load", function() {
					$("div#video_semiCircle img").each(function (key, elm) {
						$("<img>").attr("src",RolloverImageSource($(this).attr("src"), 
"on") );
					});
				});
				$("div#video_semiCircle img").hover(
					function(){
						$(this).attr("src",
				RolloverImageSource($(this).attr("src"), "on") );
					},
					function(){
						$(this).attr("src",
				RolloverImageSource($(this).attr("src"), "off") );
					}
				);

			});
			
			function RolloverImageSource (source, direction) {
				if (direction == "on") {
					return source.substring( 0, source.search(/(\.[a-z]+)$/) ) + '_on' + 
source.match(/(\.[a-z]+)$/)[0];
				} else {
					return source.replace(/_on\.jpg/, '.jpg');
				}
			}
