function get_news(t,n)
{
if($("#news_text_"+n).html())
{
$("#news_text_"+n).slideUp(300,function(){$("#news_text_"+n).html('');});

}else{
var text=$("#text"+n).html();
$("#news_text_"+n).append(text);
$("#news_text_"+n).slideDown(300,function(){
                                            $("#news_text_"+n).css('display',''); 
                                            });


}
};


function move_picture(n,id,mode)
{
$(document).ready(function(){
						   
						   
var coords=$("#pic_"+n).offset();
var h=$("#pic_"+n).height();
var w=$("#pic_"+n).width();


						
$("#body").append("<div id='v_k_pd"+n+"'  style='position:absolute;display:none' ></div>");
$("#v_k_pd"+n).css('left',coords.left);
$("#v_k_pd"+n).css('top',coords.top);
$("#v_k_pd"+n).css('background-color','#575757');
$("#v_k_pd"+n).css('border','1px solid #CCCCCC');
$("#v_k_pd"+n).fadeTo("slow", 0.7);
$("#body").append("<div id='v_k_"+n+"' ondblclick=\"close_pic('"+n+"')\" style='position:absolute;' ></div>");

$("#v_k_"+n).css('left',coords.left);
$("#v_k_"+n).css('top',coords.top);

$("#v_k_pd"+n).animate({
                        width:"300px",
					    height:"300px",
					    top:coords.top-100	
								 		  },500,function(){
						                                      $("#v_k_"+n).animate({
                   	                                                                width:"410px",
					                                                                top:coords.top-100	
                                                                                     },500,function(){
						            
$("#v_k_pd"+n).html('<img src="http://www.redlineclub.com.ua/pictures/loader.gif" width="48" height="48" align="center" style="margin-top:150px;margin-left:120px" />');

								                    $.ajax({
											        type: "POST",
  											        url: "/index.php/get/get_photos/"+id,
											        data:{n:n},
  											        error:function ajaxer(textStatus)
													{
														move_picture(n,id);
													},
											        success:function (data)
													{
                                                    $("#v_k_"+n).ready(function(){
													$("#v_k_"+n).css('display','none');
													$("#v_k_"+n).html('<div style="font-family: Arial;font-size: 12px; color: white; font-weight:bold; cursor:pointer; 	padding-bottom: 5px;	padding-top: 2px; padding-right: 2px;" align="right" onclick="close_pic(\''+n+'\')">X</div>'+data);	  
													$("#v_k_pd"+n).html('');
                                                    $("#v_k_pd"+n).animate({
                   	 								height:$("#v_k_"+n).height()+'px',
													width:$("#v_k_"+n).width()+'px'
													},500,function(){
																	$("#v_k_"+n).fadeIn('slow');
																	if($("#f_mode").html()==1)
                                                                    {
                                                                    sideInit();
                                                                    };
                                                                    
                                                                    				
																	 });

													                     });
													}
                                          });
									
									
									        });

						 
						                  });


					     });


		 	

};

function close_pic(n)
{


$("#v_k_"+n).fadeOut('slow');
$("#v_k_pd"+n).fadeOut('slow',function(){
                                       $("#v_k_"+n).remove();
                                        $("#v_k_pd"+n).remove();
                                       });

};



function show_big(mode,pic,n)
{
$("#big_picture"+n).fadeOut(function(){
 $("#big_picture"+n).css('display','none');   
$("#big_picture"+n).html('<img src="http://www.redlineclub.com.ua/pictures/loader.gif" width="48" height="48" align="center" style="margin-top:150px;margin-left:180px" />');
$("#big_picture"+n).ready(function(){
						     $("#big_picture"+n).css('display','none');
						     $("#big_picture"+n).html('<img src="http://www.redlineclub.com.ua/upload/'+mode+'/'+pic+'">');
							 $("#big_picture"+n).fadeIn();
							 
						   
						   
						   });	
	
	
										 });
};

/*
$("#v_k_"+n).fadeOut('slow');
$("#v_k_pd"+n).fadeOut('slow',function(){
									   $("#v_k_"+n).remove();
									   $("#v_k_pd"+n).remove();
									   });

*/









