function PerformSearch() {
    var qry = "?UID=JobSearch";
    qry += "&lang=en";
    qry += "&portal=12260454601";
    qry += "&jobfield=";
    qry += $("#JobFunction").val();
    qry += "&jobNumberSearch=";
    if ($("#JobKeyword").length > 0) {
        qry += "&keyword=";
        qry += $("#JobKeyword").val();
    }
    //?lang=en&jobfield=6260135022&jobNumberSearch=&keyword=Manager
    window.location.href = "/CurrentJobs/Pages/JobSearch.aspx" + qry;
}

$(document).ready(function() {
    $('.main-nav ul li').hover(function() {
        $(this).addClass('hover');
    }, function() {
        $(this).removeClass('hover');
    });
	
	/* IE job search overflow issue fix - http://jsbin.com/acado/6 */
	if ($.browser.msie) {
		$('#jobsearch select')
		.bind('focus mouseover', function() { $(this).addClass('expand').removeClass('clicked'); })
		.bind('click', function() { $(this).toggleClass('clicked'); })
		.bind('mouseout', function() { if (!$(this).hasClass('clicked')) { $(this).removeClass('expand'); }})
		.bind('blur', function() { $(this).removeClass('expand clicked'); });
	}
	
	/* Removal of empty span if no image is present to hide gap */
    $('#content #right_region #image #ctl00_PlaceHolderMain_ImageField__ControlWrapper_RichImageField span').each(function(i, n) {
        if ($(n).html() == '') {
            $('#content #right_region #image').hide();
        }
        else {
            $('#content #right_region #image').show();
        }
    });
});
