$(document).ready(function() {

	// remove panel for blog page
	if ( $('#blog-content').length ) {
		$('#panel').remove();
		$('#inner-content').css({'width':'918px','margin-right':'0px'});
	};

	$('<h2>Latest News</h2>').insertBefore('.blog-scroll :first');

	// remove submenu from contact and affiliates page
	var path = location.pathname.substring(1);
	newpath = path.split("/", 1)
	if ( (newpath == 'contact-us') || 
		 (newpath == 'global-affiliates') || 
		 (newpath == 'advisory-board') || 
		 (newpath == 'us-focus') || 
		 (newpath == 'preferred-partners')
	   ) { 
	   	$('#panel').remove();
		$('#inner-content').css({'width':'918px','margin-right':'0px'});
	};

	// Bookmark site
	if(window.opera) {
		if ($("a.bookmark").attr("rel") != ""){
			$("a.bookmark").attr("rel","sidebar");
		} 
	}

	$("a.bookmark").click(function(event){
		event.preventDefault();
		var url = this.href;
		var title = this.title;

		if (window.sidebar) { 
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { 
			window.external.AddFavorite( url, title);
		} else if(window.opera) { 
			return false; 
		} else { 
			 alert('Sorry, your browser does not support the requested action,'
			 + ' please add this page manually to your bookmarks.');
		}
	});

	$('.lightbox').lightBox({fixedNavigation:true});

	ddsmoothmenu.init({
		mainmenuid: "smoothmenu1", 
		orientation: 'h', 
		classname: 'ddsmoothmenu', 
		contentsource: "markup" 
	});

});
