// JavaScript Document
function pdfstyle (str){
	return '<span class="pdf_size">' + str + '<\/span>';
};
//var str = /\([a-zA-Z]{3}[\s][0-9]{2,4}[.]?[0-9]?[\s][a-zA-Z]{2}\)/;

$(document).ready(function() {
	$("a").filter(":has(img)").css("border", "none");
	
	$(".menu1 > li:has('ul')").not(":has('.active')").children("a").css({
		'background-image' : 'url(http://www.mpp.nsw.gov.au/__data/assets/image/0004/147352/arrow-right.gif)',
		'background-position' : '186px 8px',
		'background-repeat' : 'no-repeat' })
	
	
	$(".menu1 > li:has('ul')").children("a.active").css({
		'background-image' : 'url(http://www.mpp.nsw.gov.au/__data/assets/image/0003/147351/arrow-down.gif)',
		'background-position' : '186px 8px',
		'background-repeat' : 'no-repeat' })
	
	// PDF Style
	$("body *").replaceText( /[\s]kb\)/gi, "kb)" );
	$("body *").replaceText( /[\s]mb\)/gi, "mb)" );
	$("body *").replaceText(/\([a-zA-Z]{3}[\s][0-9]{1,4}[.]?[0-9]?[0-9]?[\s]?[a-zA-Z]{2}\)/gi, pdfstyle );
	$("body *").replaceText(/\(pdf\)/gi, pdfstyle );
	$("body *").replaceText(/\(doc\)/gi, pdfstyle );
	$("body *").replaceText(/\(tif\)/gi, pdfstyle );
	$("body *").replaceText(/\(xml\)/gi, pdfstyle );
	$("body *").replaceText(/\(xls\)/gi, pdfstyle );

});
