function vacancies() {
	$(".locations").find("a").click(function(event){
		var type = $(this).html();
		
		$(".locations").find("a").removeClass("active");
		$(this).addClass("active");
		
		$('input[name="contact_city"]').val(type);
		
		if (type == "Ukraine") {
			$(".vacancy").show();
			$(".hr").show();
		}	
		else {
			$(".vacancy").each(function(index){
				var location = $(this).find(".light").html();
				if (location == type) {
					$(this).parent().prepend($(this));
				}
				if (location.indexOf(type) > -1) $(this).show(); else $(this).hide(); 
			});
			
			$(".hr").each(function(index){
				var location = $(this).find(".light").html();
				if (location.indexOf(type) > -1) $(this).show(); else $(this).hide(); 
			});
		}
		
		
	});
	
	if(window.location.hash) {
		var hash = window.location.hash;
		console.log(hash);
		$(".locations").find("a[href^='"+hash+"']").first().click();
	} else {		
		$(".locations").find("a").first().click();
	}
}


$("#full").live("click",function(event){
    event.preventDefault();
    $.cookie('no_mobile', 1, { path: '/'});
    location.href = $(this).attr("href");
});

$("#mobile").live("click",function(event){
    event.preventDefault();
    $.cookie('no_mobile', 0, { path: '/'});
    location.href = $(this).attr("href");
});
