		var srcUrlBase = 'images/thumbnails/';
		var thumbOrigFN = '';
		$('.vid').unbind('mouseenter mouseleave')
		$('.vid').hover(function(){	
									var targetSRC = $(this).find('img.thumb').attr('src');
									var group = $(this).find('img.thumb').attr('rel');
									thumbOrigFN =  targetSRC.split('/').pop();
									var newSRC = srcUrlBase + group + "/CL-" + thumbOrigFN;
									 $(this).find('.thumb').attr( 'src' , newSRC);
								},	
						function(){
									var targetSRC = $(this).find('img.thumb').attr('src');
									var group = $(this).find('img.thumb').attr('rel');
									thumbOrigFN =  targetSRC.split('/CL-').pop();
									var newSRC = srcUrlBase + group + "/" + thumbOrigFN;
									 $(this).find('.thumb').attr( 'src' , newSRC);
								});  
		
	
	$('#thumbs .play').css('opacity' , '0');
	$('.star').css('opacity' , '0');
	$('.thumb-title').css('opacity' , '0');
	$('#thumbs img.thumb').css({'opacity' : '0' , 'width' : '172px' , 'height' : '114px' , 'marginTop' : '0' , 'marginLeft' : '0', 'display' : 'block' });
	/*$('#thumbs img.thumb').animate({
		opacity : 1,
		height: '95px',
		width: '143px',
		marginTop:  '5px',
		marginLeft:  '10px', queue : false
	}, 550, function() { $(''); $('#thumbs .play').animate( { opacity : 1 } ); $('.thumb-title').animate( {opacity:1}); } );*/
	

function thumbnailsZoomIn () {

		var i = -1;
		var subMenuItems = $('#thumbs img.thumb');
		var recursiveThumbAnimation = function() {
					if (++i < subMenuItems.length)
						{
								$(subMenuItems[i]).stop().animate( {
									opacity : 1,
									height: '95px',
									width: '143px',
									marginTop:  '5px',
									marginLeft:  '10px', queue : false
								}, 150, function() { recursiveThumbAnimation(); } );
						} else { $('#thumbs .play').animate( { opacity : 1 } ); $('.thumb-title').animate( {opacity:1}); $('.star').animate( { opacity : 1 } );}
		}
		recursiveThumbAnimation();
}

thumbnailsZoomIn();

function sbVid(vidFile) {
				var video = vidFile;
				var baseURL = "http://www.albatrosmedia.net/";
				var vSrc = vidFile.split(".mov");
				var poster = vSrc[0]+".jpg";
				var flash = '<object type="application/x-shockwave-flash" data="'+baseURL+'js/mediaplayer/player.swf" style="width:640px; height:380px;"> <param name="movie" value="js/mediaplayer/player.swf" /><param name="allowscriptaccess" value="always"/> <param name="allowfullscreen" value="true" /> <param name="wmode" value="transparent"/> <param name="flashvars" value="plugins=hd-1\&hd.file='+baseURL+vSrc[0]+'-HD.m4v\&file='+baseURL+vSrc[0]+'.m4v\&image='+poster+'\&stretching=fill'+'\&hd.state=false\&autostart=true"\/><\/object>';
				
				var code = '<div id="vid" style="">'+flash+'<\/div>';
				code = code + '<div id="vidtitle" style="margin: 0;"><center><h6>Para descargar este material, debes de firmar un previo acuerdo, contactenos.<br/>To download this material, you must sign an agreement, contact us.</h6></center></div>';
				
				//var code = '<div id="vid" style="">'+flash+'<\/div>';
				//code = code + '<div id="download-opts"><img src="/images/arrow_down_gray.png" height="28" align="middle"/><a href="'+baseURL+vSrc[0]+'-HD.m4v">(HD)</a> <a href="'+baseURL+vSrc[0]+'.m4v">(m4v,iOS)</a> <a href="'+baseURL+vSrc[0]+'.3gp">(3gp)</a></div>'
				Shadowbox.open({
					content:    code,
					player:     "html",
					height:     410,
					width:      640,
					handleOversize:     'none'
				});	
				
			}
			
function rmvSrc(){
				var myVideo = $('#thevideo').get();//document.getElementsByTagName('video')[0];
				myVideo.src="";
				//myVideo.load();
				//myVideo.play();
			}
			
function popImage(imgPath) {
				var baseURL = "http://www.albatrosmedia.net/";
				var imgUrl = baseURL + imgPath;
				var code = '<img src="'+ imgUrl +'"/>';
				Shadowbox.open({
					content:    imgUrl,
					player:     "img"
				});	
				
			}
			
function popVideo(vidFile,txtTitle) {
				var video = vidFile;
				var baseURL = "http://www.albatrosmedia.net/";
				var vSrc = vidFile.split(".m4v");
				var poster = vSrc[0]+".jpg";
				var flash = '<object type="application/x-shockwave-flash" data="'+baseURL+'js/mediaplayer/player.swf" style="width:640px; height:380px;"> <param name="movie" value="js/mediaplayer/player.swf" /><param name="allowscriptaccess" value="always"/> <param name="allowfullscreen" value="true" /> <param name="wmode" value="transparent"/> <param name="flashvars" value="plugins=hd-1\&hd.file='+baseURL+vSrc[0]+'-HD.m4v\&file='+baseURL+vSrc[0]+'.m4v\&image='+poster+'\&stretching=fill'+'\&hd.state=false\&autostart=false"\/><\/object>';
				
				var code = '<div id="vidtitle" style="margin: 0 auto;"><center><h3>'+txtTitle+'</h3></center></div>';
				code = code + '<div id="vid" style="">'+flash+'<\/div>';
				//code = code + '<div id="download-opts"><img src="/images/arrow_down_gray.png" height="28" align="middle"/><a href="'+baseURL+vSrc[0]+'-HD.m4v">(HD)</a> <a href="'+baseURL+vSrc[0]+'.m4v">(m4v,iOS)</a> <a href="'+baseURL+vSrc[0]+'.3gp">(3gp)</a></div>'
				Shadowbox.open({
					content:    code,
					player:     "html",
					height:     410,
					width:      640,
					handleOversize:     'none'
				});	
				
			}
