var d = new Date();
var monthname = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();

function displayTime() {
    var d = new Date();
    var h = d.getHours();
    var m = d.getMinutes();
    var s = d.getSeconds();
    if (m < 10) {
        m = "0" + m
    };
    if (s < 10) {
        s = "0" + s
    };
    var a = new Array("Jan", "Feb", "Mar", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec");
    var b = d.getDate() + " " + a[d.getMonth()] + " " + d.getFullYear() + " " + h + ":" + m + ":" + s;
    $('#TIME_DISPLAY').html(b);
    startTime()
}
function startTime() {
    setTimeout("displayTime();", 1000)
}
function loadF(a) {
    trackLink(a);
    $('#link').load(a)
}
function getrequest() {
    var a = window.location.search;
    if (a.substring(0, 1) == '?') {
        a = a.substring(1)
    }
    if (a.length != 0) {
        loadF(a + '.html')
    }
}
window.onload = function () {
    getrequest();
    startTime()
};

function trackLink(a) {
    _gaq.push(['_trackEvent', a, 'Clicked'])
};
$(document).ready(function () {
    $("#sidebar2 a").click(function () {
        trackLink(unescape(this.href));
    })
	if(!!document.createElement('audio').canPlayType){
	$a=$("a[href$='mp3']");
	for(var i=0;i<$a.length;i++){
		$a[i].audio=$a[i].href;
		$a[i].href="#";
	}
	$a.click(function(e){
		e.preventDefault();
		$("#audio").attr("src",e.target.audio);
	});}
});
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2728195-2']);
_gaq.push(['_trackPageview']);
(function () {
    var ga = document.createElement('script');
    ga.type = 'text/javascript';
    ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s)
})();
