var $j = jQuery.noConflict();

$j(document).ready(function(){
	$j(".video-1").colorbox({width:"50%", inline:true, href:"#inline-video-1"});
	$j(".video-2").colorbox({width:"50%", inline:true, href:"#inline-video-2"});
	$j(".video-3").colorbox({width:"50%", inline:true, href:"#inline-video-3"});
	$j(".video-4").colorbox({width:"50%", inline:true, href:"#inline-video-4"});
	$j(".video-5").colorbox({width:"50%", inline:true, href:"#inline-video-5"});
	$j(".video-6").colorbox({width:"50%", inline:true, href:"#inline-video-6"});
	$j(".video-7").colorbox({width:"50%", inline:true, href:"#inline-video-7"});
	$j(".video-8").colorbox({width:"50%", inline:true, href:"#inline-video-8"});
});

$j(document).ready(function(){
	$j(".patient-1").colorbox({width:"50%", inline:true, href:"#patient-video-1"});
	$j(".patient-2").colorbox({width:"50%", inline:true, href:"#patient-video-2"});
	$j(".patient-3").colorbox({width:"50%", inline:true, href:"#patient-video-3"});
	$j(".patient-4").colorbox({width:"50%", inline:true, href:"#patient-video-4"});
	$j(".patient-5").colorbox({width:"50%", inline:true, href:"#patient-video-5"});
});

$j(document).ready(function(){
	$j(document).pngFix( );
});

$j(document).ready(function(){ 
    $j('a.external').click(function(){
        window.open(this.href);
        return false;
    });
	$j('ul.sf-menu').superfish({ 
            delay:       1000, // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',  // faster animation speed 
            autoArrows:  true, // disable generation of arrow mark-up 
            dropShadows: false  // disable drop shadows 
        }); 
});

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

function rand(number) {
        return Math.ceil(rnd()*number);
};

// Clear/Replace Fields
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
}

function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}