
var J$ = jQuery.noConflict();

J$(document).ready(function(){	
					
					


 if (document.getElementById("slider"))
	J$("#slider").easySlider({
				auto: false, 
				continuous: true
			});
		
		
		 if (document.getElementById("movieslider"))
	J$("#movieslider").easySlider({
				auto: false, 
				continuous: true,
				controlsShow:false

			});
		


if (document.getElementById("mission-button")){


	
			
				J$("#mission-button").css({
				opacity: 0.3
			});
			J$("#team-button").css({
				opacity: 0.3
			});
		
			J$("#page-wrap div.button").click(function(){
				
				J$clicked = J$(this);
				
				// if the button is not already "transformed" AND is not animated
				if (J$clicked.css("opacity") != "1" && J$clicked.is(":not(animated)")) {
					
					J$clicked.animate({
						opacity: 1,
						borderWidth: 5
					}, 600 );
					
					// each button div MUST have a "xx-button" and the target div must have an id "xx" 
					var idToLoad = J$clicked.attr("id").split('-');
					
					//we search trough the content for the visible div and we fade it out
					J$("#cont").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						J$(this).parent().find("#"+idToLoad[0]).fadeIn();
					})
				}
				
				//we reset the other buttons to default style
				J$clicked.siblings(".button").animate({
					opacity: 0.5,
					borderWidth: 1
				}, 600 );
				
			});



};


if (document.getElementById("accordion"))

J$("#accordion").tabs("#accordion div", { 
    tabs: 'img',  
    effect: 'horizontal' 
});


if (document.getElementById("output"))

J$('#tabs li a').featureList({
	output		: '#output li',
	transition_interval : 0,
	start_item	: 0
});

/*
	J$.featureList(
				J$("#tabs li a"),
				J$("#output li"), {
					transition_interval : 0, start_item	:	0 
				});
*/



if (document.getElementById("slider-big"))
	
				J$("#slider-big").easySlider({
				auto: false, 
				continuous: true,
				numeric:true
			});
				
			
if (document.getElementById("slider-big"))
		$('#news').innerfade({
						animationtype: 'slide',
						speed: 750,
						timeout: 2000,
						type: 'random',
						containerheight: '1em'
					});

			

if (document.getElementById("production-stills")){	J$(function() {

// select the thumbnails and make them trigger our overlay
J$("#triggers a").overlay({

	// each trigger uses the same overlay with the id "gallery"
	target: '#gallery',

	// optional exposing effect
	expose: '#f1f1f1'

// let the gallery plugin do its magic!
}).gallery({

	// the plugin accepts its own set of configuration options
	speed: 800
});
});
};









if (document.getElementById("film-info")){


	
		
						
		
		
					J$("#film-info").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						J$("#synop").fadeIn();
					});							
	
		
		
						
						
						
						
							J$("#accordion img.synopsis-slide").click(function(){
					J$("#film-info").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						J$("#synop").fadeIn();
					});							
			})	
						
						
						
			
			

			
			J$("#accordion img.cast-crew-slide").click(function(){
					J$("#film-info").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						J$("#cast-crew-box").fadeIn();
					});							
			});
		
	
		
				J$("#accordion img.review-slide").click(function(){
					J$("#film-info").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						J$("#reviews-box").fadeIn();
					});
					
							
			});
				
				
			
					
					
						J$("#accordion img.awards-slide").click(function(){
					J$("#film-info").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						J$("#awards-box").fadeIn();
					});
					
							
			});
	
			
			
			
		
			
			
				};	
				//J$clicked = J$(this);
				
				// if the button is not already "transformed" AND is not animated
			//	if (J$clicked.css("opacity") != "1" && J$clicked.is(":not(animated)")) {
					
				//	J$clicked.animate({
					//	opacity: 1,
				//		borderWidth: 5
				//	}, 600 );
					
					// each button div MUST have a "xx-button" and the target div must have an id "xx" 
					//var idToLoad = J$clicked.attr("id").split('-');
					
					//we search trough the content for the visible div and we fade it out
				
		
				
				//we reset the other buttons to default style
			//	J$clicked.siblings(".button").animate({
				//	opacity: 0.5,
				//	borderWidth: 1
				//}, 600 );
		





			
		});	







J$(window).load(function(){
if (document.getElementById("wn-screener"))
flowplayer("wn-screener", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});	

if (document.getElementById("poa-screener"))
flowplayer("poa-screener", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});
if (document.getElementById("poa-trail"))
flowplayer("poa-trail", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});






if (document.getElementById("cc-dl-link")){



 
var url='/prods/cc-screener/indies_direct_courting_condi.mp4.zip';    
window.open(url,'Download');  

 


 
};





if (document.getElementById("cc-screener"))
flowplayer("cc-screener", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});
if (document.getElementById("cc-trail"))
flowplayer("cc-trail", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});





if (document.getElementById("af-screener"))
flowplayer("af-screener", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});


if (document.getElementById("af-trail"))
flowplayer("af-trail", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});
	



if (document.getElementById("un-screener"))
flowplayer("un-screener", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});


if (document.getElementById("un-trail"))
flowplayer("un-trail", "http://www.indiesdirect.com/prods/flowplayer.commercial-3.1.5.swf", { 
    key: '$f45aa25c1a525f227ff'
 
});
	
	
	
	
	
});




// JavaScript Document