






//if (document.location.hash !='')
	//var id = document.location.hash.replace('#','')

$(document).ready(function() {		//alert(document.location.hash.replace('#',''))
		//alert(id)
		//if (id && (obj=document.getElementById(id)) )
		//	hs.htmlExpand(null, {contentId: id});


   });





$('document').ready(function() {


	$("div.block1").each(function(k,i){

       	if ($(i).height()>190)
       		{
            h = $(i).height();
       		$(i).find('div.block2').animate({height: 181}, 1000, 'linear', function() {
				      $(i).append('<a href="#" id="open'+k+'" class="bha animate">Подробнее</a>');
				      $('#open'+k).click(function(){$(this).parent().find('div.block2').animate({height: h});$(this).remove();return false;})
				  });

       		}
       })



		// MENU ITEMS, CAT ITEMS
		$('a.sitem').click(function() {			//id= replace(href,"")
			id= $(this).attr('href').replace(document.location.pathname,"")
			id = id.replace("#","")
			id = id.replace("item","")
			id = id.replace(".htm","")
			//alert (document.location.pathname);			//alert(id)
			     $('#item'+id).prepend('<a href="#" class="hsclose" onclick="return hs.close(this)">[X]</a>')
				 return //hs.htmlExpand(this, {contentId: 'item'+id})

			});

		// FOTOS
        $("a[href$=jpg],a[href$=gif]").fancybox();
        //$("a[href$=jpeg]").fancybox();
        //$("a[href$=gif]").fancybox();

        // TEXT BLOCKS
		$('a.h').fancybox();

		$('a.q').click(function(){$('#'+this.id+'_').toggle();return false;})

         //doBlink("#ac",1,5);
         //$(".green_block").prepend('<div id="ff"><a href="#" class="ofeed" style="color:red">Подать заявку</a><br /></div>');
         /*
         $(".ofeed").click(function(){            $.get("/html/feed.php", function(data){
			   $("#ff").html(data);
			});

         	return false;
         	})

        */




});











var doBlink = function(obj,start,finish) { jQuery(obj).fadeOut(300).fadeIn(300); if(start!=finish) { start=start+1; doBlink(obj,start,finish); } }