// JavaScript Document

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("h3.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("fast");
		return false; //Prevent the browser jump to the link anchor
	});


	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("h3.trigger2").click(function(){
		$(this).toggleClass("active").next().slideToggle("fast");
		return false; //Prevent the browser jump to the link anchor
	});


	// Cufon

	Cufon.replace('h1, #right_col_internal h3, #right_col h3, #left_col h3, #middle_col h3, #footer h3, h4, .agenda article time, #content #lead_gen h3, #content #lead_gen p', { fontFamily: 'HelveticaNeueBoldCondensed' }); // Works without a selector engine
	Cufon.replace('#key_buttons li a', {textShadow: '#fddc97 1px 1px' }); // Works without a selector engine
	Cufon.replace('#key_buttons li a.reg_btn', {textShadow: '#111 1px 1px' }); // Works without a selector engine

	// Anything slider

	$('#speakers_slider').anythingSlider({
		autoPlay : false,
		buildNavigation : true,
		theme : 'speakers'
	});
	$('#homeslide').anythingSlider({
		autoPlay : true,
		buildArrows : false,
		buildNavigation : true,
		theme : 'home',
		delay : 8000
	});
	$('#sponsorslide').anythingSlider({
		autoPlay : true,
		buildArrows : false,
		buildNavigation : false,
		theme : 'sponsors',
		delay : 4000
	});
	$('#lead_gen_int').anythingSlider({
		autoPlay : true,
		buildArrows : false,
		buildNavigation : false,
		theme : 'leadgen',
		delay : 4000
	});

	jQuery('ul.sf-menu').superfish();

});

    $(function(){
      $(".tweet").tweet({
        join_text: "auto",
        username: "clarionvehicle",
        avatar_size: 0,
        count: 2,
		 join_text:  null, 
        loading_text: "loading tweets..."
      });
    });


	//Hide (Collapse) the toggle containers on load



