//var TEMPLATE_MEDIA_URL = "http://django.sem.local/media/template";
var TEMPLATE_MEDIA_URL = "/media/template";

$(document).ready(startSite);

function startSite() {
/*
	//Isotope initialization - don't forget to buy the license
	// credits page
	$('#credits-list-container').isotope({
		itemSelector : '.credits-list-item',
		animationEngine : 'best-available',
		animationOptions: {
			duration: 750,
			easing: 'linear',
			queue: false
		}
	});

	//Isotope click handler, credits page
	$('#credits #generic-categories a').click(function(){
		$('#credits #generic-categories a').removeClass('selected');
		$(this).addClass('selected');
		var selector = $(this).attr('data-filter');
		$('#credits-list-container').isotope({ filter: selector });
		return false;
	});
*/

	// Adding the video play button overlay to videos, video page
	$('.visual-list-image').append('<img src="' + 
			TEMPLATE_MEDIA_URL + 
			'/images/video-icon.gif" ' +
			'class="video-icon">');

	// Video page filtering click handlers
	$('#visual #generic-categories a').attr('href', '#').click(function(){
		$('#visual #generic-categories a').removeClass('selected');
		$(this).addClass('selected');
		var selector = $(this).attr('data-filter');
		$('.visual-list-item').add('.visual-list-item img').animate({opacity:1}, {queue: false});
		$('.video-icon').animate({opacity:.6}, {queue: false});
		if (selector != '*') {
			$('.visual-list-item:not(.' + selector + ')').add('.visual-list-item:not(.' + selector + ') img').animate({opacity:0.1}, {queue: false});
		}
		return false;
	});





}


