function maketabs(navigation, content, start){
  			navigation.click(function () {
				//console.log();
				content.hide().filter(this.hash.replace("#",".")).show();
        
        		navigation.parent().removeClass('active');
        		$(this).parent().addClass('active');
        		
       			return false;
			}).filter(':eq('+(start-1)+')').click();
  		}
  		
 (function($){
	$.fn.clearDefault = function(){
		return this.each(function(){
			var default_value = $(this).val();
			$(this).focus(function(){
				if ($(this).val() == default_value) $(this).val("").css({"color":"black", "font-style":"normal"});
			});
			$(this).blur(function(){
				if ($(this).val() == "") $(this).val(default_value).css({"color":"#999", "font-style":"italic"});
			});
		});
	};
})(jQuery);

 $(document).ready(function() {
           // code for the dropdown menu
        	 $(".dropdown img.flag").addClass("flagvisibility");

            $(".dropdown dt a").click(function() {
                $(".dropdown dd ul").toggle();
                return false;
            });
                        
            $(".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");
            });
             // end dropdown menu
             
             // code for the footer form
             //$('.formContainer input.name').clearDefault();
             //$('.formContainer input.email').clearDefault();
             
             //conde for the full details link
            
            $('a.fullContactDetails, span.contactDetailsHolder a.close').click(function(){
            	$('a.fullContactDetails').toggleClass('activated');
            	$('span.contactDetailsHolder').toggle();
            	return false;
            });

        });
