// JavaScript Document

	$(document).ready( function() {
			$('#main-menu li a.current').hover(
				function() {
					$(this).children().css('background-position', '0 -51px');
				},
				function() {
					$(this).children().css('background-position', '0 -51px');
				}
			);
			
			
					
			$('#main-menu li.sub').hover( function() {
				$(this).children().filter('ul').css(
					{
						'z-index': '999',
						'visibility': 'visible'
					}
				)
				.children().css(
					{
						'z-index': '999',
						'visibility': 'visible'
					}
				);
				if ( $('#overlay').length > 0 ) {
					$('#overlay').show();	
				}
				else {
					$('#content').prepend('<div id="overlay"></div>');
				}
				
			}, function() {
				$(this).children().filter('ul').css(
					{
						'z-index': '0',
						'visibility': 'hidden'
					}
				)
				.children().css(
					{
						'z-index': '0',
						'visibility': 'hidden'
					}
				);
				$('#overlay').hide();
				
			});

		$('.cta-frame').cycle({ 
			fx:    'scrollLeft',
			sync: false,
			timeout: 8000,
			delay: -2000
		});
		
		$('#main-menu li.sub a.about').click(function() {
			document.location = 'http://www.pciassessment.org/ndb-advisory.php';
		  });
		
		$('#main-menu li.sub a.services').click(function() {
			document.location = 'http://www.pciassessment.org/pci-services.php';
		  });
		
		$('#main-menu li.sub a.what-is').click(function() {
			document.location = 'http://www.pciassessment.org/pci-dss-framework.php';
		  });
		
		$('#content.sub #local-nav a.current span').append('<em>&nbsp;&nbsp;&middot;</em>');
		
		$('#sidebar .item a').hover(function() {
			if ($(this).parent().hasClass('item')) {
					$(this).siblings().css('border-color','#0b2248');
			}
			else {
					$(this).parent().siblings().css('border-color','#0b2248');;
			}
		},
		function() {
			if ($(this).parent().hasClass('item')) {
					$(this).siblings().css('border-color','#ccc');
			}
			else {
					$(this).parent().siblings().css('border-color','#ccc');;
			}
		});
												  
		
													  
		
 	});

	