
	// leap year javascript ---------------------------------------------------------------------------- >>
	
		$(document).ready(function(){
			
				$('#s').addClass('selectText').val('Search');
				$('#log').addClass('selectText').val('Username');
				$('#pwd').addClass('selectText').val('Password');
				
				$("#log").focusin( function() { if( $("#log").val() == "Username" ){ $("#log").val("").css("color","#000"); } } );
				$("#log").focusout( function() { if( $("#log").val() == "" ){ $("#log").val("Username").css("color","#bfbfbf"); } } );
				
				$("#pwd").focusin( function() { if( $("#pwd").val() == "Password" ){ $("#pwd").val("").css("color","#000"); } } );
				$("#pwd").focusout( function() { if( $("#pwd").val() == "" ){ $("#pwd").val("Password").css("color","#bfbfbf"); } } );
				
				$("#s").focusin( function() { if( $("#s").val() == "Search" ){ $("#s").val("").css("color","#000"); } } );
				$("#s").focusout( function() { if( $("#s").val() == "" ){ $("#s").val("Search").css("color","#bfbfbf"); } } );
			
			//---
				
				$('#reffer').change( function() { if( $("#reffer").val() == "Other" ){ $("#other").fadeIn("slow"); } } );
				$("#reffer").change( function() { if( $("#reffer").val() != "Other" ){ $("#other").fadeOut("slow"); $("#other").val(""); } } );
				
				$('#searchsubmit').val(' ');			
				//$('.gallery-icon a').lightBox();
				$('#dagallery > a').lightBox();
		
			//--- jquery cysle for the single pages ------------------------------------------------ >>
		
				$('#slidesContainer').cycle({
					fx: 'scrollRight',
					speed:    2000, 
    				timeout:  5000
				});	
				
				$('#slidesContainer2').cycle({
					fx: 'scrollRight',
					speed:    2000, 
    				timeout:  2000
				});	
				
				$("#slidesContainer").mouseenter(function(){
					$('#slidesContainer').cycle('pause');
				}).mouseleave(function(){
					$('#slidesContainer').cycle('resume'); 
				});
				
				$("#slidesContainer2").mouseenter(function(){
					$('#slidesContainer2').cycle('pause');
				}).mouseleave(function(){
					$('#slidesContainer2').cycle('resume'); 
				});
				
				//$('#slidesContainer').cycle('pause');		
			
			/*//--- home page image slider --------------------------------------------------------------- >>
			
				var currentPosition = 0;
				var slideWidth = 630;
				var slides = $('.slide');
				var numberOfSlides = slides.length;
			
				// Remove scrollbar in JS
					$('#slidesContainer').css('overflow', 'hidden');
			
				// Wrap all .slides with #slideInner div
					slides
					.wrapAll('<div id="slideInner"></div>')
					// Float left to display horizontally, readjust .slides width
						.css({
							'float' : 'left',
							'width' : slideWidth
						});
	
					// Set #slideInner width equal to total width of all slides
						$('#slideInner').css('width', slideWidth * numberOfSlides);
	
					// Insert left and right arrow controls in the DOM
						$('#slideshow')
						.prepend('<span class="control" id="leftControl">Move left</span>')
						.append('<span class="control" id="rightControl">Move right</span>');
	
					// Hide left arrow control on first load
						manageControls(currentPosition);
	
					// Create event listeners for .controls clicks
						$('.control')
						.bind('click', function(){
					// Determine new position
						currentPosition = ($(this).attr('id')=='rightControl')
						? currentPosition+1 : currentPosition-1;
	
					// Hide / show controls
						manageControls(currentPosition);
					// Move slideInner using margin-left
						$('#slideInner').animate({
							'marginLeft' : slideWidth*(-currentPosition)
						});
						
						
					});
						
		//--- home page image slider2 --------------------------------------------------------------- >>
			
				var currentPosition2 = 0;
				var slideWidth2 = 630;
				var slides2 = $('.slide2');
				var numberOfSlides2 = slides2.length;
			
				// Remove scrollbar in JS
					$('#slidesContainer2').css('overflow', 'hidden');
			
				// Wrap all .slides with #slideInner div
					slides2
					.wrapAll('<div id="slideInner2"></div>')
					// Float left to display horizontally, readjust .slides width
						.css({
							'float' : 'left',
							'width' : slideWidth
						});
	
					// Set #slideInner width equal to total width of all slides
						$('#slideInner2').css('width', slideWidth2 * numberOfSlides2);
	
					// Insert left and right arrow controls in the DOM
						$('#slideshow2')
						.prepend('<span class="control2" id="leftControl2">Move left</span>')
						.append('<span class="control2" id="rightControl2">Move right</span>');
	
					// Hide left arrow control on first load
						manageControls2(currentPosition2);
	
					// Create event listeners for .controls clicks
						$('.control2')
						.bind('click', function(){
					// Determine new position
						currentPosition2 = ($(this).attr('id')=='rightControl2')
						? currentPosition2+1 : currentPosition2-1;
	
					// Hide / show controls
						manageControls2(currentPosition2);
					// Move slideInner using margin-left
						$('#slideInner2').animate({
							'marginLeft' : slideWidth2*(-currentPosition2)
						});
						
						
					});
		
		// manageControls: Hides and shows controls depending on currentPosition
			function manageControls(position){
				//alert(position);
				// Hide left arrow if position is first slide
					if(position==0){ $('#leftControl').hide() }
					else{ $('#leftControl').show() }
						// Hide right arrow if position is last slide
							if(position==numberOfSlides-1){ $('#rightControl').hide() }
								else{ $('#rightControl').show() }
							}
	
		// manageControls: Hides and shows controls depending on currentPosition
			function manageControls2(position2){
				// Hide left arrow if position is first slide
					if(position2==0){ $('#leftControl2').hide() }
					else{ $('#leftControl2').show() }
						// Hide right arrow if position is last slide
							if(position2==numberOfSlides2-1){ $('#rightControl2').hide() }
								else{ $('#rightControl2').show() }
							}*/
		
		});
			
			/*var currentPosition = 0;
			var slideWidth = 630;
			
			function rotateImgslider(){
				
				//alert(currentPosition);
				
				//var currentPosition = 0;
				//var slideWidth = 630;
				var slides = $('.slide');
				var numberOfSlides = $('#slideInner').children();
				
				var dacurrentPosition = currentPosition + 1;
				
				if (dacurrentPosition == 6){ dacurrentPosition = 0; }
				//if (dacurrentPosition == 0){ dacurrentPosition = 6; }
				
					$('#slideInner').animate({
							'marginLeft' : slideWidth*(-currentPosition)
						});
						
						
					
					//alert(currentPosition);
					
					currentPosition = dacurrentPosition;				
				
				
			} var dacycle = setInterval(rotateImgslider, 5000);*/

	//--- !!
