$(document).ready(function() {

	// Browser detection, and rejection
    $.reject({  
        reject: {
			firefox1: true,
			firefox2: true, 
            opera: true, // Opera  
            konqueror: true, // Konqueror (Linux)
            camino: true, // Camino
            aol: true, // AOL Explorer
            unknown: true // Everything else
        }  
    });

	// Activates the horizontal accordion
	$("#main-navigation").hrzAccordion({
		handlePosition: "left",
		hashPrefix: "section",
		openOnLoad: 1,
		openSpeed: 200
	});

	// Makes certain left and right columns equal in height
	$("#left-column, #right-column").equalizeCols();
	$(".section-content-left, .section-content-right").equalizeCols(); 
    
    // Global Fancybox reference
    $("ul.project-list a").fancybox();
    
    // Turns all clicked project links to the light tan of the description.
	$("ul.project-list a").click(function() { 
		$(this).css({'color':'#817c72','text-decoration':'underline'});
	});
      
    // Setup for 300x250 Helzberg banner ads
    $("a[rel='helzberg-inter-sqbanner']").fancybox({
    	'frameWidth': 300,
    	'frameHeight': 250
	});
    
    // Setup for Helzberg Must Have Flash piece
    $("a[rel='helzberg-inter-musthave']").fancybox({
    	'frameWidth': 545,
    	'frameHeight': 525
    });

    // Setup for Broadcast CHOP videos 352x240
    $("a[rel='chop']").fancybox({
    	'frameWidth': 352,
    	'frameHeight': 300
    });
    
    // Setup for Broadcast videos 320x240
    $("a[rel='giorgio'], a[rel='inquirer'], a[rel='kajeet']").fancybox({
    	'frameWidth': 320,
    	'frameHeight': 300
    });
    
	// Setup for Radio spots
    $("a[rel='ironhill'], a[rel='chestnuthill'], a[rel='helzberg-radio']").fancybox({
    	'frameWidth': 320,
    	'frameHeight': 280
    });

	// Sets up the slideshow, and dotted navigation
    $("#homepage-slideshow-ui").jFlow({
		slides: "#slide-container",
		controller: ".jFlowControl",
		slideWrapper : "#jFlowSlide",
		selectedWrapper: "jFlowSelected",
		easing: "swing",
		duration: 400,
		width: "554px",
		height: "348px",
		prev: ".jFlowPrev",
		next: ".jFlowNext"
	});
    
});
