/**
 * 	This file holds the behavior rules for the Roland JurPartner Site
 * 
 * 	NOTE: Any triggered Element hold two classnames - one with 
 * 	the event-trigger and one with the ID. That's why we have to use split 
 * 	to separate the classes for further actions.
 * 
 * 	@author	Benjamin Seiller <benjamin.seiller@antwerpes.de>
 */



var objMyRules = {
	
		/**
		 * Rules for the std navigation
		 * The url path-string is not nice for sure, but since the there are different path-depths i don't see any other easy way right now
		 * Using a absoulte path is not very nice, since then it would be necessary to care about the protocol (http/https) cause otherwise
		 * Internet Explorer will show warnings as soon as the images are loaded with http but the page is https...
		 */
		
		/* Unternehmen_jp (company) */
		'#div34686Container' : function(objElement){
			objElement.onmouseover 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_company_active.gif)';	
			}
			objElement.onmouseout 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_company_inactive.gif)';		
			}
		},
		/* Produkte_jp (products) */
		'#div34687Container' : function(objElement){
			objElement.onmouseover 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_products_active.gif)';	
			}
			objElement.onmouseout 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_products_inactive.gif)';		
			}
		},
		/* Online_Service_jp (Online service) */
		'#div34688Container' : function(objElement){
			objElement.onmouseover 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_onlineservice_active.gif)';
			}
			objElement.onmouseout 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_onlineservice_inactive.gif)';		
			}
		},
		/*  (downloadcenter) */
		'#div34785Container' : function(objElement){
			objElement.onmouseover 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_downloadcenter_active.gif)';
			}
			objElement.onmouseout 	= function(){
				objElement.style.backgroundImage = 'url(/content/media/bilder/jp/grafiken_1/navigation_downloadcenter_inactive.gif)';
			}
		},
		
		'#divOnlineRequestContainer' : function(objElement){
			objTag = document.getElementsBySelector('#divOnlineRequestContainer .divMainNavItem a')[0];			
			
			objElement.onmouseover 	= function(){
				objTag.style.color = '#7F7F7F';
			}
			objElement.onmouseout 	= function(){
				objTag.style.color = '#C7C7C7';				
			}
		}
		
		/*,

		'.subnavWidth' : function(objElement){						
			
			objElement.onmouseover 	= function(){
				objParent = objElement.parentNode;
				objTag2 = document.getElementsBySelector('#' + objParent.id + ' .subnavWidth a')[0];
				objTag2.style.color = 'white';
			}
			objElement.onmouseout 	= function(){
				objParent = objElement.parentNode;
				objTag2 = document.getElementsBySelector('#' + objParent.id + ' .subnavWidth a')[0];
				objTag2.style.color = '#00467C';				
			}
		},
		
		'.subnavLevel3Width' : function(objElement){			
			
			objElement.onmouseover 	= function(){
				objParent = objElement.parentNode;
				objTag3 = document.getElementsBySelector('#' + objParent.id + ' .subnavLevel3Width a')[0];
				objTag3.style.color = 'white';
			}
			objElement.onmouseout 	= function(){
				objTag3.style.color = '#00467C';
				objParent = objElement.parentNode;
				objTag3 = document.getElementsBySelector('#' + objParent.id + ' .subnavLevel3Width a')[0];
			}
		}
		*/
			
	}; 
		

/**
 * 	Behaviour and its rules are being registered
 * 
 * 	@author	Benjamin Seiller <benjamin.seiller@antwerpes.de>
 */	
Behaviour.register( objMyRules );

