	prdsrc__ignoreClicks = 0;
	prdsrc__lastEdit = '';
	prdsrc__tweenMS = 700; // 1500;
	prdsrc__waitFunctionalitieMS = 200;
	
	var prds = function() {
		this.huh = 0;
	}
	
	prds.prototype.rebuildSelection = function() {
		var newUrl = '';
		newUrl = prdsrc__base + '?';
		for(var filterName in prdsrc__filterValues) {
			if ( prdsrc__filterValues[filterName] != '' ) {
				newUrl = newUrl + filterName + "=" + prdsrc__filterValues[filterName] + "&";
			}
		}
		/*
		newUrl = newUrl + "_____";
		newUrl = newUrl.replace("&_____", "");
		*/
		newUrl = newUrl + "lastedit=" + prdsrc__lastEdit + "&";
		newUrl = newUrl + "openedprd=true";
		//alert( location.href );
		
		location.href = newUrl;
		//alert(newUrl);
	}
	
    prds.prototype.run = function() {
        if ( typeof(prdsrc__filters) != "undefined" ) {
            this.runB();
        }
    }
    
	prds.prototype.runB = function() {
        var me = this;
        
        for(var i = 0; i < 20; i++) {
        	if ( document.getElementById('prdsrc_jsvariant'+i) ) {
        		document.getElementById('prdsrc_jsvariant'+i).style.display = "block";
        	}
        	if ( document.getElementById('prdsrc_nvariant'+i) ) {
        		document.getElementById('prdsrc_nvariant'+i).style.display = "none";
        	}
        }
        
		$('.prdsrc_start').click(function() {
			
			var lang = location.pathname.slice(1,3);
			
			if(lang == 'en'){
				var site_name = 'product-finder';
				var class_name = '.area-content-productfinder';
			}else if(lang == 'de'){
				var site_name = 'produktsuche';
				var class_name = '.area-content-produktsuche';			
			}

			$('.area-content').slideUp('slow').removeClass().load(site_name + ' ' + class_name , function() {
				$(this).slideDown('slow');
			});
		
		
			if ( prdsrc__ignoreClicks == 0 ) {
				prdsrc__ignoreClicks = 1;
				
				$('.product_search').css({height: prdsrc__height});
				$('.product_search').animate({
					height: prdsrc__heightVisible
				}, prdsrc__tweenMS, function() {
					// Animation complete.
				});
                
				$('.product_search_background').css({opacity: "0.0", height: prdsrc__height});
				$('.product_search_background').animate({
					opacity: 0.5,
					height: prdsrc__heightVisible
				}, prdsrc__tweenMS, function() {
					// Animation complete.
				});
                
				$('#prdsrc_content').css({opacity: "0.0", height: prdsrc__height});
				$('#prdsrc_content').animate({
					opacity: 1.0,
					height: prdsrc__heightVisible
				}, prdsrc__tweenMS, function() {
					// Animation complete.
				});
			
			
/*				
			$('.prdsrc_start').css({opacity: "1.0"});
			$('.prdsrc_start').animate({
					opacity: 0.0
				}, prdsrc__tweenMS, function() {
					setTimeout( function() {
						'.prdsrc_start'.style.display = "none";
					}, 100);
					// Animation complete.
				});
//				$('.prdsrc_start').hide();
              
				$( document.getElementById('prdsrc_stop') ).css({opacity: "0.0", display: "block"});
				$( document.getElementById('prdsrc_stop') ).animate({
					opacity: 1.0
				}, prdsrc__tweenMS, function() {
					$('.prdsrc_start').show();
					// Animation complete.
				});
*/				
				setTimeout( function() {
					prdsrc__ignoreClicks = 0;
				}, prdsrc__tweenMS + prdsrc__waitFunctionalitieMS);
			}

			$('#prdsrc_jsvariant2').hide();
		});
/*		
		$( document.getElementById('prdsrc_stop') ).click(function() {
			if ( prdsrc__ignoreClicks == 0 ) {
				prdsrc__ignoreClicks = 1;
				
				$('.product_search').css({height: prdsrc__heightVisible});
				$('.product_search').animate({
					height: prdsrc__height
				}, prdsrc__tweenMS, function() {
					// Animation complete.
				});
	
				$('.product_search_background').css({opacity: "0.5", height: prdsrc__heightVisible});
				$('.product_search_background').animate({
					opacity: 0.0,
					height: prdsrc__height
				}, prdsrc__tweenMS, function() {
					// Animation complete.
				});
	
				$('#prdsrc_content').css({opacity: "1.0", height: prdsrc__heightVisible});
				$('#prdsrc_content').animate({
					opacity: 0.0,
					height: prdsrc__height
				}, prdsrc__tweenMS, function() {
					// Animation complete.
				});
				
				
				$( document.getElementById('prdsrc_stop') ).css({opacity: "1.0"});
				$( document.getElementById('prdsrc_stop') ).animate({
					opacity: 0.0
				}, prdsrc__tweenMS, function() {
					setTimeout( function() {
						document.getElementById('prdsrc_stop').style.display = "none";
					}, 100);
					// Animation complete.
				});
	
				$('.prdsrc_start').css({opacity: "0.0", display: "block"});
				$('.prdsrc_start').animate({
					opacity: 1.0
				}, prdsrc__tweenMS, function() {
					$( document.getElementById('prdsrc_stop') ).show();
					// Animation complete.
				});
				
				setTimeout( function() {
					prdsrc__ignoreClicks = 0;
				}, prdsrc__tweenMS + prdsrc__waitFunctionalitieMS);
			}
		});
*/		
		for( var filter in prdsrc__filters ) {
			var filterName = prdsrc__filters[filter];
			
			$( document.getElementById('select__'+filterName) ).change(function() {
				var thisId = $(this).attr('id');
				thisId = thisId.replace('select__', '');
				prdsrc__lastEdit = thisId;
				prdsrc__filterValues[thisId] = $(this).val();
				tPrds.rebuildSelection();
			});
		}
		

        /*
        this.element_areaContent = $('.area-content')[0];
        
		if ( document.getElementById('fadeimages') ) {
			$('#fadeimages').show().cycle({
				fx:    'fade',
				sync:  true,
				delay: -500
			});
		}
		if ( document.getElementById('nofadeimage') ) {
			$('#nofadeimage').hide();
		}
		*/
        
        //$('.menu-name-menu-menu-head .expanded li').css({opacity: "0.8"});
	}
