
jQuery.noConflict();

/* Change Flash Background                                           
----------------------------------------------------------*/

function tellFlash(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
	 	return window[movieName];
	} else {
	 	return document[movieName];
	}
}

/* Setting up Scope Nav and Discussion Panels                                           
----------------------------------------------------------*/
function loadNav(){
	
	jQuery("#open-scope").click(function () {
		jQuery("#nav-contents").slideToggle("fast");
	});

	jQuery("li.open-discuss").click(function () {
		//alert(this);
		jQuery(this).next().slideToggle("fast");
	});
	
	
	jQuery("#contents #feature").click(function () {
		jQuery(this).remove();
		jQuery("#player").fadeIn(300);
		jQuery("#close").fadeIn(300);
		jQuery("#main").css("background","black");
	});
	
	jQuery("#v02_eyedees li.short:eq(1)").click(function () {
		//alert(this);
		jQuery("#container").fadeOut(500);
	});
	
	jQuery("li.v02-intro").css("width","25px");
	jQuery("li.intro").css("width","25px");
	
	//
	
}
function swipe(){
		//alert("swipe!");
		jQuery("#main").css("border","none");
		jQuery("#flashback").animate({ 
        top: "-700px"
      }, 700 );
		jQuery("#main").animate({ 
        top: "140px"
      }, 700 );
      jQuery("#main").fadeIn(500);
      jQuery("#sections").fadeIn(1000);
      jQuery("#sidebar").fadeIn(1000);
	}
	
	function adolfo(){

		window.location.hash = "adolfo-film"; //Set the url
		tellFlash("v02-fava").showBackground("adolfo-film"); // Change flash backround
		document.getElementById("article-body").className = "adolfo-film"; 		
		jQuery("#sections").hide(1);
		jQuery("#feature").fadeIn(1000);
	}
	
	function craddock(){
	
		jQuery("#sections").load("/archives/347 #content");
		jQuery("#feature").hide(1);
		window.location.hash = "chris-craddock-improvisation-rules"; //Set the url
		tellFlash("v02-fava").showBackground("chris-craddock-improvisation-rules"); // Change flash backround
		document.getElementById("article-body").className = "chris-craddock-improvisation-rules"; 		
		showTitle();	
		jQuery("#sections").hide(1);
		
		
		//jQuery("#sections").fadeIn(1000);
	}
	
	function murphy(){
		jQuery("#sections").load("/archives/364 #content");
		jQuery("#feature").hide(1);
		window.location.hash = "sharon-murphy-48hr-film-making"; //Set the url
		tellFlash("v02-fava").showBackground("sharon-murphy-48hr-film-making"); // Change flash backround
		document.getElementById("article-body").className = "sharon-murphy-48hr-film-making"; 	 		
		showTitle();	
		jQuery("#sections").hide(1);
		//jQuery("#sections").fadeIn(1000);
	}
	
	function slevinsky(){
		jQuery("#sections").load("/archives/449 #content");
		jQuery("#feature").hide(1);
		window.location.hash = "colette-slevinsky-improv-jazz-celluloid"; //Set the url
		tellFlash("v02-fava").showBackground("colette-slevinsky-improv-jazz-celluloid"); // Change flash backround
		document.getElementById("article-body").className = "colette-slevinsky-improv-jazz-celluloid"; 		 		
		showTitle();
		jQuery("#sections").hide(1);
		//jQuery("#sections").fadeIn(1000);
	}
	
	function showTitle(){
	//alert("show title");
		$("#flashback").animate({ 
        top: "0"
      }, 700 );
		$("#main").animate({ 
        top: "740px"
      }, 700 );
	}
	
/* After "Intro" in flash is done...                                        
----------------------------------------------------------*/
function startScope() {
	//alert("start loading the scope");
	//started($); 
	jQuery("#container").fadeIn(800);
	//showContent();
}

/* ----- */

	
/* ----- */



	function switching() {
		//alert("switching");
		jQuery("#ul-content").load("/archives/364 #ul-content");
	}
	


jQuery(document).ready(function($){
	loadNav();
	
});

