	$(document).ready(function(){
		$("a[rel^='feedback']").prettyPopin({
			modal : true, /* true/false */
			width : 600, /* false/integer */
			height: 550, /* false/integer */
			opacity: 0.5, /* value from 0 to 1 */
			animationSpeed: 'slow', /* slow/medium/fast/integer */
			followScroll: true, /* true/false */
			loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
			callback: function(){} /* callback called when closing the popin */
		});
	
		$("a[rel^='prettyPopin2']").prettyPopin({
			modal : true, /* true/false */
			width : 620, /* false/integer */
			height: 650, /* false/integer */
			opacity: 0.5, /* value from 0 to 1 */
			animationSpeed: 'slow', /* slow/medium/fast/integer */
			followScroll: true, /* true/false */
			loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
			callback: function(){} /* callback called when closing the popin */
		});
	
	
	$("a[rel^='register']").prettyPopin({
				modal : true, /* true/false */
				width : 520, /* false/integer */
				height: 550, /* false/integer */
				opacity: 0.5, /* value from 0 to 1 */
				animationSpeed: 'slow', /* slow/medium/fast/integer */
				followScroll: true, /* true/false */
				loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
				callback: function(){} /* callback called when closing the popin */
			});
	
	
	$("a[rel^='login']").prettyPopin({
					modal : true, /* true/false */
					width : 520, /* false/integer */
					height: 550, /* false/integer */
					opacity: 0.5, /* value from 0 to 1 */
					animationSpeed: 'slow', /* slow/medium/fast/integer */
					followScroll: true, /* true/false */
					loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
					callback: function(){} /* callback called when closing the popin */
				});
		
	
		$("a[rel^='privacy']").prettyPopin({
					modal : true, /* true/false */
					width : 520, /* false/integer */
					height: 550, /* false/integer */
					opacity: 0.5, /* value from 0 to 1 */
					animationSpeed: 'slow', /* slow/medium/fast/integer */
					followScroll: true, /* true/false */
					loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
					callback: function(){} /* callback called when closing the popin */
				});
		
	
	
		$("a[rel^='terms']").prettyPopin({
					modal : true, /* true/false */
					width : 620, /* false/integer */
					height: 650, /* false/integer */
					opacity: 0.5, /* value from 0 to 1 */
					animationSpeed: 'slow', /* slow/medium/fast/integer */
					followScroll: true, /* true/false */
					loader_path: 'images/prettyPopin/loader.gif', /* path to your loading image */
					callback: function(){} /* callback called when closing the popin */
				});
		
	
	});
	
	$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {  
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).addClass("active").stop().animate({width: "214px"}, {duration: 450, easing: "easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).addClass("active").stop().animate({width: "214px"}, {duration: 400, easing: "easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).removeClass("active").stop().animate({width: "40px"}, {duration: 400, easing: "easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).removeClass("active").stop(':animated').animate({width: "40px"}, {duration: 450, easing: "easeInOutQuad", complete: "callback"});
    }
  });
});
	
	//preloading images fro mouseover
	
	chat = new Image()
	chat.src = "images/loading_bar.gif"
		chat = new Image()
	chat.src = "images/blublackbg2.jpg"

function loadfeedback(){
var feedback = $('#feedback');
$(feedback).trigger('click');	
}


function getnews(mycategory){

$("#newsbox").html("");
$("#newsbox").height(100);
$("#newsbox").append( "<div id='loading' style='height:100px'></div>");

//change colours depending on clicked item
selected = "#" + mycategory
$("#newslinks .yellowtext").addClass("whitetext");
$("#newslinks .yellowtext").removeClass("yellowtext");
$(selected).addClass("yellowtext");




$.get("cms/ajax.php", { category: mycategory, source: "news", recordcount:"5" },
   function(data){
	$("#newsbox").html(data);
   }); 


$("#newsbox").css({height:"auto"});
}


function showdescription(program,myday){

var ogprogram = program;
var program = "#" + program;

$(program).html( "<div id='loading'></div>");

 $.get("cms/ajax.php", { programname: ogprogram, day: myday, source: "descriptions" },
   function(data){
	$(program).html(data);
   }); 

$(program).slideDown("slow");

}
