/* =================================================================== */
// function to add events crossbrowser
// from: http://www.dustindiaz.com/rock-solid-addevent/
// uncomment the EventCache lines if using EventCache function from code lib
function addEvent( obj, type, fn ) {
	if (obj.addEventListener) {
		obj.addEventListener( type, fn, false );
		//EventCache.add(obj, type, fn);
	}
	else if (obj.attachEvent) {
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); };
		obj.attachEvent( "on"+type, obj[type+fn] );
		//EventCache.add(obj, type, fn);
	}
	else {
		obj["on"+type] = obj["e"+type+fn];
	}
}
/* =================================================================== */


/* cdodge: put this back to enable toggling of crew views */
/** Collapse the list of film credits **/
/*
$(function(){
	$('#credits').addClass('collapsed');
	$('#toggleView').children('a').toggleClass('minimize');
	$('#toggleView').children('a').text('View entire crew');
});
*/


/** Toggle list of film credits **/
function toggleView(){
	var list = $('#credits');
	
	$(this).toggleClass('minimize');
	$('#credits').toggleClass('collapsed');
	
	if($(this).hasClass('minimize')){
		$(this).text('Minimize view');
	}else{
		$(this).text('View entire crew');
	}
}

/* cdodge: put this back to enable toggling of crew views*/
/*
$(function(){
	$('#toggleView').children('a').click(toggleView);
});

*/

function listHover (){
	
}

$(function(){
	$('#filmListings').children('li').hover(
		function(){
			$(this).addClass('over');	
		},
		function(){
			$(this).removeClass('over');	
		}
	);
		
});
