// JavaScript jQuery for NEOS index

$(document).ready(function() {
						if ( $.browser.msie ) {
							$("#indexCentre").css('width','820px');
						} 
						   
						var randNos = (Math.floor(Math.random()*12) + 1);
						var myRandIm = "images/indexBGs/neos_index_" + randNos +  ".jpg";
						var dave = '<a href="http://davidofficerphotography.co.uk/">David Officer</a>';
						var gaia = '<a href="http://gaiaphotography.co.uk//">Gaia Photography</a>';
						if(randNos<=7){
							var photographer = dave;
						}else{
							var photographer = gaia;
						}
						
						$('body').append('<img src="' + myRandIm + '" id="bg"/><p class="credit">image by ' + photographer + ' ©2011</p><a href="http://www.creativeculturescotland.co.uk//bestof2010.asp#best2010gold"><div id="CCSAwards"></div></a>'); 
						if(randNos==6 || randNos==4){$('.credit, .credit a').css('color', '#333')}else{$('.credit, .credit a').css('color', '#FFF')};
						
						$('#bg').css('z-index','-1');
						$("a:not(#clickToEnter)").hover(
						  function () {
							$(this).animate({
								'bottom': '3px'
							  }, 200, function() {
								// Animation complete.
							  });
						  },
						  function () {
							$(this).css('bottom','0');
						  }
						);					
});

function checkQuickSearch(){
		instr = document.getElementById("quicksearchtext").value;
		if ((instr =="") || (instr ==" ") || (instr.indexOf("drop")>=0)){
		alert('Please enter a valid search term');
		return false;
			

		}

	}
	
