 ACF = {};
 /* ========= CAN BE DELETED ========*/
 ACF.Videos = Base.extend({
 constructor : 		function (clips){
 				this.clips = clips;
 				this.linkElms = [];
 				this.currentClip = null;
 				this.createLinks();
 				var defaultclip = 0;

 				var currentlocation = window.location.href;
 				if (currentlocation.indexOf("#") > -1 && currentlocation.length > currentlocation.indexOf("#")){
 				 defaultclip = currentlocation.substring(currentlocation.indexOf("#")+1, currentlocation.length)-1;
 				}
 				trace.log(defaultclip);
 				if (this.linkElms.length > 0){
				 this.clicked(Lib.Dom.Elm.first(this.linkElms[defaultclip], "a"));
 				}
 			},
 createLinks :		function (){
 				this.videoclipLinkHolder = $('videoclips');
 				for (var i=0; i<this.clips.length; i++){
 				
 				  var linkdiv = Lib.Dom.Elm.create("div");
 				  linkdiv.className = 'generic_cont clippad';
 				  
 				  var titleh3 = Lib.Dom.Elm.create("h3");
 				  titleh3.appendChild(document.createTextNode(this.clips[i].title));
 				  
 				  var link = Lib.Dom.Elm.create("a");
 				  link.href = '#'+(i+1);
 				  link.vidid = i;
 				  link.appendChild(document.createTextNode("Watch \u00bb"));
 				  
 				  linkdiv.appendChild(titleh3);
 				  linkdiv.appendChild(document.createTextNode(" "));
 				  linkdiv.appendChild(link); 				  
 				  
 				  this.linkElms.push(linkdiv);
 				  this.videoclipLinkHolder.appendChild(linkdiv);
 				  
 				  //var anchor = Lib.Dom.Elm.create('a');
 				  //anchor.name = (i+1);
 				  //$('videoDesc').insertBefore(anchor, Lib.Dom.Elm.first($('videoDesc'), "h4"));
 				  
 				  Lib.Dom.addEvent(linkdiv, "click", Lib.delegate(this, this.clicked));
 				}
 				

 			},
 clicked : 		function (e){
 				var clicked = $(e);
 				var clipdetails = this.clips[clicked.vidid];
 				Lib.Dom.Elm.first($('videoDesc'), "h4").innerHTML = clipdetails.title;
 				$('length').innerHTML = clipdetails.length;
 				$('mainDesc').innerHTML = clipdetails.description;
 				FO.movie = baseurl + clipdetails.url;
 				UFO.create(FO, "videoContainer");
 				this.restoreClip();
 				this.hideClip(clicked.vidid);
 				this.currentClip = clicked.vidid;
 			},
 restoreClip : 		function (){
 				if (this.currentClip != null){
 				   Lib.Dom.Elm.Style.add(this.linkElms[this.currentClip], {'display': 'block'});
 				}
 			},
 hideClip : 		function (id){
 				Lib.Dom.Elm.Style.add(this.linkElms[id], {'display': 'none'});
 			}
 				
});
/* ========= END CAN BE DELETED ========*/