/*-----------------
	TACLONEX js
-------------------*/




function rollOn(){
	$(this).find('ul.sub_nav').slideDown(100);
}


function rollOut(){
	$(this).find('ul.sub_nav').slideUp(100);
}

function SelectCurrentNavigation() {
    var pathArray = window.location.pathname.split('/');
    var pageurl = pathArray[pathArray.length - 1];
    var linkid = $('.sub_nav li [href*="' + pageurl + '"]:first').attr('id');
    var groupid = $('a#' + linkid).parent().parent().attr('id');

	if (pageurl == "")
		return;
		
    // select the current group
    // open the dropdown for the current group
    // remove hover event so it doesn't close when user rolls off of it
    $('ul#' + groupid).slideDown(0);
    $('ul#' + groupid).parent().unbind('mouseenter mouseleave');

    // select the current sub item
    $('a#' + linkid).addClass('current');
}




/////////////////////////////////

$(document).ready(function () {


    $('div.accordion_node.dropdown ul').hide();
    $('div.accordion_node.dropdown').hover(rollOn, rollOut);

    SelectCurrentNavigation();


    $("#popup_isi_link").fancybox({
        'opacity': true,
        'overlayShow': false,
        'transitionIn': 'elastic',
        'transitionOut': 'none'
    });




    $("#nav_patient_savings_card_link").fancybox({
        'opacity': true,
        'overlayShow': false,
        'transitionIn': 'elastic',
        'transitionOut': 'none'
    });


    /*
    $("#nav_patient_savings_card").fancybox({
    'opacity'		: true,
    'overlayShow'	: false,
    'transitionIn'	: 'elastic',
    'transitionOut'	: 'none'
    });
    */




}); ///////////////////////////////












/*
$(window).bind("resize", function(){
		
	////
	$("#lightbox").css("height", $(window).height());	
});
*/








