// JavaScript Jaz RACGP IT September 2009
// initialisation and scripting for mygeneralpractice

$(document).ready(function(){
				

// rollovers and links on main nav 

var nh = $("#navhome");
function fnOvernh(){nh.css("background-position","-240px 0");}
function fnOutnh(){nh.css("background-position","0 0");}
nh.hover(fnOvernh, fnOutnh);
nh.click(function() {
document.location.href = '/home.cfm';
				  });


var nc = $("#navclinical");
function fnOvernc(){nc.css("background-position","-240px 0");}
function fnOutnc(){nc.css("background-position","0 0");}
nc.hover(fnOvernc, fnOutnc);
nc.click(function() {
document.location.href = '/clinical.cfm';
				  });

var np = $("#navpractice");
function fnOvernp(){np.css("background-position","-240px 0");}
function fnOutnp(){np.css("background-position","0 0");}
np.hover(fnOvernp, fnOutnp);	
np.click(function() {
document.location.href = '/practice.cfm';
				 });
					
var ne = $("#naveducational");
function fnOverne(){ne.css("background-position","-240px 0");}
function fnOutne(){ne.css("background-position","0 0");}
ne.hover(fnOverne, fnOutne);	
ne.click(function() {
document.location.href = '/educational.cfm';
				  });
					
// initialize scrollable together with the circular plugin for circular menu
$("#infinite").scrollable({clickable: false, size: 4,  easing: "swing", speed: 2000}).circular();

// drop down for college circular menu
$("div.panel_button").click(function(){
		$("div#panel").animate({
			height: "200px"
		},"fast")
		//.animate({
			//height: "200px"
		//}, "fast");
		$("div.panel_button").toggle();
	});	
	
   $("div#hidebutton").click(function(){
		$("div#panel").animate({
			height: "0px"
		}, "fast");	

   });	
 
   
   
 
//clicks on circular menu next and previous buttons 

var p = $("#cmprev");
function fnOverp(){p.css("background-position","-0 0");}
function fnOutp(){p.css("background-position","-63px 0");}
p.hover(fnOverp, fnOutp);
   
var n = $("#cmnext");
function fnOvern(){n.css("background-position","-63px 0");}
function fnOutn(){n.css("background-position","0 0");}
n.hover(fnOvern, fnOutn);
   
// rollovers on link buttons




   

}); // close document ready

