// JavaScript Document
$(function(){
	$('#photos').galleryView({
		transition_interval: 6000,
		theme_path: 'img/galleryview/',
		nav_theme: 'dark',
		panel_width: 600,
		panel_height: 400,
		frame_width: 75,
		frame_height: 75
	});
});

$(function(){
		   
	$(".tickerBottom").countdown({
		until: new Date(2012, 9-1, 27),
		layout: '<span>DAYS {dn}</span> <span>HOURS {hn}</span> <span>MINS {mn}</span> <span>SECS {sn}</span>',
		alwaysExpire: true,
		onExpiry: function(){
			$(this).text('THE DURHAM FAIR IS HERE!');	
		}
	});
	
});

$(document).ready(function(){
   if(Modernizr.mq('only all and (max-width: 500px)'))
       {
           $('body').addClass('hasalert');
           $('body').append('<div class="mobile_alert">Looks like you\'re using a mobile device. You might want to visit the <br> <a href="m"> Durham Fair Mobile website</a>.</div>');
       }
});
