jQuery(document).ready(function() {

		// Simon Search input text
	$('#search_input').focus(function() {
		if ($(this).val() == $(this)[0].title) {
			$(this).removeClass("suggested_text");
			$(this).val("");
		}
	});
	$('#search_input').blur(function() {
		if ($(this).val() === "") {
			$(this).val($(this)[0].title);
			$(this).addClass("suggested_text");
		}
	});
	$.each($('#search_input'), function() {
		$(this).blur();
	});
	// Add Title to Input field
	
	
	// Tabs code
	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
		
		
	// News Tabs code
	//When page loads...
	$(".tab_content_news").hide(); //Hide all content
	$("ul.tabs_news li:first").addClass("active").show(); //Activate first tab
	$(".tab_content_news:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs_news li").click(function() {

		$("ul.tabs_news li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content_news").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
		
		
	// Business Cycle Code
	//When page loads...
	$(".business_tab_content").hide(); //Hide all content
	$("ul.business_tabs li:first").addClass("active").show(); //Activate first tab
	$(".business_tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.business_tabs li").click(function() {
		
		$("ul.business_tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".business_tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
	
	
	
	
	// Cycle Homepage Slides 
		$('#slideshow_wrap') 
			.before('<div id="slide_numbers_wrap">') 
			.cycle({ 
			    fx:     'fade', 
			    speed:  1000, 
			    timeout: 5000, 
			    pager:  '#slide_numbers_wrap',
				pause:   1 
		});
		
	// Initialise PrettyPhoto
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme: 'pp_default' /* facebook */
	});
		
	
	
});

