function includeJs(file) { 
        // Handle multiple include attempts 
        if($("script[src='" + file + "']").size() == 0) { 
                $('head').createAppend( 
                        'script', { 
                                type: 'text/javascript', 
                                src: file 
                        } 
                ); 
        } 
} 
//includeJs('/jquery.ga.js');
jQuery.fn.center = function () {
    this.css("position","absolute");
    //this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
    this.css("left", (( $(window).width() - this.width() ) / 2+$(window).scrollLeft())-325 + "px");
    return this;
}
$(document).ready(function(){
	
	$('#logo').prepend('<a class="logohome" href="/">&nbsp;&nbsp;</a>');
	$('#logo .content').append('<form method="get" action="/search/" enctype="application/x-www-form-urlencoded" class="searchform"><input maxlength="200" value="" size="32" type="text" name="query"><input value="Search!" type="submit" name="submit"></form>')
	$('.logohome').center();
	$.getScript('/jquery.ga.js',
			function(){
				$.ga.load('UA-361487-2');
			}
	);
	$('pre a').click(function(){
	        window.open(this.href);
	        return false;
	    });
		//$.ga.load('UA-361487-2');
	
});

function validateCaptcha()
{
    challengeField = $("input#recaptcha_challenge_field").val();
    responseField = $("input#recaptcha_response_field").val();
    //alert(challengeField);
    //alert(responseField);
    //return false;
    var html = $.ajax({
    type: "POST",
    url: "osl",
    data: "recaptcha_challenge_field=" + challengeField + "&amp;recaptcha_response_field=" + responseField,
    async: false
    }).responseText;
 
    if(html == "success")
    {
        $("#captchaStatus").html(" ");
        // Uncomment the following line in your application
        return true;
    }
    else
    {
        $("#captchaStatus").html("Your captcha is incorrect. Please try again");
        Recaptcha.reload();
        return false;
    }
}
