﻿		$(document).ready(function(){
		    $(".popHeader .closer").click(function() {
              $(this).parent().parent().css('display','none');
            });   

            //turn on default slide
            $("#slideContainer .slideCloak").children().hide();
            $("#slide-01").show();

            //turn on default slide
            
            $("#slideButtons").children().hover(function() {
                // figure out which slide number to turn on
                var slideButtonName = $(this).attr("id");
                var mySplitResultArray = slideButtonName.split("-");
                var mySplitResult = mySplitResultArray[1];
                var switchOnSlide = "slide-" + mySplitResult;
                // turn off previous slide (and all slides)
                $("#slideContainer .slideCloak").children().hide();
                // turn on slide in question
                //$("#" + switchOnSlide + "").parent().show();
                $("#" + switchOnSlide + "").show();
                $("#" + switchOnSlide + "").children().show();
                                
                //turn off HL class on siblings then turn on HL for "this"
                $(this).siblings().attr("class", "slideButton");
                $(this).attr("class", "slideButtonHL");
            });
            $(document).pngFix();
            //$('#signUpPop').jqm({ trigger: '#signUp1'});
            $('#signUpPop').jqm({ trigger: '.signUpTrigger'});





            /*
			*   Examples - images
			*/

			$("a#example1").fancybox({
				'titleShow'		: false
			});

			$("a#example2").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'
			});

			$("a#example4").fancybox();

			$("a#example5").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example6").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});








            
            
		}); 
