// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function (){
	
/* Pretty Photo  */

	$("a[rel^='prettyPhoto']").prettyPhoto({
		opacity: 0.80, /* Value between 0 and 1 */
		show_title: false, /* true/false */
		allow_resize: true, /* Resize the photos bigger than viewport. true/false */
		theme: 'dark_square', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
		overlay_gallery: false, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
		social_tools: false, /* html or false to disable */
		iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
	});

/* Navigation ie6 Fix */

	$("ul#topnav li").hover(function() { //Hover over event on list item
		$(this).css({ 'background' : 'url(images/arrow_nav_hover.png) no-repeat center bottom'}); //Add background color and image on hovered list item
		$(this).find("span").show(); //Show the subnav
	} , function() { //on hover out...
		$(this).css({ 'background' : 'none'}); //Ditch the background
		$(this).find("span").hide(); //Hide the subnav
	});

});

//Set default open/close settings
$('.acc_container').hide(); //Hide/close all containers

//On Click
$('.acc_trigger').click(function(){
	if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
	}
	return false; //Prevent the browser jump to the link anchor
});


/* optional triggers

$(window).load(function() {
	
});

$(window).resize(function() {
	
});

*/
