/* /college/application.js */

$(function(){
	$('#countDownTimer, [id^=timer]').each(function(){
		var timer = new Date( ( $(this).text() * 1000) );
		$(this).countdown({'until': timer,'format': 'DHMS'});
		$(this).css("visibility","visible");
	});
	
	$('a[rel*=audio]').click(function(){
		var url = $(this).attr('href');
		$('#audioPlayer').flash({
		swf: _web+'/media/admin/player.swf',
		flashvars: {
		'file':		url,
		'controlbar':	'bottom',
		'stretching':	'uniform',
		'autostart':	true,
		'volume':	75,
		'backcolor': 'FFFFFF'
		},
		wmode: 'transparent',
		allowfullscreen: 'false',
		allowscriptaccess: 'always',
		height:	20,
		width: 300
		});
		return false;
	});
});

function ajaxFrame(url){
	$.get(url,function(data){
		$('#banner').remove();
		$(data).insertAfter('#menu');
		setTimeout('bind()',500);
	});
}

function bind(){
	$('#container a[rel*=dialog]').click(function(){
		$.dialog(this);
		return false;
	});
	$('#container a[rel*=modal]').click(function(){
		$.modal(this);
		return false;
	});
}