$(document).ready(function() {
            $(".dropdown img.flag").addClass("flagvisibility");

            $(".dropdown dt a").click(function() {
                $(".dropdown dd ul").toggle();
            });
                        
            $(".dropdown dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown dt a span").html(text);
                $(".dropdown dd ul").hide();
                $("#result").html("Selected value is: " + getSelectedValue("sample"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown"))
                    $(".dropdown dd ul").hide();
            });


            $("#flagSwitcher").click(function() {
                $(".dropdown img.flag").toggleClass("flagvisibility");
            });
        });
		
$(document).ready(function() {
            $(".dropdown1 img.flag").addClass("flagvisibility1");

            $(".dropdown1 dt a").click(function() {
                $(".dropdown1 dd ul").toggle();
            });
                        
            $(".dropdown1 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown1 dt a span").html(text);
                $(".dropdown1 dd ul").hide();
                $("#result1").html("Selected value is: " + getSelectedValue("sample1"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown1"))
                    $(".dropdown1 dd ul").hide();
            });


            $("#flagSwitcher1").click(function() {
                $(".dropdown1 img.flag").toggleClass("flagvisibility1");
            });
        });		
$(document).ready(function() {
            $(".dropdown2 img.flag").addClass("flagvisibility2");

            $(".dropdown2 dt a").click(function() {
                $(".dropdown2 dd ul").toggle();
            });
                        
            $(".dropdown2 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown2 dt a span").html(text);
                $(".dropdown2 dd ul").hide();
                $("#result2").html("Selected value is: " + getSelectedValue("sample2"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown2"))
                    $(".dropdown2 dd ul").hide();
            });


            $("#flagSwitcher2").click(function() {
                $(".dropdown2 img.flag").toggleClass("flagvisibility2");
            });
        });		
$(document).ready(function() {
            $(".dropdown3 img.flag").addClass("flagvisibility3");

            $(".dropdown3 dt a").click(function() {
                $(".dropdown3 dd ul").toggle();
            });
                        
            $(".dropdown3 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown3 dt a span").html(text);
                $(".dropdown3 dd ul").hide();
                $("#result3").html("Selected value is: " + getSelectedValue("sample3"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown3"))
                    $(".dropdown3 dd ul").hide();
            });


            $("#flagSwitcher3").click(function() {
                $(".dropdown3 img.flag").toggleClass("flagvisibility3");
            });
        });		
$(document).ready(function() {
            $(".dropdown4 img.flag").addClass("flagvisibility4");

            $(".dropdown4 dt a").click(function() {
                $(".dropdown4 dd ul").toggle();
            });
                        
            $(".dropdown4 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown4 dt a span").html(text);
                $(".dropdown4 dd ul").hide();
                $("#result4").html("Selected value is: " + getSelectedValue("sample4"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown4"))
                    $(".dropdown4 dd ul").hide();
            });


            $("#flagSwitcher4").click(function() {
                $(".dropdown4 img.flag").toggleClass("flagvisibility4");
            });
        });		
$(document).ready(function() {
            $(".dropdown5 img.flag").addClass("flagvisibility5");

            $(".dropdown5 dt a").click(function() {
                $(".dropdown5 dd ul").toggle();
            });
                        
            $(".dropdown5 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown5 dt a span").html(text);
                $(".dropdown5 dd ul").hide();
                $("#result5").html("Selected value is: " + getSelectedValue("sample5"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown5"))
                    $(".dropdown5 dd ul").hide();
            });


            $("#flagSwitcher5").click(function() {
                $(".dropdown5 img.flag").toggleClass("flagvisibility5");
            });
        });		
$(document).ready(function() {
            $(".dropdown6 img.flag").addClass("flagvisibility6");

            $(".dropdown6 dt a").click(function() {
                $(".dropdown6 dd ul").toggle();
            });
                        
            $(".dropdown6 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown6 dt a span").html(text);
                $(".dropdown6 dd ul").hide();
                $("#result6").html("Selected value is: " + getSelectedValue("sample6"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown6"))
                    $(".dropdown6 dd ul").hide();
            });


            $("#flagSwitcher6").click(function() {
                $(".dropdown6 img.flag").toggleClass("flagvisibility6");
            });
        });		
$(document).ready(function() {
            $(".dropdown7 img.flag").addClass("flagvisibility7");

            $(".dropdown7 dt a").click(function() {
                $(".dropdown7 dd ul").toggle();
            });
                        
            $(".dropdown7 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown7 dt a span").html(text);
                $(".dropdown7 dd ul").hide();
                $("#result7").html("Selected value is: " + getSelectedValue("sample7"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown7"))
                    $(".dropdown7 dd ul").hide();
            });


            $("#flagSwitcher7").click(function() {
                $(".dropdown7 img.flag").toggleClass("flagvisibility7");
            });
        });		
$(document).ready(function() {
            $(".dropdown8 img.flag").addClass("flagvisibility8");

            $(".dropdown8 dt a").click(function() {
                $(".dropdown8 dd ul").toggle();
            });
                        
            $(".dropdown8 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown8 dt a span").html(text);
                $(".dropdown8 dd ul").hide();
                $("#result8").html("Selected value is: " + getSelectedValue("sample8"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown8"))
                    $(".dropdown8 dd ul").hide();
            });


            $("#flagSwitcher8").click(function() {
                $(".dropdown8 img.flag").toggleClass("flagvisibility8");
            });
        });		
$(document).ready(function() {
            $(".dropdown9 img.flag").addClass("flagvisibility9");

            $(".dropdown9 dt a").click(function() {
                $(".dropdown9 dd ul").toggle();
            });
                        
            $(".dropdown9 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown9 dt a span").html(text);
                $(".dropdown9 dd ul").hide();
                $("#result9").html("Selected value is: " + getSelectedValue("sample9"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown9"))
                    $(".dropdown9 dd ul").hide();
            });


            $("#flagSwitcher9").click(function() {
                $(".dropdown9 img.flag").toggleClass("flagvisibility9");
            });
        });		
$(document).ready(function() {
            $(".dropdown10 img.flag").addClass("flagvisibility10");

            $(".dropdown10 dt a").click(function() {
                $(".dropdown10 dd ul").toggle();
            });
                        
            $(".dropdown10 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown10 dt a span").html(text);
                $(".dropdown10 dd ul").hide();
                $("#result10").html("Selected value is: " + getSelectedValue("sample10"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown10"))
                    $(".dropdown10 dd ul").hide();
            });


            $("#flagSwitcher10").click(function() {
                $(".dropdown10 img.flag").toggleClass("flagvisibility10");
            });
        });
		
$(document).ready(function() {
            $(".dropdown11 img.flag").addClass("flagvisibility11");

            $(".dropdown11 dt a").click(function() {
                $(".dropdown11 dd ul").toggle();
            });
                        
            $(".dropdown11 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown11 dt a span").html(text);
                $(".dropdown11 dd ul").hide();
                $("#result11").html("Selected value is: " + getSelectedValue("sample11"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown11"))
                    $(".dropdown11 dd ul").hide();
            });


            $("#flagSwitcher11").click(function() {
                $(".dropdown11 img.flag").toggleClass("flagvisibility11");
            });
        });	
		
$(document).ready(function() {
            $(".dropdown12 img.flag").addClass("flagvisibility12");

            $(".dropdown12 dt a").click(function() {
                $(".dropdown12 dd ul").toggle();
            });
                        
            $(".dropdown12 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown12 dt a span").html(text);
                $(".dropdown12 dd ul").hide();
                $("#result12").html("Selected value is: " + getSelectedValue("sample12"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown12"))
                    $(".dropdown12 dd ul").hide();
            });


            $("#flagSwitcher12").click(function() {
                $(".dropdown12 img.flag").toggleClass("flagvisibility12");
            });
        });	
		
$(document).ready(function() {
            $(".dropdown13 img.flag").addClass("flagvisibility13");

            $(".dropdown13 dt a").click(function() {
                $(".dropdown13 dd ul").toggle();
            });
                        
            $(".dropdown13 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown13 dt a span").html(text);
                $(".dropdown13 dd ul").hide();
                $("#result13").html("Selected value is: " + getSelectedValue("sample13"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown13"))
                    $(".dropdown13 dd ul").hide();
            });


            $("#flagSwitcher13").click(function() {
                $(".dropdown13 img.flag").toggleClass("flagvisibility13");
            });
        });	
		
$(document).ready(function() {
            $(".dropdown14 img.flag").addClass("flagvisibility14");

            $(".dropdown14 dt a").click(function() {
                $(".dropdown14 dd ul").toggle();
            });
                        
            $(".dropdown14 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown14 dt a span").html(text);
                $(".dropdown14 dd ul").hide();
                $("#result14").html("Selected value is: " + getSelectedValue("sample14"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown14"))
                    $(".dropdown14 dd ul").hide();
            });


            $("#flagSwitcher14").click(function() {
                $(".dropdown14 img.flag").toggleClass("flagvisibility14");
            });
        });

$(document).ready(function() {
            $(".dropdown15 img.flag").addClass("flagvisibility15");

            $(".dropdown15 dt a").click(function() {
                $(".dropdown15 dd ul").toggle();
            });
                        
            $(".dropdown15 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown15 dt a span").html(text);
                $(".dropdown15 dd ul").hide();
                $("#result15").html("Selected value is: " + getSelectedValue("sample15"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown15"))
                    $(".dropdown15 dd ul").hide();
            });


            $("#flagSwitcher15").click(function() {
                $(".dropdown15 img.flag").toggleClass("flagvisibility15");
            });
        });
		
$(document).ready(function() {
            $(".dropdown16 img.flag").addClass("flagvisibility16");

            $(".dropdown16 dt a").click(function() {
                $(".dropdown16 dd ul").toggle();
            });
                        
            $(".dropdown16 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown16 dt a span").html(text);
                $(".dropdown16 dd ul").hide();
                $("#result16").html("Selected value is: " + getSelectedValue("sample16"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown16"))
                    $(".dropdown16 dd ul").hide();
            });


            $("#flagSwitcher16").click(function() {
                $(".dropdown16 img.flag").toggleClass("flagvisibility16");
            });
        });
		
$(document).ready(function() {
            $(".dropdown17 img.flag").addClass("flagvisibility17");

            $(".dropdown17 dt a").click(function() {
                $(".dropdown17 dd ul").toggle();
            });
                        
            $(".dropdown17 dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown17 dt a span").html(text);
                $(".dropdown17 dd ul").hide();
                $("#result17").html("Selected value is: " + getSelectedValue("sample17"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown17"))
                    $(".dropdown17 dd ul").hide();
            });


            $("#flagSwitcher17").click(function() {
                $(".dropdown17 img.flag").toggleClass("flagvisibility17");
            });
        });
		
$(document).ready(function() {
            $(".dropdown18 img.flag").addClass("flagvisibility18");

            $(".dropdown18 dt a").click(function() {
            
                $(".dropdown18 dd ul").toggle();
            });
                        
            $(".dropdown18 dd ul li a").click(function() {
           
                var text = $(this).html();
                $(".dropdown18 dt a span").html(text);
                $(".dropdown18 dd ul").hide();
                $("#result18").html("Selected value is: " + getSelectedValue("sample18"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown18"))
                    $(".dropdown18 dd ul").hide();
            });


            $("#flagSwitcher18").click(function() {
                $(".dropdown18 img.flag").toggleClass("flagvisibility18");
            });
        });
        
 $(document).ready(function() {
            $(".dropdown19 img.flag").addClass("flagvisibility19");

            $(".dropdown19 dt a").click(function() {
            
                $(".dropdown19 dd ul").toggle();
            });
                        
            $(".dropdown19 dd ul li a").click(function() {
           
                var text = $(this).html();
                $(".dropdown19 dt a span").html(text);
                $(".dropdown19 dd ul").hide();
                $("#result19").html("Selected value is: " + getSelectedValue("sample19"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown19"))
                    $(".dropdown19 dd ul").hide();
            });


            $("#flagSwitcher19").click(function() {
                $(".dropdown19 img.flag").toggleClass("flagvisibility19");
            });
        });
