function fcountrywidged(valuedOpt,checkedOpt){valuedOpt=valuedOpt.replace("-","_");$("select#m option").remove();if(valuedOpt!="www"){$("select#m").show();$.each(eval(valuedOpt),function(a,b){if(a=="allcounties"||a=="allcities"){var c='<option value="'+b.value+'" class="grey">'+b.text+"</option>"}else{if(checkedOpt==b.value){var c='<option value="'+b.value+'"    class="selected" selected="selected">'+b.text+"</option>"}else{var c='<option value="'+b.value+'">'+b.text+"</option>"}}$(c).appendTo("select#m")})}else{$("select#m").hide()}}function showMiddle(a,b){b="middle"+b;$("body").append('<div id="'+b+'" class="popmiddle"><div class="corner"></div><img src="'+$(a).attr("src").replace("thumbnail","middle")+'" alt=""/></div>');$("#"+b+" img").load(function(){$("#"+b).fadeIn(20).css({top:$(a).offset().top-25+"px",left:$(a).offset().left+72+"px"});var c=$("#"+b).offset().top+$("#"+b).height()-$(window).scrollTop()-$(window).height();if(c>0){if(c>235){$("#"+b+" div.corner").css("top",25+c+"px")}else{$("#"+b+" div.corner").css("top",65+c+"px")}$("#"+b).css("top",parseInt($("#"+b).css("top"))-20-c+"px")}var d=$("#"+b).offset().top-$(window).scrollTop();if(d<0){if(d>-32){$("#"+b+" div.corner").css("top",40+d+"px")}else{$("#"+b+" div.corner").css("top","0px")}$("#"+b).css("top",+1*(parseInt($("#"+b).css("top"))-d)+"px")}});$(a).mouseout(function(){$("#"+b).remove()})}function confirmSubmitAction(a,b){if($("#select option:selected").val()=="delete"){var c=confirm(a);if(c)return true;else return false}else if($("#select option:selected").val()==0){alert(b);return false}}function setVerifyAge(a){document.cookie="verifyAge=1 ; path=/; domain="+a+";";$("#overlay").remove();$("#verify-box").remove()}$(document.getElementById("keybox")).ready(function(){if($("#keybox").length){$("#tokeybox").append($("#keybox").html());$("#tokeybox").addClass("keybox");$("#keybox").remove()}});$(document).ready(function(){$("#show-debug").click(function(){$("#debug").toggle()});$(".hash").click(function(){if($(this).hasClass("external")){window.open(location.hostname+"?hash="+$(this).attr("id"))}else{document.location.href="?hash="+$(this).attr("id")}});$(".hash").hover(function(){$(this).addClass("over")},function(){$(this).removeClass("over")});$("#readmore").click(function(){$(this).css("display","none");$("#more").slideDown(300)});if(typeof verifyAge!="undefined"){$("#overlay").css({opacity:.9,width:"100%",height:$(document).height()+"px"})}$("#checkAll").click(function(){$("input.checkbox").attr("checked",$("#checkAll").is(":checked"))});$("#search-input").keyup(function(){if($(this).val()!=""){$("#searchclose").show()}else{$("#searchclose").hide()}});$("#searchclose").click(function(){$("#searchclose").hide();$("#search-input").val("");$("#search-input").focus()})})
