window.addEvent('domready', function() {
	educator_prep.start();
});

var educator_prep = {

	start: function(){
		educator_prep.newwin();
		if($('flashmap')) educator_prep.instmap();
		if($('stickyWin')) educator_prep.stickyWin();
	},
	
	newwin: function() {

		$$('a.new-win').each(function(link){

			link.target = "_blank";

		});

	},


	stickyWin: function(){	
		
		$('flash-wrap').setStyles({
			   display: 'none'
		});
				
		$("stickyWin").addEvent("click", function(e){
			var e = new Event(e);
			e.stop();
			new StickyWin.Modal({
	  			content: $('flash-wrap').get('html'),
				className: $('flashy'),
	  			relativeTo: $('grid_6'),
	  			width: 625,
	 			height: 680, 			    
	  			modalOptions: {
	    			modalStyle:{
	      				 /* 'background-color':'#ffffff', */
	      				 'opacity':.6
	    			}
	  			}
			})
		});
	},

	instmap: function(){
	
		var obj = new Swiff('/educator_prep/images/map.swf', {
			id: 'instMap',
			width: 625,
			height: 680,
			container: 'flashmap',
			params: {
			bgcolor: '#ffffff'
			}
		});
	}
	
}