$(function() {


	// http://j.mp/jquery-target-blank
	$('a[href^="http://"]').attr({
		target: "_blank",
		title: "Opens in a new window"
	});



	// Show/Hide Footer Tab
	// http://www.learningjquery.com/2006/09/slicker-show-and-hide

	// hides the slickbox as soon as the DOM is ready
	//$('#tab-content').hide();
	$('#tab-trigger a').toggleClass('active');

	// toggles the slickbox on clicking the noted link  
	$('#tab-trigger a').click(function() {
		$('#tab-content').toggle();
        $(this).toggleClass('active');
		return false;
	});

	// Cycle Plugin - Slideshow
	$('#slideshow').cycle({
	    fx:     'fade',
	    speed:  'fast'
	});

	// $('#slideshow').before('<ul id="slideshow-nav" class="nav">').cycle({
	//     fx:     'fade',
	//     speed:  'fast',
	//     pager:  '#slideshow-nav',
	//
	//     // callback fn that creates a thumbnail to use as pager anchor
	//     pagerAnchorBuilder: function(idx, slide) {
	//         return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
	//     }
	// });


	// Fancybox
	$("#galleries li a").fancybox({
		'titleShow'     : false
	});


});
