/**
 * @author Cernos(10.10.2008)
 * E-Mail: adm.styland@gmail.com
 * icq: 984-964
 * (http://www.humorland.org)
 */

var flag = false;
function resize(){
     $(".columns").width($(".head").width());
     
     $(".columns .right_column .content, .columns .right_column").width(
         $(".head").width() - $(".columns .left_column").width() -30
     );     
     
     if($(".columns .right_column .content").height()<$(".columns .left_column .content").height()){
         $(".columns").height($(".columns .left_column .content").height());
     }
     else{
         $(".columns").height($(".columns .right_column .content").height());
     }
     
   
     
     $("div.head_l2 div.right_column").width(
         $(".head").width() - $("div.head_l2 div.left_column").width() - 20
     );
     
     $("div.head_l2 div.right_column").width(
         $(".head").width() - $("div.head_l2 div.left_column").width() - 20
     );
     
     $(".top_menu").width(
         $(".head").width() - $("div.head_l2 div.left_column").width()+30
     );
     
     
     if($(".h1").height()>35 && flag == false){//alert($(".h1").css("top"));
         $(".h1").css({
             "top":parseInt($(".h1").css("top")) - $(".h1").height()/3
         }); 
         flag = true;   
     }
     
     $("input:button").css({"cursor":"pointer"});
     

     setTimeout("resize();",2000);
}

$(document).ready(function(){
    
    $(".img img").click(function(){
        $("td:first-child(1) img",$(this).parent("div").parent("td").parent("tr")).attr({
            'src': $(this).attr('src').replace("//public","/public").replace("car_photo/","car_photo/big_"),
            'width':'266'
        });        
        $("td:first-child(1) img",$(this).parent("div").parent("td").parent("tr")).removeAttr("height");
    });
    
    
});
