// önceki açılır dil menüsü kullanılabilir

//$(function(){
//
//	// scroll the page to display the international section AND control "plus" and "minus" sign.
//	$('#util-international').toggle(function() {
//		$("#util-regions").remove().prependTo("#placeholder-regions").slideToggle('swing');
//		$("#expandSign");
//	}, function() {
//		$("#util-regions").slideToggle('swing');
//		$("#expandSign");
//	});
//});


  $(document).ready(function() {
            $(".lang-dropdown img.flag").addClass("flagvisibility");

            $(".lang-dropdown dt a").click(function() {
                $(".lang-dropdown dd ul").toggle();
            });
                        
            $(".lang-dropdown dd ul li a").click(function() {
                var text = $(this).html();
                $(".lang-dropdown dt a span").html(text);
                $(".lang-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("lang-dropdown"))
                    $(".lang-dropdown dd ul").hide();
            });


            $("#flagSwitcher").click(function() {
                $(".lang-dropdown img.flag").toggleClass("flagvisibility");
            });
        });
