$(function () {
	
	// top search function
	// Replacing style when input field is active or not
	$(document).ready(function()
	{
	    $(".default_text").focus(function(srcc)
	    {
	        if ($(this).val() == $(this)[0].title)
	        {
	            $(this).removeClass("default_text");
	            $(this).addClass("default_text_active");
	            $(this).val("");
	        }
	    });

	    $(".default_text").blur(function()
	    {
	        if ($(this).val() == "")
	        {
	        	$(this).removeClass("default_text_active");
	            $(this).val($(this)[0].title);
	        }
	    });

	    $(".default_text").blur();
	});
	
	
	
	// add CSS style when mouse is hover .recent_entry on INDEX page
	$('.recent_entry').hover(
		function() { $(this).addClass('hover'); },
		function() { $(this).removeClass('hover'); }
	);

	
	
	// Form select styling
	$(".big_select").select_skin();
	
	
	
	// tabs on Homepage: Jobs, Internships...
    /*
	$(document).ready(function() {

		//When page loads...
		$(".tab").hide(); //Hide all content
		$("ul.recent_added li:first").addClass("active").show(); //Activate first tab
		$(".tab:first").show(); //Show first tab content

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

			$("ul.recent_added li").removeClass("active"); //Remove any "active" class
			$(this).addClass("active"); //Add "active" class to selected tab
			$(".tab").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;
		});

	});
    */

    
    /*
     * Homepage
     * Setup the same height for tab boxes
     */
    $(document).ready(function() {
        var lh;
        var rh;
        lh = $("#careers").height();
        rh = $("#employers").height();
        if(lh > rh) {
            $("#employers").css({'min-height': lh});
        } else {
            $("#careers").css({'min-height': rh});
        }
    });
		
});
