function cancelBubbling (e) {    e = e || event;    e.cancelBubble = true;    if (e.stopPropagation) {        e.stopPropagation();    }}function gototag(tag){    document.location = '/items/search/tags/1/' + tag;}function load_dialog(url, link){    setTimeout(function() { $("#user_actions_dialog").dialog({modal: true, position: "center", title: link, width: 314}) }, 700);}function show_dialog(url, id){	$(id).click(function() {		var link = $(this).attr("title");        $("#user_actions_dialog").load(url,         load_dialog(url, link)        );		 return false; 				});}$(document).ready(function(){    show_dialog("/accounts/login", "#menu_log_in");    show_dialog("/accounts/register", "#menu_new_user");    show_dialog("/contact", "#menu_contact_form");    	$('#inner_psa').cycle({fx: 'fade', timeout:  8000, random: 1}); 		$('#popular_cont').cycle({fx: 'scrollDown', delay:  -2500, easing: 'bounceout'}); 			$('#header').ajaxSend(function() {	  $('#global_progress_div').height($(document).height());	  $('#global_progress_div').show();	});	$('#header').ajaxComplete(function() {	  setTimeout(function() { $('#global_progress_div').hide() }, 700);	});	    // find div    $('#finddiv').html('');    // adv adding        $('#ad_outer').html('<div class="more_link"><a href="http://depositfiles.com/signup.php?ref=netadm1n">Заработок на файлообменниках!</a></div><div class="white_text">Получай деньги за скачивания своих файлов, начни зарабатывать уже сейчас!</div><br /><div class="more_link"><a href="http://knigochey.net">Библиотека Книгочея</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div><div class="white_text">Электронные книги, статьи</div>');    // truncate links    $.each($(".left_menu_links a"),     function(ind, val) { if(val.text.length>31) val.innerHTML = val.text.substring(0, 28)+"..." }    )});
