<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Jaggery - Delicious Javascript</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding-top: 60px;
        }
    </style>
    <link href="css/prettify.css" rel="stylesheet">
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="images/favicon.ico">
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72"
          href="images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114"
          href="images/apple-touch-icon-114x114.png">
</head>

<body>

<%
include('/includes/topnavi.jag');
%>

<div class="container">

    <!-- Main hero unit for a primary marketing message or call to action -->
    <div class="hero-unit" style="height:100px;">
			<span class="main-left"><img src="images/jaglogo.png" alt=""/><!--<h1 style="color:#391600; font-size:80px; margin-bottom:10px;">Jaggery.js</h1>-->
			<p align="center">The delicious Javascript framework</p>
            </span>
			<span class="main-right">
				<a class="btn success large" href="http://dist.wso2.org/products/jaggery/dl/jaggery-1.0.0-SNAPSHOT_M5.zip">Download Jaggery (ALPHA) </a> <a class="btn primary large"
                                                                           href="documentation.jag">Documentation</a>
			<span class="help-block" style="margin-top:10px;">0.9.0-SNAPSHOT of Jaggery released !</span>
            </span>
    </div>

    <!-- Example row of columns -->
    <div class="row">
        <div class="span16">
            <div class="page-header">
                <h1>
                    Introducing Jaggery
                </h1>
            </div>

            <p>Jaggery is a framework to write webapps and HTTP-focused web services for all aspects of the application: 
			front-end, communication, Server-side logic and persistence in pure Javascript. One of the intents of this 
			framework is to reduce the gap between writing web apps and web services. 
			<em><u>Importantly,</em></u> Jaggery is open-source and released under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache 2.0</a></p>

            <p>As a pure Javascript server-side scripting engine, Jaggery combines all the strengths of Javascript with
                <u><em> flexibility</em></u> and <u><em>freedom</em></u> at both the development and deployment stages. Most JavaScript webapp development
                mechanisms restrict developers to a framework-specific structure or patterns, which demand an additional
                learning curve. By contrast, with Jaggery, any developers who are versed in Javascript have everything
                they need to get going.</p>
				


            <!--p>This Framework uses <code>Mozilla Rhino</code> to process Javascript at the server and also contains a
                <code>powerful caching layer</code> with the support of <code>Rhino compiled
                    scripts</code>; so its as fast as the JVM. As few key features, Jaggery
                has <code>native JSON support</code> and also <code>E4X support</code> for XML manipulation.</p-->

            <h3>Say Hello to Jaggery</h3>

				<pre class="prettyprint linenums" id="indexsample">
&lt;html&gt;
    &lt;body&gt;
        &lt;h1&gt;
        &lt%
            var name = 'Jaggery';
            print("Hello " + name);
        %&gt
        &lt;/h1&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre>

            <%
            var codeSnip = encodeURIComponent('&lt;html&gt; \n  &lt;body&gt; \n &lt;h1&gt; \n &lt% \n var name = "Jaggery"; \n print("Hello " + name); \n %&gt \n &lt;/h1&gt; \n &lt;/body&gt; \n &lt;/html&gt;');
            var urlString = 'tryitframe.jag?code='+codeSnip;
            %>

            <div id="tryitwindow" class="modal hide fade">
                <div class="modal-header">
                    <a href="#" class="close">&times;</a>

                    <h3>Try it now</h3>
                </div>
                <div class="modal-body">
                    <iframe src="<%=urlString%>" style="border: none;" width="98%"
                            scrolling="no" height="520px"></iframe>
                </div>

            </div>

            <p align="right">
                <span class="help-inline">Click on "try it now" to execute the code above</span> <button class="btn primary" data-keyboard="true" data-backdrop="true"
                        data-controls-modal="tryitwindow">Try it now
                </button>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="span16">
            <h5>More about Jaggery.js</h5>
            <br>
            <ul class="hotlinks">
                <li style="border-left:none;"><a href="documentation.jag"><img src="images/icon-docs.png" alt=""></a>
                    <a href="documentation.jag" class="linktext">Documentation</a> <br>
                    <span>API Documentation</span>
                </li>
                <li><a href="howto.jag"><img src="images/icon-howto.png" alt=""></a>
                    <a href="howto.jag" class="linktext">Quick Start</a> <br>
                    <span>Details on Usage of Jaggery</span>
                </li>

                <li><a href="samples.jag"><img src="images/icon-try.png" alt=""></a>
                    <a href="samples.jag" class="linktext">Samples</a> <br>
                    <span>Sample Jaggery Apps</span>
                </li>
                <li><a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank"><img src="images/icon-apache.png" alt=""></a>
                    <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank" class="linktext">License</a> <br>
                    <span>Licensed under Apache 2.0</span>
                </li>

            </ul>
            <!-- links -->

        </div>


    </div>

    <!-- /row -->

    <%
    include('includes/footer.jag');
    %>

</div>
<!-- /container -->

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script src="js/google-code-prettify/prettify.js"></script>
<script>$(function () {
    prettyPrint();
})

$(document).ready(function () {
    $('#home').toggleClass('active')
})
</script>
<script src="<%=context%>/js/bootstrap-modal.js"></script>
<script src="<%=context%>/js/bootstrap-alerts.js"></script>
<script src="<%=context%>/js/bootstrap-twipsy.js"></script>
<script src="<%=context%>/js/bootstrap-popover.js"></script>
<script src="<%=context%>/js/bootstrap-dropdown.js"></script>
<script src="<%=context%>/js/bootstrap-scrollspy.js"></script>
<script src="<%=context%>/js/bootstrap-tabs.js"></script>
<script src="<%=context%>/js/bootstrap-buttons.js"></script>

</body>
</html>
