var $j = jQuery.noConflict();

$j(function(){
    $j(".hoverj")
        .mouseover(function(){ 
            var src = $j(this).attr("src").match(/[^\.]+/) + "-hover.jpg";
            $j(this).attr("src", src);
        })
        .mouseout(function(){
            var src = $j(this).attr("src").replace("-hover", "");
            $j(this).attr("src", src);
        });
});

$j(function(){
    $j(".hoverp")
        .mouseover(function(){ 
            var src = $j(this).attr("src").match(/[^\.]+/) + "-hover.png";
            $j(this).attr("src", src);
        })
        .mouseout(function(){
            var src = $j(this).attr("src").replace("-hover", "");
            $j(this).attr("src", src);
        });
});

$j(function(){
	$j('#search').mouseover(function(){
		$j('#adv-search').css("display","block");
	});
});

$j(function(){
	$j('#search').mouseout(function(){
		$j('#adv-search').css("display","none");
	});
});

function addBookmark(title,url){
	if (navigator.appName && navigator.appName.indexOf("Netscape")>=0){ 
		window.sidebar.addPanel(title, url, ""); 
	} else if(document.all){
		window.external.AddFavorite(url, title);
	} else if(window.opera && window.print){
		return true;
	}
}

function setHomePage(url){
	if (document.all){
        document.body.style.behavior='url(#default#homepage)';
  		document.body.setHomePage(url);
    } else if (window.sidebar){
    	if(window.netscape){
        	try { 
            	netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
         	} 
        	catch(e){ 
    			alert("this action was aviod by your browser,if you want to enable,please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true"); 
         	}
    	}
    	var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    	prefs.setCharPref('browser.startup.homepage',url);
 	}
}

function datum_nev(){
	var ido = new Date()
	var ev = ido.getYear()
	var ho = ido.getMonth()+1
	var nap = ido.getDate()
	if (ev<1900) ev+=1900;
	document.writeln("&nbsp;" + ev + ". " + honev(ho) + " " + nap + ".&nbsp;"+ napnev(ido.getDay()+1)+"&nbsp;&nbsp;"+havinev(ev,ho,nap)+"&nbsp;")
}

function Pager(offset){
	document.list.v_select_offset.value = offset;
	document.list.submit();
}

function backToList(){
	document.product.submit();
}

$j(function(){
	$j("#toggle_langs").click(function(){
		$j("#more_langs").toggle();
	});
});	
