function costFilter(val,hrefid){ 
 
  	$("#eventBrowse").addClass('fadingLoder');
 	$("#eventBrowse").prepend("<div style='position:absolute;left:45%;top:15%;'><img src='"+SITE_NAME+"img/large_ajax_loaser.gif' /></div>");
	//alert(SITE_NAME+'events/cost/'+val) ;		
	//alert(val);
	 parent.location.hash = val;
	 jQuery.ajax({
     type: "POST",
     url: SITE_NAME+'events/index/'+val,
     success: function(html){
	  //	alert(html);
		 	$("#eventBrowse").removeClass('fadingLoder');
         	$("#eventBrowse").html(html);
		 	recall_calendar(val,hrefid);
			// selector_cal(hrefid);
		   //  prepareCategory(val);
	   }
   });
   
   
   $('#ongoing_yes').attr('checked',true);
   $("#heppening-range").slider("value",4);
   $("#cost-range").slider("value",40);
   
}


function recall_calendar(val,hrefid){

	$.ajax({
			 type: "POST",
			 url: SITE_NAME+'events/calander_recall/'+val+'/'+hrefid,
			 success: function(html2){
			//  alert(html2);
			if(html2){ 
					$("#calenderBox").html(html2)	 
			  } 
		   }
		  });

}

function selector_cal(hrefid){

		$(".calenderBoxList li a").removeClass('actList'); 
		$(".date_tableMain div").removeClass('date-selected'); 

		 
		if(hrefid.length>6){
		// Right side text
		$(".calenderBoxList li a[id="+hrefid+"]").addClass('actList');
		 
		$.ajax({
			 type: "POST",
			 url: SITE_NAME+'events/getCalendarDate/'+hrefid,
			 success: function(html){
			  alert(html);
			if(html){
			
				if(html.length>1){
				arr = html.split(',') ;
				$(".date_tableMain div").each(function(key, value){ 
				if(jQuery.inArray(value.id, arr)!=-1)
					$("#"+value.id).addClass("date-selected");
				}) ;
				
				}else{
				$(".date_tableMain div[id="+html+"]").addClass("date-selected"); 
				}
			
			  } 
		   }
		  });
		 }else{
		 $(".date_tableMain div[id="+hrefid+"]").addClass('date-selected'); 
		 }
	 
   
}


 /*

function prepareCalendar(val, clickfunctionName){
	
	//alert(SITE_NAME+'events/getCalendar/'+val+'/'+clickfunctionName);
	$.ajax({
     type: "POST",
     url: SITE_NAME+'events/getCalendar/'+val+'/'+clickfunctionName,
     success: function(html){
	 alert(html) ;
			//$("#calenderBox").html(html);
	   }
   });
		
}

function prepareCategory(val){
	$.ajax({
     type: "POST",
     url: SITE_NAME+'events/getCategory/'+val,
     success: function(html){
			$("#choosecategory").html(html);
	   }
   });
		
}

 */	
