<?php
global $website_options;
include 'views/_header.tpl.php';
?>
<link rel="stylesheet" href="/static/css/jquery.datetimepicker.css"/>
<script src='/static/js/jquery.datetimepicker.js'> </script>
<!--<script src="/3rdparty/ckeditoradv/ckeditor.js"> </script>-->
<script src="/3rdparty/ckeditor/ckeditor.js"> </script>
<script src='/static/js/googlemaps/GoogleMapsProject.js'> </script>
<!--<script src='/static/js/googlemaps/GoogleMapsProject.js'> </script>-->

<style type="text/css">
.form .txt {
	background: #eee !important;
	border: 0px;
}
div.spacer { padding-top: 57px; }
#map-canvas { width: 100%; }
.hidden {display: none;}
h1, h2, h3, h4, h5, h6 { 
	font-family: Montserrat,'Open Sans',Raleway,Helvetica,sans-serif; 
	font-weight:300; 
}
h2 {
	line-height: 28px;
}
.container_12.splitintwo {
	width: 60%;
	float: left;
}
.container_12.splitintwor {
	width: 35%;
	float: right;
}
.container_12.splitintwos {
	width: 48%;
	float: left;
}

/*.container_12.splitintwo {
    width: 48%;
    float: left;
}*/

/*******************************/

.coupon-wrapper {
    position: fixed;
	/*padding-left:20px;*/
	max-width:332px;
}
.coupon-realtime {
	/*width:428px;*/
	width:300px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1),
                0 0 2px rgba(255,255,255,0.1) inset,
                0 1px 2px rgba(255,255,255,0.2) inset;
    background: #ffffff;
	padding:15px;
}
.coupon-realtime .coupon-image {
    /*float: left;*/
    width: 100%;
	/*margin-right:10px;*/
}
.coupon-realtime .coupon-content {
    float: left;
    width: 300px;
    padding: 5px;
	margin-top:10px;
	font-family:Montserrat, 'Open Sans',Helvetica, sans-serif;
}
.coupon-realtime .coupon-content h3,
.coupon-realtime .coupon-content p {
    margin-bottom: 3px;
    margin-top: 0px;
}

.form .row-item .lbl {
	float: left;
	padding-top: 12px;
	width: 177px;
	text-align: right;
}

/*******************************/

.row-item.submit-wrapper {
    padding-left: 30%;
}

#termsdiv {
	padding-top: 20px;
}

#spaceit {
	padding-bottom: 0px;
}

	/* ###################################################### */
	/* ####### The Switch - the box around the slider ####### */
	/* ###################################################### */

	.switch {
		position: relative;
		display: inline-block;
		width: 60px !important;
		height: 32px;
	}

	/* Hide default HTML checkbox */
	.switch input {
		display: none;
	}

	/* The slider */
	.sliderr {
		position: absolute;
		cursor: pointer;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #ccc;
		-webkit-transition: .4s;
		transition: .4s;
	}

	.sliderr:before {
		position: absolute;
		content: "";
		height: 28px;
		width: 28px;
		left: 2px;
		bottom: 2px;
		background-color: white;
		-webkit-transition: .4s;
		transition: .4s;
	}

	input:checked + .sliderr {
		background-color: #98cb54;
	}

	input:focus + .sliderr {
		box-shadow: 0 0 1px #98cb54;
	}

	input:checked + .sliderr:before {
		-webkit-transform: translateX(28px);
		-ms-transform: translateX(28px);
		transform: translateX(28px);
	}

	/* Rounded sliders */
	.sliderr.round {
		border-radius: 32px;
	-moz-border-radius: 32px;
	-webkit-border-radius: 32px;
	}

	.sliderr.round:before {
		border-radius: 50%;
		-moz-border-radius: 50%;
		-webkit-border-radius: 50%;

	}
	/* ##################################################### */
	/* ##############     The Switch ENDS     ############## */
	/* ##################################################### */ 
	
	.ck-editor__editable_inline, .ck-editor__editable, .ck.ck-editor__main .ck-content, .ck.ck-editor, .ck-content, .cke_contents {
		max-height: 200px !important;
		height: 200px !important;
	}

/******************************************************************************/
/*********************     MOBILE STYLES START HERE      **********************/
/******************************************************************************/ 

@media (max-width: 600px) {
    .container_12.splitintwo {
        width: 96%;
        float: none;
    }
    .coupon-wrapper { position: relative; }
    .coupon-realtime { margin:auto; }
	.home-feature-category .marked-category {margin-bottom: 0px !important; }
	.container_12.splitintwo, .container_12.splitintwor {
		width: 96%;
		float: none;
		border-right: 0px solid #ddd;
	}
	.coupon-realtime {
		width: 300px;
	}
	.coupon-wrapper {
		position: relative;
		padding-left: 0px;
	}
	.coupon-realtime .coupon-image {
		float: left;
		width: 80px;
		margin-right: 10px;
	}
	.coupon-realtime .coupon-content {
		float: left;
		width: 160px;
		padding: 5px;
	}
	#map-canvas {
		width: 96%;
	}
	.form .txt {
		width: 150px;
	}
	input[type="text"].txt {
		width: 150px;
	}
	.home-feature-category .marked-category {
		margin-bottom: 0px !important;
	}
	.coupon-realtime {
		margin: auto;
	}
	.form .row-item {
		padding-bottom: 5px;
	}
	.form .row-item .lbl .lblsms {
		display: none;
	}
	.form .row-item .val {
		margin-left: 0px; /* was 193px */
	}
	.form .row-item .lbl {
		float: left;
		padding-top: 12px;
		padding-bottom:7px;
		width: 100%; /* was 177px */
		text-align: left;
	}
	#descriplabel {
		padding:0px; height:10px;
	}
	#descriplabel2 {
		display: none;
	}
	.row-item.submit-wrapper {
		padding-left: 0%;
	}
	.form .description-input {
		font-family: 'Open Sans', sans-serif;
		font-weight: 300;
		font-style: italic;
		color: #999;
	}
	#termsdiv {
		padding-top: 0px;
	}
	#spaceit {
		padding-top:10px;
		padding-bottom: 10px;
	}
	.mtext {
		font-size: 17px;
	}
	/* ############# PREVIEW FEATURE ############# */
	.coupon-realtime .coupon-image {
		float: none;
		display:block;
		width: 100%;
		/* margin-right: 10px; */
	}
	.coupon-realtime .coupon-content {
		float: none;
		width: 100%;
		padding: 0px;
	}    
	.fileUpload {
		padding: 5px 15px 8px;
	}
}
</style>

    <form method="post" enctype="multipart/form-data">
    <div class="home-feature-category" style="background:none; border:none;">
        <div class="container_12 splitintwo">
			<div class="grid_12 marked-category form tab-content active" style="margin-bottom:0px;">

				<h1 style="padding:0 10px; line-height:34px; margin-bottom:0px">
					<a href="/category/all" style="float:left;">
						<img src="/static/images/icons/back_arrow_button.png"
						alt="<" style="height:25px; width:25px; margin-top:-5px; margin-right:7px;"
						 align="middle" /></a>
						<span style="font-weight:500">Create a new Opp</span>
                </h1>
                <br />
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_bio" style="padding-top:17px;">Opp Type:</label>
					<div class="val" style="margin-top:6px;">
						<select name="type_id" class="txt" style="height:48px; line-height:48px; 
						font-size:17px; font-weight:300; max-width:390px; width:100% !important">
							<?php foreach ($types as $type) : ?>
							<option value="<?= $type['id'] ?>">&nbsp;<?= $type['title'] ?></option>
							<?php endforeach; ?>
						</select>
						<p class="rs description-input"></p>
					</div>
				</div>
				
				<?php
					$categoryModel = new categoryModel();
					$categories = $categoryModel->getList();
				?>
				<div class="row-item clearfix" style="display:nonex;">
					<label class="lbl" for="txt_name1">Category:</label>
					<div class="val">
						<select name="category_id" class="txt" style="height:48px; line-height:48px; 
						font-size:17px; font-weight:300; width:100% !important; max-width:390px">
							<option value="">Please select a Category</option>

							<?php
								foreach ($categories as $category) :
									$sel = $project['category_id'] == $category['id'] ? ' selected="selected"' : ''; ?>
									<option value="<?= $category['id'] ?>" <?= $sel ?> 
										data-update-variable="category"><?= $category['title'] ?></option>
							<?php endforeach; ?>

						</select>
						<p class="rs description-input"></p>
					</div>
				</div>
				
				<div class="row-item clearfix images">
					<label class="lbl" for="txt_name1">Image:</label>

					<div class="val">
						<div>
							<div class="fileUpload">
								<!--<span>Upload</span>-->
								<!-- REMOVED data-type="image" -->
								<input type="file" class="image" data-type="image" 
								onchange="updateCouponImage(this)" />
							</div>
							<span class="maxsize">(max size: 10MB*)</span>
							<div style="clear:both"></div>
						</div>
					</div>
				</div>

                <div class="row-item clearfix">
                    <label class="lbl" for="txt_name1">Opp Title/Goal:</label>
                    <div class="val">
                        <input class="txt" type="text" name="title" data-update-variable="title"
						style="min-width:250px; max-width:900px;
						font-size:17px; font-weight:300; width:100% !important">
						<p class="rs description-input" style="color:#dd0000;">
							tip: treat this like a quick description of your opportunity or goal
						</p>
                    </div>
                </div>
                
				<div class="row-item clearfix" id="spaceit" style="">
					<label class="lbl" for="txt_name1" id="descriplabel">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<span style="color:#000; font-weight:500; margin:0px 0 0px; font-weight:300;">
							Description/Requirements for your FlipMob Opp
						</span>
					</div>
				</div>     
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1" id="descriplabel2">&nbsp;</label>
					<div class="val">
						<textarea id="description" name="description" class="ckeditor"
							data-update-variable="description" 
							style="width:80%; min-height:100px; max-height:130px; font-size:17px;
							line-height:27px;"></textarea>
						<p class="rs description-input"></p>
					</div>
				</div>
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Tags:</label>
					<div class="val">
						<input class="txt" type="text" name="tags" data-update-variable="tags"
						onkeyup="countChar(this)" id="keywords" maxlength="55" 
						style="min-width:250px; max-width:900px;
						font-size:17px; font-weight:300; width:100% !important">
						<p class="rs description-input">ie. bulk, discount, min. spend, 
						goal, mission, etc.</p>
						
						<div style="display:inline-block; width:auto; margin-top:5px; 
						min-width:150px;">
							<div id="keywordscount" style="width:40px; text-align:center; 
							background:#EA0000; color:#fff; font-weight:300; display:inline-block; 
							border-radius:4px; -moz-border-radius:4px; 
							-webkit-border-radius:4px;">55</div>
							<div style="display:inline-block; 
							font-weight:300;">55 character limit</div> 
						</div>
					</div>
				</div>
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Amount Needed ($):</label>
					<div class="val">
						<input class="txt" type="text" name="budget" value="<?= $project['budget'] ?>"
						style="min-width:250px; font-size:17px;" placeholder="100"
						data-update-variable="budget">
						<p class="rs description-input" style="color:#ff0000;">How much it&rsquo;ll
							cost to carry out.</p>
					</div>
				</div> 
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Opportunity ($):</label>
					<div class="val">
						<input class="txt" type="text" name="opportunity" value="<?= $project['opportunity'] ?>"
						style="min-width:250px; font-size:17px;" placeholder="100"
						data-update-variable="opportunity">
						<p class="rs description-input" style="color:#ff0000;">
							How much this could generate.
						</p>
					</div>
				</div> 
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">My Contr. ($):</label>
					<div class="val">
						<input class="txt" type="text" name="tamount" value="<?= $project['tamount'] ?>"
						style="min-width:250px; font-size:17px;" placeholder="5+"
						data-update-variable="tamount">
						<p class="rs description-input" style="color:#ff0000;">Amount I can contribute.</p>
					</div>
				</div> 
				
<!--				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Min. Spend ($):</label>
					<div class="val">
						<input class="txt" type="text" name="specific_fee" value="<?= $project['specific_fee'] ?>"
						style="min-width:250px; font-size:17px;" placeholder="5+">
						<p class="rs description-input" style="color:#ff0000;">Optional</p>
					</div>
				</div> -->
			
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Min. Buy-in ($):</label>
					<div class="val">
						<input class="txt" type="text" name="price" value="<?= $project['price'] ?>"
						style="min-width:250px; font-size:17px;" placeholder="1+">
						<p class="rs description-input" style="color:#ff0000;">Minimum Mobbers must contribute</p>
					</div>
				</div> 
				
				<div class="row-item clearfix" style="padding-bottom: 20px;">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500; margin-bottom:0px;">
							Attachments (Optional)
						</h2>
						<span class="mtext" style="color:#000; font-weight:500; margin:0px 0 10px">
						Attach Important Notes, Documentation, NDA, Contract, etc.
						</span>
					</div>
				</div>

				<div class="row-item clearfix files">
					<label class="lbl" for="txt_name1">Attach Downloadable File(s):</label>
					<div class="val">
						<div>
							<div class="fileUpload">
								<span>Upload</span>
								<input type="file" class="upload" data-type="file" />
							</div>
							<span class="maxsize">(max size: 10MB*)</span>
							<div style="clear:both"></div>
						</div>
					</div>
				</div>
                
				<div class="row-item clearfix" id="termsdiv" style="border-top:3px solid #03b5ff; margin-top:20px">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500;">
							Real-Time Notification Alerts (Optional)
						</h2>
						<span class="mtext" style="color:#000; font-weight:300; margin:0px 0 10px">
							Get alerts whenever there&rsquo;s activity in your flip mob.
							<i>Note: Simply delete email and/or phone to turn off.</i>
						</span>
					</div>
				</div>  
                
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Email:</label>
					<div class="val">
						<input class="txt" type="text" name="email" value="<?php
						if (!empty($_SESSION['user']['email'])) {
							echo $_SESSION['user']['email']; } ?>"
						style="min-width:250px; font-size:17px; font-weight:300" placeholder="youremail@somesite.com">
						<p class="rs description-input" style="color:#ff0000;"></p>
					</div>
				</div> 
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Phone:</label>
					<div class="val">
						<input class="txt" type="text" name="phone" value="<?php
						if (!empty($_SESSION['user']['phone'])) {
							echo $_SESSION['user']['phone']; } ?>"
						style="min-width:250px; font-size:17px; font-weight:300" placeholder="###-###-####">
						<p class="rs description-input" style="color:#ff0000;">for receiving 
						Text Message Notifications</p>
					</div>
				</div> 

            </div><!--end: .marked-category -->
            <div class="clear"></div>
        </div> <!--end: .container_12 -->

		<!-- ################################################ -->
		<!-- ########## FIXED COLUMN ON THE RIGHT ########### -->
		<!-- ################################################ -->
		
        <div class="container_12 splitintwor clearfix">
			<!--<button type="button" id="getDataBtn">Get Data</button>-->
        
			<div class="coupon-wrapper" style="margin:0 auto;">
                <h2>Preview of your Opp</h2>
                <div class="coupon-realtime">
	                        
					<div class="coupon-image"><img src="/static/client/default_event_img.png" 
					data-variable="image" alt="Img" style="width:100%; height:auto;" /></div>
                    
                    <div class="coupon-content"><!-- DARK BLUE 005089 -->
						<div style="width:100%; max-height:88px; overflow:hidden; margin-bottom:10px">
							<span style="font-weight:bold; color:#00A1FE; text-transform: uppercase; 
								font-family:Montserrat, 'Open Sans',Helvetica, sans-serif; font-size:17px;"
	                        data-variable="title"><?= $project['title'] ?></span>
                        </div>
                        
                        <div class="clear"></div>
                        
						<div style="width:100%; max-height:88px; overflow:hidden; margin-bottom:7px">
							<p id="regTitle"></p>
						</div>
						
						<div style="height:25px; overflow:hidden; line-height:25px">
							<span style="font-weight:300; color:#00A1FE; text-transform: lowercase;
							font-family:Montserrat, 'Open Sans',Helvetica, sans-serif; font-size:14px;"
							data-variable="tags"><?= $project['tags'] ?></span>
						</div>
						<div class="clear"></div>
                        
						<div style="background:none; float:left; width:100px; height:25px;
						font-weight:600; text-align:left; padding:0px 10px 0 0px; 
						line-height:25px; margin-top:5px;">
							OPPORTUNITY:
						</div>
						
						<div style="background:none; position:relative; float: none; overflow: hidden; 
							height:25px; line-height:25px; margin-top:5px;">

							<span style="color:#298a39; font-weight:600;
							font-size:15px;">$</span><span style="color:#298a39; font-weight:600; 
							font-size:15px;" data-variable="opportunity" class="numbers"></span> for

							<span style="color:#298a39; font-weight:600;
							font-size:15px;">$</span><span style="color:#298a39; font-weight:600; 
							font-size:15px;" data-variable="budget" class="numbers"></span>
							
						</div>
                        
						<!--<div style="font-weight:bold; color:#000; margin-top:10px; margin-bottom:10px;
						font-family:Montserrat, 'Open Sans',Helvetica, sans-serif; font-size:15px;"
						data-variable="description">
							<?= $project['description'] ?>
						</div>
						<div class="clear"></div>-->
						 <!--<span>0.00 Miles away</span><br />-->
						 
<!--						 <div style="background:none; float:left; width:50px; margin:0; height:25px; 
							 font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						 	WHEN
						 </div>

						 <div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
							 line-height:25px;">
							 
							 <span style="color:#005089;"
								 data-variable="timestamp_end"><?= date(' M d, Y'); ?></span>
							 	g:i a \o\n m/d/y 
						 </div>
						 
						 <div class="clear"></div>
						 
						 <div style="background:none; float:left; width:50px; margin:0; height:25px;
							 font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						 	PICKUP
						 </div>

						 <div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
							 line-height:25px;">
							 <img src="/static/images/google_maps_icon/office-marker.png" alt="Map"
							 style="height:20px; margin-top:-3px"> <span style="color:#005089;"
							 data-variable="location"><?= $project['location'] ?></span>
						 </div>
						 
						 <div class="clear"></div>
						 
						 <div style="background:none; float:left; width:50px; margin:0; height:25px;
							 font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						 	DEST.
						 </div>

						 <div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
							 line-height:25px;">
						 	<img src="/static/images/google_maps_icon/office-marker.png" alt="Map"
						 	style="height:20px; margin-top:-3px"> <span style="color:#005089;"
						 	data-variable="location2"><?= $project['location'] ?></span>
						 </div>
-->
						 <!--<div class="clear"></div>-->
						 
<!--						 <div style="background:none; float:left; width:50px; margin:0; height:25px;
							 font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						 	HOST
						 </div>

						 <div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
							 line-height:25px;">
							 <?= $project['user']['name'] ?>
						 </div>-->
						 
						 <div class="clear"></div>

                    </div>
                    <div class="clear"></div>
                </div>
            </div>
        </div>

        <div class="clear"></div>

    </div><!--end: .home-feature-category -->
    <div class="home-feature-category" style="background:none; border:none;">
        <div class="container_12 splitintwo clearfix">
			<input type="hidden" name="project_type_id" value="<?= projectModel::TYPE_JOB ?>" />
            <div class="row-item clearfix submit-wrapper">
                <label class="lbl" for="txt_name1">&nbsp;</label>
				<div class="val" style="display:nonex;">
                    <!--* to upload additional images just keep clicking upload button.-->
                    <br /><br />
                    <input class="btn btn-black" type="submit" />
                    <br /><br />
					<div style="max-width:90%; margin:0 auto; font-size:15px; line-height:23px; padding:0 10px;
					color:#777; font-weight:300; text-align:center;">
						<i>Note: You can go back and edit all your Details easily after posting.</i>
					</div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div><!--end: .home-feature-category -->
    </form>

    <br /><br />
    
    <?php include 'views/_footer_m.tpl.php'; ?>
    
    

<script type="text/javascript">
	function updateCouponImage(input){
	    if (!input.files || !input.files[0])
	        return false;

	    var reader = new FileReader();
	    reader.onload = function(e)
	    {
	        $("[data-variable='image']").attr("src", e.target.result);
	    }
	    reader.readAsDataURL(input.files[0]);
	}

	function countChar(val){
		var len = val.value.length;
		if (len >= 55) {
			c
		} else {
			$('#keywordscount').text(55 - len);
		}
	};

$(document).ready(function(){
	var specialty_text = $('#keywords').val();
	var specialty_text_length = $('#keywords').val().length;

	if (specialty_text_length < 55) {
		$('#keywordscount').text(55 - specialty_text_length);
	}
	//ckeInst.on('blur', function(e) {
	//	alert('Updated...');
	//});
//	var content_editor = CKEDITOR.instances['description'];
//
//	content_editor.on( 'key', function() {
//		//change_page = true;
//		alert('updated');
//	});
	//CKEDITOR.instances[i].updateElement();
//	$(".numbers").each(function() {
//		$(this).format({format:"#,###", locale:"us"});
//	});
	
    $("[data-update-variable!='']").each(function(){
        var elm_input  = $(this);
        elm_input.on("keyup change", function()
        {
            var variable   = elm_input.attr("data-update-variable"); // budget
            var elm_update = $("[data-variable='" + variable + "']");
            var attribute  = elm_update.attr("data-attribute");
            
			//alert(budgettest);
            
			//var editorData= CKEDITOR.instances['description'].getData();

			if (! attribute)
				//alert('Text');
                // update HTML
				// .toLocaleString()
				if (variable == "budget") {
					var budg = elm_input.val();
					//alert('Budget: ' + budg);
					var budgy = Number(budg).toLocaleString();
					//alert('Budget: ' + budgy);
					elm_update.html(budgy);
				} else if(variable == "opportunity") {
					var tamt = elm_input.val();
					//alert('T Amt: ' + tamt);
					var tamtf = Number(tamt).toLocaleString();
					//alert('Budget: ' + budgy);
					elm_update.html(tamtf);				
				} else {
					elm_update.html(elm_input.val());	
				}
                
				//descrippreview.html(evt.editor.getData());
				//var desc = CKEDITOR.instances.description.getData();
				//alert(desc);
			else
				//alert('Here');
                // update the attribute's data
                elm_update.attr(attribute, elm_input.val());
        });
    });
	
	$(".datepicker").datetimepicker({
		hours24: true,
		format: 'Y-m-d',
		formatDate: 'Y-m-d',
		datepicker: true,
		timepicker: false,
	});

	$(".timepicker").datetimepicker({
		hours24: true,
		format: 'Y-m-d H:i:s',
		formatTime: 'h:i',
		timepicker: true,
		datepicker: true,
		timepickerScrollbar: true,
		step: 30
	});
});
</script>

<script type="text/javascript">
	//CKEDITOR.replace( 'description' );
	var editor = CKEDITOR.replace( 'description' );
	var descripcontent;
	// The "change" event is fired whenever a change is made in the editor.
	editor.on( 'change', function( evt ) {
		// getData() returns CKEditor's HTML content.
		//alert('Yep');
		descripcontent = evt.editor.getData();
		//alert('D: ' + descripcontent);
		//descrippreview.html(descripcontent);
		$("#regTitle").html(descripcontent);
		//descrippreview.html(evt.editor.getData());
		//console.log( 'Total bytes: ' + evt.editor.getData().length );
	});
	$(document).ready(function() {

		$("#getDataBtn").click(function() {
			//var editorData= CKEDITOR.instances['description'].getData();
			//alert(" your data is :"+editorData);
			//alert('clicked');
		})
	});
</script>

<?php if ($is_ajax) : ?>
<script type="text/javascript">
	//CKEDITOR.replace( 'description' );
</script>
<!--<script src='/static/js/googlemaps/GoogleMapsProject.js'></script>-->
<script type="text/javascript">loadScript()</script>
<?php endif; ?>