// jQuery basic
jQuery.noConflict();

//jQuery AnythingSlider settings
jQuery(function () {
	jQuery('.items').anythingSlider({
		// width           : 450,       		// if resizeContent is false, this is the default width if panel size is not defined
		// height          : 350,       		// if resizeContent is false, this is the default width if panel size is not defined
		animationTime   : 1000,       		// How long the slideshow transition takes (in milliseconds)
		delay           : 7000,     		// How long between slideshow transitions in AutoPlay mode (in milliseconds)
		easing          : "easeInOutExpo",	// Anything other than "linear" or "swing" requires the easing plugin
		hashTags        : true,      		// Should links change the hashtag in the URL?
		maxOverallWidth : 32766,    		// Max width (in pixels) of combined sliders (side-to-side); set to 32766 to prevent problems with Opera
		autoPlay        : false,      		// This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
        pauseOnHover	: true,				// If true, and autoPlay is enabled, the show will pause on hover
		startText       : "&nbsp;",   		// Start button text
		stopText        : "&nbsp;",	   		// Stop button text
		buildNavigation : true,      		// If true, builds a list of anchor links to link to each panel
		buildArrows     : true,     		// If true, builds the forwards and backwards buttons
		forwardText     : "&nbsp;", 		// Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
		backText        : "&nbsp;"			// Link text used to move the slider back (hidden by CSS, replace with arrow image)
	});
});

// navigation
jQuery(function() {
	jQuery('#navigation ul li:nth-child(1) ul').addClass('nav-1');
	jQuery('#navigation ul li:nth-child(2) ul').addClass('nav-2');
	jQuery('#navigation ul li:nth-child(3) ul').addClass('nav-3');
	jQuery('#navigation ul li:nth-child(4) ul').addClass('nav-4');
	jQuery('#navigation ul li:nth-child(5) ul').addClass('nav-5');
	jQuery('#navigation ul li:nth-child(6) ul').addClass('nav-6');
});

//project slider
jQuery(function() {
	jQuery('.slider-title').css("top", "-30px");

    jQuery('.project-entry').hover(function() {
        jQuery(".slider-title", this).stop().animate({
            top: '0px'
        }, {
            queue: false,
            duration: 250
        });
    }, function() {
        jQuery(".slider-title", this).stop().delay(500).animate({
            top: '-30px'
        }, {
            queue: true,
            duration: 400
        });
    });
});

// hidden contact info
jQuery(function() {
	jQuery('.hidden-contact').hide();

    jQuery('.show-contact').click(function() {
        jQuery(this).next('.hidden-contact').show();
    });

    jQuery('.hide-contact').click(function() {
        jQuery(".hidden-contact").hide();
    });
});

// Shadowbox
Shadowbox.init({
	overlayColor: "transparent",
	// overlayColor: "#fff",
	overlayOpacity: 0.85,
	counterType: "counter"
});

//zpf overlay
jQuery(function() {
	jQuery('.zpf-overlay').addClass('hidden');

	jQuery('.project-entry a').click(function() {
        jQuery('.zpf-overlay').removeClass('hidden');
    });
});

jQuery('#sb-overlay').click(function() {
    jQuery('.zpf-overlay').addClass('hidden');
});

jQuery('#sb-nav-close').click(function() {
    jQuery('.zpf-overlay').addClass('hidden');
});

// remove overlay on shadowbox.close
function removeOverlay() {
	jQuery('.zpf-overlay').addClass('hidden');
};
