/*  jQUERY CUSTOM FUNCTION 
------------------------------------------------------------------------------------------------------------------------------------------- */
jQuery(document).ready(function($) {
	// External Links Open in New Windows
	$("a[rel='external']").bind("click.external", function(){
	window.open(this.href);
	return false;
	});

	// Menu Dropdown
	/*$(".child").hide();
	$("ul.menu li.parent").click(function(){
		$(this).toggleClass("active").next(".child").slideToggle("slow").siblings(".child").hide("fast");
		return false;
	});*/
	
	// Slides
	$('#promos').slides({
		preload: true,
		preloadImage: 'images/loading.gif',
		container:'slides',
		effect: 'fade',
		crossfade: false,
		fadeSpeed: 200,
		hoverPause:false,
		//play:4500,
		//pause:1000,
		generateNextPrev: false,
		generatePagination: false
	});
	
	// Album
	//$("p.ai").css("visibility", "hidden").css("z-index", "0");
    
});

function next_thumb() {
	   var thumb_id = document.getElementById("thumb_id").value;
	   var hideID = 'thumb'+thumb_id;
       var showID = 'thumb'+(parseInt(thumb_id) + 1);
       if(document.getElementById(showID).value != 'null') {
        document.getElementById("thumb_id").value = (parseInt(thumb_id) + 1);
       }
       document.getElementById(showID).style.visibility = 'visible';
       document.getElementById(hideID).style.visibility = 'hidden';
}
function prev_thumb() {
	   var thumb_id = document.getElementById("thumb_id").value;
	   var hideID = 'thumb'+thumb_id;
       var showID = 'thumb'+(parseInt(thumb_id) - 1);
       if(thumb_id != 0) {
        document.getElementById("thumb_id").value = (parseInt(thumb_id) - 1);
       }
       document.getElementById(showID).style.visibility = 'visible';
       document.getElementById(hideID).style.visibility = 'hidden';
}
function thumb_start() {
    document.getElementById("thumb0").style.visibility = 'visible';
}


