
	jQuery(function() {
	
	     //	prettyPopin
		jQuery("a[rel^='prettyPopin']").prettyPopin();

		
		//	dropdowns in IE6
		jQuery('#zones > ul > li > ul:visible').hide();
		
		jQuery('#zones > ul > li.dropdown').hover(function() {
			jQuery(this).children().show();
		}, function() {
			jQuery('#zones > ul > li > ul:visible').hide();
		});
	
	
		// Accordion
		jQuery("dl.accordion dd").addClass("hide");
		jQuery("dl.accordion dd:not(:first)").hide();
	
		jQuery('dl.accordion > dt').click(function() {
			jQuery(this).removeClass('active');
			jQuery(this).next('dd').fadeIn(500).siblings("dd:visible").fadeOut(300).removeclass('active');
			
			jQuery(this).addClass("active");
			jQuery(this).next('dd').addClass("active");
			jQuery(this).siblings("dt").removeClass("active");
		});
	
	
		jQuery('input, textarea').focus(function() {
			jQuery(this).addClass('active');					   
		});
					
		jQuery('input, textarea').blur(function() {
			jQuery(this).removeClass('active');					   
		});
	
	
		// open links with a 'http://' in new window
		var allowedDomains = [location.hostname, "radio-canada.ca"]; //, "archives.cbc.ca"
		jQuery(function() {
			jQuery("a[@href^=http]:not(.internal)")
			.filter(function(el){
			for ( var i=0; i < allowedDomains.length; i++ )
				if (this.href.indexOf(allowedDomains[i])>-1 ) return false;
					return true;
			})
			.bind("click", function(){ return !window.open(this.href); });
		});	

	});

