jQuery(window).ready(function($) {
	var $slideshow = $('.slideshow');
	$slideshow.cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	if($('.slideshow').children().length > 0) { $('.slideshow').addClass('minheight') }
	$('.artikkel-slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
})
jQuery(document).ready(function($){

	$('.gallery-item a').lightBox({fixedNavigation:true});
	/// PROGRAM TABLE CODE
  $('.popup').lightBox({fixedNavigation:true});
	var table_hover_elements = $("table.program tbody tr > td:not(.location)").find("span");
	var table_location_elements = $("table.program tbody tr > td.location").find("span");

	table_hover_elements.hover(function(){
		$(this).parents("tr").find("td:not(.location) > span").addClass("hover_row");
	}, function(){
		$(this).parents("tr").find("td:not(.location) > span").removeClass("hover_row");
	});

	table_hover_elements.find("a").mousedown(function(){
		$(this).parents("tr").find("td:not(.location) > span").mouseleave(function(){
			$(this).parents("tr").find("td:not(.location) > span").removeClass("mousedown_row");
		});
		$(this).parents("tr").find("td:not(.location) > span").addClass("mousedown_row");
	});

	table_hover_elements.find("a").mouseup(function(){
		$(this).parents("tr").find("td:not(.location) > span").removeClass("mousedown_row");
	})

	table_location_elements.hover(function(){
		$(this).parents("tr").find("td.location > span").addClass("hover_row");
	}, function(){
		$(this).parents("tr").find("td.location > span").removeClass("hover_row");
	});

	table_location_elements.find("a").mousedown(function(){
		$(this).parents("tr").find("td.location > span").find("a").mouseleave(function(){
			$(this).parents("tr").find("td.location > span").removeClass("mousedown_row");
		});
		$(this).parents("tr").find("td.location > span").addClass("mousedown_row");
	});

	table_location_elements.find("a").mouseup(function(){
		$(this).parents("tr").find("td.location > span").removeClass("mousedown_row");
	});


	// END OF TABLE PROGRAM CODE

});

