$(function($) {
	var gmt = new Date;
	
	var lsm = new Date;
	var lso = new Date;
	lsm.setMonth(2); // March
	lsm.setDate(31);
	var day = lsm.getDay();// day of week of 31st
	lsm.setDate(31-day); // last Sunday
	lso.setMonth(9); // October
	lso.setDate(31);
	day = lso.getDay();
	lso.setDate(31-day);
	if (gmt < lsm || gmt >= lso) {
		offsetFRA = +1;
	} else {
		offsetFRA = +2;
	}

	var optionsFRA = {
		utc: true,
		utc_offset: offsetFRA
	}
	$('#FRA').jclock(optionsFRA);
	
	lsm = new Date;
	lso = new Date;
	lsm.setMonth(2); // March
	lsm.setDate(1);
	day = lsm.getDay();// day of week of 1st
	lsm.setDate(1+((7-day)+7)); // 2nd Sunday
	lso.setMonth(10); // November
	lso.setDate(1);
	day = lso.getDay();
	lso.setDate(1+(7-day));
	if (gmt < lsm || gmt >= lso) {
		offsetNYC = -5;
	} else {
		offsetNYC = -4;
	}
	

	var optionsNYC = {
		utc: true,
		utc_offset: offsetNYC
	}
	$('#NYC').jclock(optionsNYC);
});

