$(document).ready(
	function(){		
		// init menu items
		$(".hoverImage").css({"display": "none", "opacity": "1"});
		
		
		$('#headerSlideShow') 
		.before('<div id="headerNavContainer">') 
		.before('<div id="headerNav">') 
		.cycle({ 
			fx:     'fade', 
			speed:  1500, 
			timeout: 7000, 
			pager:  '#headerNav' 
		});
		
		$("ul.sf-menu").supersubs({ 
            minWidth:    10,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();  // call supersubs first, then superfish, so that subs are 
                         // not display:none when measuring. Call before initialising 
                         // containing tabs for same reason. 
		
		$(".menuitem").mouseover(
			function(){
				$(this).animate({"opacity": "0"}, 150);
			}
		);
		$(".menuitem").mouseout(
			function(){
				$(this).animate({"opacity": "1"}, 150);
			}
		);
		$(".HomePageItem").mouseover(
			function(){
				$(this).css({"borderColor": "#ED6F15"});
			}
		);
		$(".HomePageItem").mouseout(
			function(){
				$(this).css({"borderColor": "#D6D6D6"});
			}
		);
		$("#mainmenuContainerDiv .current").css({"opacity": "0"});
		$("#mainmenuContainerDiv .section").css({"opacity": "0"});
//		$(".currentMenuItem").css({"opacity": "0"});
									 

//		$("#accord").accordion(
//		{
//			autoHeight: false,
//			collapsible:true,
//			active:false,
//			navigation: true,
//			header: '.accordheader'
//			
//			
//		});
//		
//		$("#accordion").accordion(
//		{
//			autoHeight: false,
//			collapsible:true,
//			active:false,
//			navigation: true,
//			header: '.rightBlockHeader'
//			
//			
//		});

		$(function() {
			$("#accordion").accordion({
				collapsible: true,
				header: 'h3',
				active:false,
				autoHeight: false,
				event: 'click'
			});
		});
		$('#accordion div a').click(function() {
			return true;
		});
		$('input[type="text"]').focus(function() {  
           	this.value = '';  
     	});  
		 $("a.inline").fancybox({ 
			'hideOnContentClick': false,
			'frameWidth': 640,
			'frameHeight': 520
		}); 
		 $(".iframe").fancybox({ 
			'hideOnContentClick': false,
			'frameWidth': 330,
			'frameHeight': 240
		}); 
	
	}
);
