

(function($) {
	$(document).ready(function() {
		
	$(".srssfetcher li:odd").css("background-color", "#bbbbff");
	$(".srssfetcher li:even").css("background-color", "#d2d2d2");
	
	
	$('.slideshow').cycle({
		fx: 'fade',
	
		random: 'random',
		
		speedIn:       '3000',  // speed of the 'in' transition 
		speedOut:      '3000'  // speed of the 'out' transition
		
	});
				// prepare Options Object 
				var options = { 
				    clearForm: true,
				     
				    success:    function() { 
				        alert('Welcome to TixList, Bostons FREE daily email connecting ticket buyers and sellers.');
				    } 
				}; 
				
				// pass options to ajaxForm 
				$('#formBuilderJoin_TixList').ajaxForm(options);
				
				
				var optionsList = { 
				    clearForm: true,
				     
				    success:    function() { 
				        alert('Thank you for listing your tickets on TixList.The interested party will contact you directly at the info you provided.Please use common sense when meeting up to exchange your tickets.');
				    } 
				};
				
				$('#formBuilderList_Your_Tickets').ajaxForm(optionsList);
				
				
				
				
				
	

    $("#explore-nav li a").click(function() {
        
        // Figure out current list via CSS class
        var curList = $("#explore-nav li a.current").attr("rel");
        
        // List moving to
        var $newList = $(this);
        
        // Set outer wrapper height to height of current inner list
        var curListHeight = $("#all-list-wrap").height();
        $("#all-list-wrap").height(curListHeight);
        
        // Remove highlighting - Add to just-clicked tab
        $("#explore-nav li a").removeClass("current");
        $newList.addClass("current");
        
        // Figure out ID of new list
        var listID = $newList.attr("rel");
        
        if (listID != curList) {
            
            // Fade out current list
            $("#"+curList).fadeOut(300, function() {
                
                // Fade in new list on callback
                $("#"+listID).fadeIn();
                
                // Adjust outer wrapper to fit new list snuggly
                // var newHeight = $("#"+listID).height();
				
                $("#all-list-wrap").animate({height: "100%"}, "1000");
				
            
            });
            
        }        
        
        // Don't behave like a regular link
        return false;
    });
	
		

	}); // ready

})(jQuery);