 $(function(){
		   $(".menuCats").click(function(){
										var url= $(this).children(".menuCatBtn").children("a").attr("href");
										 window.location=url;
										 } ).css("cursor","pointer");
 		   $(".menuRow").each(function(){
									  if($(this).children().attr("class")&& $(this).children().attr("class").match("menuRowTitle")){
									  $(this).hover(function(){
										$(this).children().addClass("red");
										},function(){
											$(this).children().removeClass("red");
											});
									  }
									  }).css("cursor","default"); 
 		   if($("#sideBar").height()>$("#content").height())$("#content").height($("#sideBar").height());
		 
	
	 
		   $(".relatedBox").each(function(){
								 
										  $(this).click(function(){
											  var url=$(this).children().children().children("a").attr("href");
											  window.location=url;
									          }).css("cursor","pointer");
										  });
		   
		   $(".storeName").each(function(){
							$(this).children("a").click(function(){
							if($("#storePage").length>0){
																	 $(".redTitle").html('ארומה תל אביב - איתור סניפים - '+$(this).html());
																	 }
								var id=$(this).attr("rel");
								rid=id.split(",");
								getStore(rid[0],rid[1]);						
								return false;
								});			 
			 });
		   });
 function getStore(id,fid,d){
	if(fid&&getFlashMovie("storesMap")) getFlashMovie("storesMap").zfocus(fid);
	if(d!=1){
	 $(".stores-03_").load("/store.asp",{"id":id},function(){
														   $('div').pngFix( );
														   $('.storPic').css('display','none');
														 setTimeout("$('.storPic').fadeIn('normal'); ",500); 
														   
														   
														   
														   });
	}
	 $(".storeName").children("a").removeClass("red");
	 $("#br"+id).children("a").addClass("red");
 }
 $(function(){
			
			
			if($(".storeName").length>0){
	
		 	 setTimeout("getDefStore()",700);
			}
			
			
			});
 function getDefStore(){
	 
 
		 
					if($("#storePage").length>0){
				 
					var id=$("#storePage").html();
								rid=id.split(",");
					 getStore(rid[0],rid[1],1) ;
				}else{
					var id=$(".storeName:first").children("a").attr("rel");
								rid=id.split(",");
					 getStore(rid[0],rid[1]) ;
				}
		 
			
	 
	 };
 function showLocation(id){
	 
         $.get('/getStoreId.asp',{"ref":id},function(data){
													getStore(data);			 
													 });
	 
	 
 } 
 function getFlashMovie(movieName) {
			  	var isIE = navigator.appName.indexOf("Microsoft") != -1;
			  	return (isIE) ? window[movieName] : document[movieName];
			}