$(function(){
	$('#search-submit').click(function(){
            var searchtext = $('#search-field').val();
            window.open('http://www.google.hr/search?q=google+site+search&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#sclient=psy&hl=hr&client=firefox-a&hs=Xhq&rls=org.mozilla:en-US%3Aofficial&source=hp&q=site:fractal.hr+' + searchtext + '&aq=f&aqi=&aql=&oq=&pbx=1&fp=c2bf1e659df13712&biw=1680&bih=864', '', '');
            return false;
	});
                
        $('#search-field').keypress(function(e){
            if(e.which == 13) {
                e.preventDefault();
                var searchtext = $('#search-field').val();
                window.open('http://www.google.hr/search?q=google+site+search&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#sclient=psy&hl=hr&client=firefox-a&hs=Xhq&rls=org.mozilla:en-US%3Aofficial&source=hp&q=site:fractal.hr+' + searchtext + '&aq=f&aqi=&aql=&oq=&pbx=1&fp=c2bf1e659df13712&biw=1680&bih=864', '', '');
        }
    });

});
