$(document).ready(function() {
	
	var agent = navigator.userAgent;
	if ((agent.indexOf('iPhone') != -1) || (agent.indexOf('iPod') != -1) || (agent.indexOf('iPad') != -1) ) {
		//if the device is an iOS device
		//other multitouch phone and tablets need this as well, eventually.
		$("#browserstyle").attr("href", "files/css/main_iOS.css");
	}
	
	$('#jumplist').change(function(){
		window.location = "index.php?c=" + $('#jumplist').attr('value');
	});
	
	$('#longsearch').submit(function() {
  		if(document.getElementById("longsearch").q.value.replace(/^\s+|\s+$/g,"") == "" ) {
			alert('Please enter a search term');
			return false;
		}
		return true;
	});
	
	/*
	$("#paginatewrapper").swipe({
	     swipeLeft: function() { pageditems.next(); },
	     swipeRight: function() { pageditems.prev(); }
	});
	*/
});
