$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements
				//$("a[rel='gallery']").colorbox();
				//$("a[rel='gallery']").colorbox({transition:"fade"});
				$("a[rel='gallery']").colorbox({transition:"none",width:"80%", height:"80%"});
				//$("a[rel='entry']").colorbox({transition:"none",width:"40%", height:"40%"});
				$("a[rel='galleryFull']").colorbox({transition:"none"});
//				$("a[rel='example4']").colorbox({slideshow:true});
//				$(".example5").colorbox();
//				$(".video").colorbox({iframe:true, innerWidth:425, innerHeight:344});
//				$(".video").colorbox({width:"80%", height:"80%", iframe:true});
//				$(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
//				$(".video").colorbox({
//					onOpen:function(){ alert('onOpen: colorbox is about to open'); },
//					onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
//					onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
//					onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
//					onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
//				});
//				
//				//Example of preserving a JavaScript event for inline calls.
//				$("#click").click(function(){ 
//					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
//					return false;
//				});
			});


function showVideoInBox(videoID,titleIn) {
	$.fn.colorbox({href:"showVideo.php#"+videoID+"&autoplay=1",iframe:true,title:titleIn,innerWidth:"854",innerHeight:"480"});
	//$.fn.colorbox({rel:"video",href:"http://youtube.com/v/"+videoID+"&autoplay=1",iframe:true,title:titleIn,innerWidth:"854", innerHeight:"480"});
}
function showEntryBox() {
	//alert("in showEntry");
	$.fn.colorbox({href:"LocalEntry.php",iframe:true,title:"",innerWidth:"1024",innerHeight:"600",onClosed:function(){ 
		window.location.reload(); }});
	//$.fn.colorbox({rel:"video",href:"http://youtube.com/v/"+videoID+"&autoplay=1",iframe:true,title:titleIn,innerWidth:"854", innerHeight:"480"});
}

function changeFlowVideo(url,caption){
	window.scrollTo(0,0);
	var replaceclip = {'url':url,'autobuffer':'true'};
	document.getElementById('caption').innerHTML=caption;
	$f("player1").play(replaceclip);
}

function showEditVideoBox(playlist,videoTitle,index) {
	//alert("in showEntry");
	$.fn.colorbox({href:"LocalEditVideo.php?playlist="+playlist+"&video="+videoTitle+"&index="+index,iframe:true,title:"",innerWidth:"800",innerHeight:"600",onClosed:function(){ 
		location.href = 'LocalFilmsData.php'; }});
	//$.fn.colorbox({rel:"video",href:"http://youtube.com/v/"+videoID+"&autoplay=1",iframe:true,title:titleIn,innerWidth:"854", innerHeight:"480"});
}

function showLocalVideoInBox(url,thumbnail,titleIn) {
	//alert("ShowlocalVideo"+url+":"+titleIn);
	$.fn.colorbox({href:"LocalShowVideo.php?url="+url+"&thumb="+thumbnail,iframe:true,title:titleIn,innerWidth:"730",innerHeight:"520"});
	//$.fn.colorbox({rel:"video",href:"http://youtube.com/v/"+videoID+"&autoplay=1",iframe:true,title:titleIn,innerWidth:"854", innerHeight:"480"});
}

function showLocalVideoInTinyBox(url,thumbnail,titleIn) {
	//alert("ShowlocalVideo"+url+":"+titleIn);
	$.fn.colorbox({href:"LocalShowVideo.php?tiny=true&url="+url+"&thumb="+thumbnail,iframe:true,title:titleIn,innerWidth:"300",innerHeight:"150"});
	//$.fn.colorbox({rel:"video",href:"http://youtube.com/v/"+videoID+"&autoplay=1",iframe:true,title:titleIn,innerWidth:"854", innerHeight:"480"});
}

function closeWindow(){
	
}

function showPicture(hrefIn,relIn,titleIn){
	hrefIn= '"'+hrefIn+'"';
	relIn = "'"+relIn+"'";
	titleIn = "'"+titleIn+"'";
	alert(hrefIn+"->"+relIn+"->"+titleIn);
	$.fn.colorbox({href:hrefIn,width:"80%", height:"80%", rel:relIn,title:titleIn});
}