jQuery(function(){
	        if ($.fn.datepicker) {
	            $('.qs-date-field').datepicker({
	                showOn: 'button',
	                buttonImage: 'http://www.yorkshire.com/images/calendar.gif',
	                buttonImageOnly: true,
	                dateFormat: 'dd/mm/yy',
	                minDate: new Date(),
	                maxDate: '+1y'
	            });
	        } 	
		
		//$('#tabs').tabs();
		//$('#tabs-media').tabs();
		$('ul.sf-menu').superfish(); 
		//$(".same-height").equalHeights();

		$(".sf-menu li.sfHover ul").each(function(){ $(this).addClass("top40"); });

		$(".sf-menu li:last-child").each(function(){ $(this).removeClass("line"); });
		$(".sf-menu li ul li:last-child").each(function(){ $(this).removeClass("underline"); });
		
		$(".sf-menu li:last-child").each(function(){ $(this).addClass("lastline"); });
		
		$("#tabs ul").each(function(){ $(this).removeClass("hideul"); });
		$("#tabs div").each(function(){ $(this).removeClass("mb1"); });
	



			$('.rounded').cornerz({ radius: 6 });
			//$('.top-rounded').cornerz({ radius: 6, corners: "tl tr" })
			//$('.bottom-rounded').cornerz({ radius: 6, corners: "bl br" })
			//$('#tabs').cornerz({ radius: 6 })
			//$('#tabs ul li a').cornerz({ radius: 6, corners: "tl tr" });
			//$('#tabs-media').cornerz({ radius: 6 })
			//$('#tabs-media ul li a').cornerz({ radius: 6, corners: "tl tr" });


	if ($.browser.msie && $.browser.version.substr(0,1)<7) {
	}else{
	   //$('form').jqTransform({imgPath:'jqtransformplugin/img/'});
	}
});
	
//detect 'faulty' mac installs of FFand fix menu
var cssURL = "/css/";
jQuery.each(jQuery.browser, function(i, val) {
	if(i=="mozilla" && jQuery.browser.version.substr(0,8)<"1.9.0.15")
	$('head').append('<link rel="stylesheet" type="text/css" href="'+cssURL+'faulty-firefox.css" />');
});

if ($.browser.msie && $.browser.version.substr(0,1)<7) {
	DD_belatedPNG.fix('img');
	DD_belatedPNG.fix('a');
	DD_belatedPNG.fix('a span');
	DD_belatedPNG.fix('select');
	DD_belatedPNG.fix('input');
	DD_belatedPNG.fix('#brown-panel');
}

function jumpto(x){
	if (document.form1.jumpmenu.value != "null") {
	document.location.href = x
	}
}

// Stub for old Spry panels to stop JS errors when invoked in content 
var Spry;
if (!Spry) Spry = {};
if (!Spry.Widget) Spry.Widget = {};
Spry.Widget.TabbedPanels = function(element, opts) {}
