/*
 * Typekit Replacements
 * 
 */


try{Typekit.load();}catch(e){}






window.addEvent('domready', function() {
	
	if (document.getElement("#focus-carousel #carousel-outer")) {
		var my_carousel = new Carousel($('carousel-outer'), {
			loop: true,
			elementTag: 'div.focus-tile',
			animType: 'scroll'
		});
		my_carousel.addControl(new CarouselControl('.focus-nav li a'));
	}
	
	if (document.getElement("#banner-carousel #banner-carousel-outer")) {
		var my_banner_carousel = new Carousel($('banner-carousel-outer'), {
			loop: true,
			elementTag: 'div.banner-tile',
			animType: 'fade'
		});
		//my_banner_carousel.addControl(new CarouselControl('#banner-nav li a'));
	}		
	
	
	//call multiBox
	var initMultiBox = new multiBox({
		mbClass: '.mb',//class you need to add links that you want to trigger multiBox with (remember and update CSS files)
		container: $(document.body),//where to inject multiBox
		descClassName: 'multiBoxDesc',//the class name of the description divs
		maxSize: {w:600, h:400},//max dimensions (width,height) - set to null to disable resizing
		addRollover: true,//add rollover fade to each multibox link
		recalcTop: true//subtract the height of controls panel from top position
		
	});
	
	// sub form
	var subform_container = document.getElement('#newsletter-box');
	if (subform_container) {
		var subform = new QuickForm(subform_container);
	}
	
});



