$(document).ready(function(){
	
	//все загругления
	$(".box_green").corner("6px");
	$(".box_red").corner("6px");
	$(".box_pink").corner("6px");
	$(".box_violet").corner("6px");
	$(".box_black").corner("6px");
	$(".box_orange").corner("6px");
	$(".box_soft_gray").corner("6px");
	$(".box_blue").corner("6px");
	
	$(".box_green_bottom").corner("top 6px");
	//
	
 });
 
function getBrowserInfo() {
 var t,v = undefined;
 if (window.opera) t = 'Opera';
 else if (document.all) {
  t = 'IE';
  var nv = navigator.appVersion;
  var s = nv.indexOf('MSIE')+5;
  v = nv.substring(s,s+1);
 }
 else if (navigator.appName) t = 'Netscape';
 return {type:t,version:v};
}
 
function bookmark(a){
 var title = 'PINPIC.RU: Бесплатный хостинг фотографий';
 var url   = 'http://pinpic.ru';
 var b = getBrowserInfo();
 if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title);
 else if (b.type == 'Opera') {
  a.href = url;
  a.rel = "sidebar";
  a.title = title;
  return true;
 }
 else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
 else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");
 return false;
}

/*
 * графический прелоадер
 */
 
 function put_preloader(in_what){
	$("#"+in_what).html("<img src='images/system/preload_bar.gif' width='50' height='10' title='Ожидайте ответа...' alt='Ожидайте ответа...'>");	
 }
 
 function put_small_preloader(in_what){
	$("#"+in_what).html("<img src='images/system/loading_small.gif' width='16' height='16' title='Ожидайте ответа...' alt='Ожидайте ответа...' class='small_preloader'>");	
 }
 
 function delete_image(id){

	put_small_preloader("moderate_"+id);
	
	$.get('ajax/ajax_user.x',{
		act:"delete_image",
		id:id
		}, function(data){
			data = eval(data);
			if(data['answer']==2){
				$("#td_"+id).html("&nbsp;").attr("class","deleted_image");
			}
			$("#moderate_"+id).html(data['text']);
	});
	
}