window.addEvent('domready', function(){
						    var data = {
								'home-01.jpg': { caption: '' },
								'home-02.jpg': { caption: '' },
								'home-03.jpg': { caption: '' },
								'home-04.jpg': { caption: '' },
								'home-05.jpg': { caption: '' },
								'home-06.jpg': { caption: '' },
								'home-07.jpg': { caption: '' },
								'home-08.jpg': { caption: '' },
								'home-09.jpg': { caption: '' },
								'home-10.jpg': { caption: '' },
								'home-11.jpg': { caption: '' },
								'home-12.jpg': { caption: '' },
								'home-13.jpg': { caption: '' },
								'home-14.jpg': { caption: '' },
								'home-15.jpg': { caption: '' },
								'home-16.jpg': { caption: '' },
								'home-17.jpg': { caption: '' },
								'home-18.jpg': { caption: '' },
								'home-19.jpg': { caption: '' },
								'home-20.jpg': { caption: '' },
								'home-21.jpg': { caption: '' },
								'home-22.jpg': { caption: '' },
								'home-23.jpg': { caption: '' },
								'home-24.jpg': { caption: '' },
								'home-25.jpg': { caption: '' },
								'home-26.jpg': { caption: '' },
								'home-27.jpg': { caption: '' },
								'home-28.jpg': { caption: '' },
								'home-29.jpg': { caption: '' },
								'home-30.jpg': { caption: '' },
								'home-31.jpg': { caption: '' },
								'home-32.jpg': { caption: '' },
								'home-33.jpg': { caption: '' },
								'home-34.jpg': { caption: '' },
								'home-35.jpg': { caption: '' },
								'home-36.jpg': { caption: '' },
								'home-37.jpg': { caption: '' },
								'home-38.jpg': { caption: '' },
								'home-39.jpg': { caption: '' },
								'home-40.jpg': { caption: '' },
								'home-41.jpg': { caption: '' },
								'home-42.jpg': { caption: '' },
								'home-43.jpg': { caption: '' },
								'home-44.jpg': { caption: '' },
								'home-45.jpg': { caption: '' },
								'home-46.jpg': { caption: '' },
								'home-47.jpg': { caption: '' },
								'home-48.jpg': { caption: '' }
						    };
						    //if (navigator.appName == 'Microsoft Internet Explorer') {
						    //	var myShow = new Slideshow.KenBurns('headerRighSlide', data, {controller: false, height: 275, hu: 'element/img/home', thumbnails: false, width: 386});
						    //} else {
						    	var myShow = new Slideshow.KenBurns('headerRighSlide', data, {controller: false, height: 275, hu: 'element/img/home', thumbnails: false, width: 386});
						  	//}
						  });
 

	jQuery(document).ready(function(){
		   	jQuery("#sportListP").autocomplete(data);
			jQuery("#sportListF").autocomplete(data);
	  });
	
	
	
	jQuery('#npaP').click(function(){
		if(jQuery('#npaP').val() == 'NPA'){
			jQuery('#npaP').val('') ;
		}
	
	}
	) ;
	
	jQuery('#npaF').click(function(){
		if(jQuery('#npaF').val() == 'NPA'){
			jQuery('#npaF').val('') ;
		}
	
	}
	) ;
	
	jQuery('#sportListP').click(function(){
		if(jQuery('#sportListP').val() == 'Sport'){
			jQuery('#sportListP').val('') ;
		}
	
	});
	
	jQuery('#sportListF').click(function(){
		if(jQuery('#sportListF').val() == 'Sport'){
			jQuery('#sportListF').val('') ;
		}
	
	});
	
	jQuery('#searchP').click(function(){
		if(jQuery('#sportListP').val() != ''){
	
			var idCateg = 0 ;
			
			for(i = 1 ; i < data.length ; i++){
				if(jQuery('#sportListP').val() == data[i]){
					idCateg = dataIds[i] ;
					break ;
				}
			}
	
			if(jQuery('#npaP').val() == 'NPA'){
				jQuery('#npaP').val('');
			}
			if(jQuery('#sportListP').val() == 'Sport'){
				jQuery('#sportListP').val('');
			}
			
			if(idCateg != 0){
				window.location = '/offers/showProduct.php?act=advs&idCategory=' + idCateg + '&zipcode=' + jQuery('#npaP').val() + '&typeP=1&typeC=0&typeF=0' ;
			}else{
				window.location = '/offers/showProduct.php?act=advs&keywords=' + jQuery('#sportListP').val() + '&zipcode=' + jQuery('#npaP').val() + '&typeP=1&typeC=0&typeF=0' ;
			}	
			
		}
	}) ;
	
	jQuery('#searchF').click(function(){
		if(jQuery('#sportListF').val() != ''){
	
			var idCateg = 0 ;
			
			for(i = 1 ; i < data.length ; i++){
				if(jQuery('#sportListF').val() == data[i]){
					idCateg = dataIds[i] ;
					break ;
				}
			}
	
			if(jQuery('#npaF').val() == 'NPA'){
				jQuery('#npaF').val('');
			}
			if(jQuery('#sportListF').val() == 'Sport'){
				jQuery('#sportListF').val('');
			}
			
			if(idCateg != 0){
				window.location = '/offers/showProduct.php?act=advs&idCategory=' + idCateg + '&zipcode=' + jQuery('#npaF').val() + '&typeF=1' ;
			}else{
				window.location = '/offers/showProduct.php?act=advs&keywords=' + jQuery('#sportListF').val() + '&zipcode=' + jQuery('#npaF').val() + '&typeF=1' ;
			}	
			
		}
	}) ;
	
	jQuery('#sportListP').keyup(function(e) {if(e.keyCode == 13) {jQuery('#searchP').click() ;}}); 
	jQuery('#npaP').keyup(function(e) {if(e.keyCode == 13) {jQuery('#searchP').click() ;}}); 
	jQuery('#sportListF').keyup(function(e) {if(e.keyCode == 13) {jQuery('#searchF').click() ;}}); 
	jQuery('#npaF').keyup(function(e) {if(e.keyCode == 13) {jQuery('#searchF').click() ;}}); 


