function changeclass(divid){



if((document.all)&&(navigator.appVersion.indexOf('MSIE 7.')!=-1))
{
var classattrib="className"
}
else
{
var classattrib="class"
}

document.getElementById("desc").setAttribute(classattrib, "producttab");
document.getElementById("specs").setAttribute(classattrib, "producttab");
document.getElementById("accs").setAttribute(classattrib, "producttab");
document.getElementById("revs").setAttribute(classattrib, "producttab");
document.getElementById("rels").setAttribute(classattrib, "producttab");

document.getElementById(divid).setAttribute(classattrib, "producttabon");

document.getElementById("proddesc").style.display = "none";
document.getElementById("prodspecs").style.display = "none";
document.getElementById("prodaccs").style.display = "none";
document.getElementById("prodrevs").style.display = "none";
document.getElementById("prodrels").style.display = "none";

document.getElementById("prod"+divid).style.display = "inline";
}



(function($) {

//$.noConflict();
  
        function mainmenu(){
            $(" .dynamic_menu div ").hover(function(){
            $(this).find('div:first:hidden').show();
            },function(){
                $(this).find('div:first').css({display: "none"});
            });
                        
        }

        function hidePopups(actpopup){
            $('.popup').each(function() { 
                if ($(this).attr('id') != actpopup){
                    $(this).hide(); 
                }
           
            });
        }        

$(document).ready(function() {
//Currency switcher
        
		$("#currency_switcher").click(function(){
            hidePopups("currPopup");
            $("#currPopup").toggle();
            return false;
        });

//Language switcher        

        $("#language_switcher").click(function(){
            hidePopups("langPopup");
            $("#langPopup").toggle();
            return false;
        });
        

        
		$(".cart-icon").click(function(){
            if ($(".cart-dropdown-wrapper").is(':hidden'))
                $(".cart-dropdown-wrapper").show();
            else{
                $(".cart-dropdown-wrapper").hide();
            }
            return false;
        });


		$('.cart-dropdown-wrapper').click(function(e) {
            e.stopPropagation();
        });
        $(document).click(function() {
            $('.cart-dropdown-wrapper').hide();
        }); 

    
        mainmenu();
        


        
        $('.popup').click(function(e) {
            e.stopPropagation();
        });
        $(document).click(function() {
            $('.popup').hide();
        }); 
        $(".close-pic").click(function(){
            $('.popup').hide();
        }); 

        
});

})(jQuery);
