
    jQuery.noConflict();
     

    jQuery(document).ready(function($){

        $('.lbOn').click(function() { 


            $.blockUI({ message: $('#dialog'), css : {border: '1px solid #000000' ,width : '600px', top : '100px',margin : '-50px  0 0 -100px'} });
            
            $.ajax({
	      url: $(this).attr("rel") ,
	      cache: false,
	      success: function(html){
	        
	        $("#dialog").replaceWith(html);
		$("#close_dialog").click(function(){
		// unblock when remote call returns 
		$.unblockUI();                    
		});	        
	        
	      }
	    });


        }); 



 
	$.localScroll({
		target: '#categories', // could be a selector or a jQuery object too.
		queue:true,
		duration:1000,
		hash:true,
		onBefore:function( e, anchor, $target ){
			// The 'this' is the settings object, can be modified
		},
		onAfter:function( anchor, settings ){
			// The 'this' contains the scrolled element (#content)
		}
	}); 

 
        $('.remove_item').click(function() { 
            $.blockUI({ message: $('#question'), css: { margin : '-50px  0 0 0px', height : '95px', width: '326px', border : '0px #FFFFFF solid',  color : '#FFFFFF'} }); 
        }); 
 
 
	$('#close').click(function() { 

	    // unblock when remote call returns 
            $.unblockUI(); 

	});
 
        $('#yes').click(function() { 
            // update the block message 
            
            $.blockUI({ message: '<p>De advertentie wordt verwijderd...</p>' }); 

            $('#delete_item').submit(); 
            
        }); 
 
        $('#no').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 
 
	$('#add_to_favourites').click(function() { 

		
            $.ajax({
              url: 'applications/actions/add_item_to_favourites.php' ,
	      type: 'POST',
	      data: $(this).attr("rel") ,
	      cache: false,
	      success: function(html){

		$.blockUI({ 
		    message: $('#added_to_favourites'), 
		    fadeIn: 700, 
		    fadeOut: 700, 
		    timeout: 2000, 
		    showOverlay: false, 
		    centerY: true,
		    css : { border : '0px solid #FFFFFF' }

		});	        
	      
	        
	        
	      }
	    });


		


	    }); 

$("#select_categories").change(function(){
    
    
                $.ajax({
    	      url: '/gateway/index.php?app=get_sub_categories&cat_id='+ $(this).attr("value") ,
    	      cache: false,
    	      success: function(html){
    	        
    	        
    	        
    	        
    	        $("#sub_cat").replaceWith(html);
    	        $("#sub_cat").fadeIn("slow");

		$("#select_sub_category").change(function(){


				$.ajax({
			      url: '/gateway/index.php?app=store_sub_category&cat_item_id='+ $(this).attr("value") ,
			      cache: false,
			      success: function(html){



			      }
			    });

    });

    		        
    	        
    	      }
	    });
      
    });

		$("#select_sub_category").change(function(){


				$.ajax({
			      url: '/gateway/index.php?app=store_sub_category&cat_item_id='+ $(this).attr("value") ,
			      cache: false,
			      success: function(html){



			      }
			    });

		});

		$("#get_menu").mouseenter(function(){

		    	        
		    	        $("#hidden_menu").animate({ left : '20px' });
		    	        $("#hidden_menu").focus();

                
                
                });
                $("#hidden_menu").mouseleave(function(){
                
                $("#hidden_menu").animate({ left : '-200px' });
                
                });


    }); 
