/** 
  * ======================================================
  * $Workfile:   1-7_script.js  $
  * $Revision:   1.8  $
  * $Date:   Jun 02 2009 14:14:20  $
  * $Author:   riverarx  $
  * $Archive:   //renpdbsmhprod02/pvcsdata/Development_Area/archives/LargeLaw/PageDesigner/v4/Code/Front-end/_Source/LexisNexis/Website/Modules/Style/Themes/1-7/1-7_script.js-arc  $
  * ======================================================
  * Change History:
  * 1.02 Updated accordian menu js 
**/
// bookmark functionality
function bookmark(url, title){
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite(url, title);
	} else if (navigator.appName == "Netscape") {
		window.sidebar.addPanel(title, url, "");
	} else {
	    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
	}
}

//  this shows and hides the language selector
function showLanguage() {
	//	show the list
	$('ul.ulLanguages').removeClass('hidden');	
	//	append a close link
	if(!$('li#closeLink')) {
		$('<li id="closeLink"><a href="#" title="Close Language Menu">Close</a></li>').filter('#closeLink a').click(function() {
			hideLanguage();
		}).appendTo('ul.ulLanguages');}
	}
function showLanguage() {
/*	// first thing is to hide the options
	$('ul.ulLanguages').addClass('hidden');
	$('.divLanguages h2 a').click(function () {
		showLanguage();
	});
*/
    var d = document.getElementsByTagName('div');
    for(i=0;i<d.length;i++) {
        var a = d[i].className;
        if(a == 'divLanguages') {
            var l = d[i].getElementsByTagName('ul');
            for(x=0;x<l.length;x++) {
                var c = l[x].className;
                if(c == 'ulLanguages') {
                    l[x].className = 'openLanguage';
                    //  create new list item and link then append to list
                    var n = document.createElement('li');
                    n.setAttribute('id','closeLink');
                    var na = document.createElement('a');
                    na.setAttribute('href','javascript:showLanguage();');
                    na.innerHTML = 'Close';
                    n.appendChild(na);
                    l[x].appendChild(n);
                } else {
                    l[x].className = 'ulLanguages';
                    var e = l[x].lastChild;
                    l[x].removeChild(e);
                }
            }
        }
    }
}

function resizeVideo() {
	$('object').css({width:'220px',height:'178px'});
	$('embed').css({width:'220px',height:'178px'});
}

function roundCorners() {
	//	left column divPods
	$('div.column-left div.divPod').wrapInner('<div class="divPodInner"></div>');
	$('div.column-left div.divPod').prepend('<div class="divPodTop"></div>');
	$('div.column-left div.divPod').append('<div class="divPodBtm"></div>');
	
	//	center column divPods
	$('div.divPodContainer div.divPod').wrapInner('<div class="divPodInner"></div>');
	$('div.divPodContainer div.divPod').prepend('<div class="divPodTop"></div>');
	$('div.divPodContainer div.divPod').append('<div class="divPodBtm"></div>');
	
	//	right column divPods
	$('div.column-right div.divPod').wrapInner('<div class="divPodInner"></div>');
	$('div.column-right div.divPod').prepend('<div class="divPodTop"></div>');
	$('div.column-right div.divPod').append('<div class="divPodBtm"></div>');
	
	if($('a.aCallNow').length == 0) {
		$('div.callInfo').css('display','none');
	}
}

jQuery().ready(function(){
	/*	start rounded corners	*/
	roundCorners();
/*	
	// init accordion left nav
	$('#nav').accordion({
		active: '.active',
		header: 'li.closed > a',
		event: 'mouseover',
		animated: 'easeslide',
		autoheight: false
	});
	
	$('#nav li.active > a').prepend('> ');
*/	
	//resizeVideo();
	//resizeHeaderCell();
});