<?php

	$distinct = true;

	$files = array(
		"jquery.min.js",
		"bootstrap.js",
		"jquery.ui.min.js",
		"jquery.ui.touch-punch.js",

		"jquery.prettyPhoto.js",
//		"jquery.migrate.js",
		"jquery.uniform.js",
		"jquery.chosen.min.js",
		"jquery.jgrowl.min.js",
		"jquery.easing.js",
		"jquery.elastic.js",
		"jquery.uploadifive.js",
		"jquery.mt-select.js",
		"jquery.imagesloaded.js",
		"jquery.plupload.full.min.js",
//		"jquery.plupload.queue.js",
		"jquery.ui.plupload.js",

		"moment.js",
		"bootstrap.datetimepicker.en-gb.js",
		"bootstrap.datetimepicker.js",


		"jquery.uix.multiselect.js",
		"jquery.uix.multiselect_en.js",
		"jquery.fu.iframe-transport.js",
		"jquery.fu.fileupload.js",

		"cropper.min.js",


		"../template.js",

		"old.common.js",

		"functions.js",
		"custom.forms.js",
		"custom.login.js",
		"custom.help.js",
		"custom.seo.js",
		"custom.nav.js",
		"custom.tables.js",
		"custom.fileupload.js",

		"jquery.colorpicker.js",
		"jquery.ui.colorpicker-rgbslider.js",
		"jquery.ui.colorpicker-memory.js",

		"jquery.isotope.js",

		//extra plugins to be cached


		//"../flot/excanvas.min.js",
		"../flot/jquery.flot.min.js",
		"../flot/jquery.flot.canvas.min.js",
		"../flot/jquery.flot.stack.min.js",
		"../flot/jquery.flot.categories.min.js",
		"../flot/jquery.flot.navigate.min.js",
		"../flot/jquery.colorhelpers.min.js",
		"../flot/jquery.flot.symbol.min.js",
		"../flot/jquery.flot.pie.min.js",
		"../flot/jquery.flot.image.min.js",
		"../flot/jquery.flot.selection.min.js",
		"../flot/jquery.flot.threshold.min.js",
		"../flot/jquery.flot.time.min.js",
		"../flot/jquery.flot.resize.min.js",
		"../flot/jquery.flot.crosshair.min.js",
		"../flot/jquery.flot.fillbetween.min.js",
		"../flot/jquery.flot.errorbars.min.js",

/*		
		"../flot/jquery.flot.min.js",
		
		"../flot/jquery.colorhelpers.min.js",
		"../flot/jquery.flot.canvas.min.js",
		"../flot/jquery.flot.categories.min.js",
		"../flot/jquery.flot.crosshair.min.js",
		"../flot/jquery.flot.errorbars.min.js",
		"../flot/jquery.flot.fillbetween.min.js",
		"../flot/jquery.flot.image.min.js",
		"../flot/jquery.flot.navigate.min.js",
		"../flot/jquery.flot.pie.min.js",
		"../flot/jquery.flot.resize.min.js",
		"../flot/jquery.flot.selection.min.js",
		"../flot/jquery.flot.stack.min.js",
		"../flot/jquery.flot.symbol.min.js",
		"../flot/jquery.flot.threshold.min.js",
		"../flot/jquery.flot.time.min.js",	
*/

	);

	error_reporting(0);

	foreach ($files as $key => $val) {
		if ($distinct) {
			$content .= "document.write('<script src=\"assets/js/{$val}\"></script>');";
		} else 	
			$content .=  "\n" . file_get_contents( $val);
	}


	header("Content-type: application/x-javascript");
	header("Cache-Control: max-age=2692000, public");

	header("Content-Length: ".strlen($content)); 
	echo $content;
	die();
	

?>