modelfilestrs['pdf'] = hereDoc(function(){/*!
<script type="text/javascript">

	
	// pageChanged & sizeChanged functions are needed in every model file
	// other functions for model should also be in here to avoid conflicts
	var pdf = new function() {		
		var $pageContents;

		// function called every time the page is viewed after it has initially loaded
		this.pageChanged = function() {
			pdf.setUp();
		}
		
		// function called every time the size of the LO is changed
		this.sizeChanged = function() {
			if (x_browserInfo.iOS == true) {
				this.setUp();
			} else {	
				$("#pdfDoc").height(pdf.calcHeight());
			}
		}
		
		this.init = function() {
			$pageContents = $("#pageContents");
			
			var textContents = x_addLineBreaks(x_currentPageXML.getAttribute("text")),
				pdfWidth = x_currentPageXML.getAttribute("pdfWidth");
			
			// Full screen or not?
			console.log([pdfWidth, textContents]);
			if (pdfWidth == undefined || pdfWidth == "" || textContents == undefined || textContents == "") {
				pdfWidth = "full";
			}
			console.log([pdfWidth, textContents]);

			// Set the with of the pdf
			if (pdfWidth == "full") {
				$("#pageContents .panel").appendTo($pageContents);
				$("#pageContents .splitScreen").remove();
			}
			else {
				$("#textHolder").html(textContents);
				if (pdfWidth == "small") {
					$("#pageContents .splitScreen").addClass("large"); // make text area on left large so panel on right is small
				} else if (pdfWidth == "large") {
					$("#pageContents .splitScreen").addClass("small");
				} else {
					$("#pageContents .splitScreen").addClass("medium");
				} 
			}

			pdf.setUp();
			x_pageLoaded();
		}
		
		this.setUp = function() {
			if (x_browserInfo.iOS == true) {
				$("#pdfPage").html('<div id="pdfCover" /><object onload="pdf.createCover()" "id="pdfDoc" data="' + x_evalURL(x_currentPageXML.getAttribute("url")) + '" type="application/pdf" width="' + pdf.calcWidth() + '" height="auto"><param name="src" value="' + x_evalURL(x_currentPageXML.getAttribute("url")) + '"></object>');
			} else {
				$("#pdfPage").html('<object id="pdfDoc" data="' + x_evalURL(x_currentPageXML.getAttribute("url")) + '" type="application/pdf" width="100%" height="' + pdf.calcHeight() + '"><param name="src" value="' + x_evalURL(x_currentPageXML.getAttribute("url")) + '"></object>');
			}
		}
		
		this.createCover = function() {
			setTimeout(function(){
				$("#link").remove();
				$("#pdfCover").css({
					width:	$("#pdfPage").width(),
					height: $("#pdfPage").height()
				});
				$("#pdfPage").append('<div id="link"><hr/><a id="pdfLink" href="' + x_evalURL(x_currentPageXML.getAttribute("url")) + '" target="_blank">' + (x_currentPageXML.getAttribute("open") == "" || x_currentPageXML.getAttribute("open") == undefined ? "Open PDF" : x_currentPageXML.getAttribute("open")) + '</a></div>');
			}, 1);
		}
		
		this.calcWidth = function() {
			return $x_pageHolder.width() - 10;
		}
		
		this.calcHeight = function() {
			var height;
			
			if (x_browserInfo.mobile == false) {
				height = $x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3;
			} else {
				height = $x_mobileScroll.height() - $x_headerBlock.height() - $x_footerBlock.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - 3;
			}

			return height;
		}
	}
	
	pdf.init();
	
</script>

<style type="text/css">

	#pdfCover {
		background-color:	rgba(255,0,0,0);
		position:	absolute;
	}
	
	#pdfDoc {
		border:	2px solid transparent;
	}
	
	#pdfDoc.focus {
		border-color:	orange;
	}
	
	#pdfLink {
		font-size:		1.5em;
		font-weight:	bold;
	}
	
	#pdfPage hr {
		border: none;
		background-color: #CCCCCC;
		height: 1px;
	}
	
</style>

<div id="pageContents">
	
	<div class="splitScreen">
		
		<div id="textHolder" class="left">
			
		</div>
		
		<div class="right">
			<div class="panel">
				<div id="pdfPage"></div>
			</div>
		</div>
		
	</div>
	
</div>


*/});