public void Init(Core.Media media)
        {
            website = media as WordsLive.Core.WebSite;

            if (website == null)
            {
                throw new ArgumentException("media must not be null and of type WebSite");
            }

            this.urlTextBox.Text = website.Url;

            presentation = Controller.PresentationManager.CreatePresentation <AwesomiumPresentation>();
            presentation.Load(true);
            presentation.Control.Web.DocumentReady += (sender, args) =>
            {
                if (isBible)
                {
                    var result = presentation.Control.Web.ExecuteJavascriptWithResult("(document.getElementById('searchSelect') != null) ? document.getElementById('searchSelect').children[1].children[0].attributes['value'].value : 'NULL'");
                    if (result.ToString() != "NULL")
                    {
                        bibleTextBox.Text = result.ToString();
                    }

                    // TODO: maybe use the following when it's supported:
                    // document.getElementById('pageMain').style.webkitHyphens = 'auto';
                    // document.getElementById('pageMain').style.textAlign = 'justify';

                    // adjust style and scroll selection into view (this is not done automatically by mobile version)
                    presentation.Control.Web.ExecuteJavascript(@"
					document.getElementById('pageMain').style.fontSize = '15pt';
					document.getElementById('pageMain').style.marginLeft = '3%';
					document.getElementById('pageMain').style.marginRight = '3%';
					
					var marked = document.getElementsByClassName('bgcolor_overlay');
					if (marked.length > 0)
					{
						if (marked[0].previousSibling != null && marked[0].previousSibling.tagName == 'H3')
							marked[0].previousSibling.scrollIntoView(true);
						else
							marked[0].scrollIntoView(true);
					}"                    );

                    /*presentation.Control.Web.ExecuteJavascript(@"
                     *              document.getElementsByClassName('top')[0].style.display = 'none';
                     *              document.getElementsByClassName('navi')[0].style.display = 'none';
                     *              document.getElementsByClassName('navi')[1].style.display = 'none';");*/
                }
            };

            presentation.Control.Web.LoadingFrame += (s, args) =>
            {
                // TODO
                this.urlTextBox.Text = args.Url.ToString();
            };
        }
        public void Init(Core.Media media)
        {
            website = media as WordsLive.Core.WebSite;

            if (website == null)
                throw new ArgumentException("media must not be null and of type WebSite");

            this.urlTextBox.Text = website.Url;

            presentation = Controller.PresentationManager.CreatePresentation<AwesomiumPresentation>();
            presentation.Load(true);
            presentation.Control.Web.DocumentReady += (sender, args) =>
            {
                if (isBible)
                {
                    var result = presentation.Control.Web.ExecuteJavascriptWithResult("(document.getElementById('searchSelect') != null) ? document.getElementById('searchSelect').children[1].children[0].attributes['value'].value : 'NULL'");
                    if (result.ToString() != "NULL")
                        bibleTextBox.Text = result.ToString();

                    // TODO: maybe use the following when it's supported:
                    // document.getElementById('pageMain').style.webkitHyphens = 'auto';
                    // document.getElementById('pageMain').style.textAlign = 'justify';

                    // adjust style and scroll selection into view (this is not done automatically by mobile version)
                    presentation.Control.Web.ExecuteJavascript(@"
                    document.getElementById('pageMain').style.fontSize = '15pt';
                    document.getElementById('pageMain').style.marginLeft = '3%';
                    document.getElementById('pageMain').style.marginRight = '3%';

                    var marked = document.getElementsByClassName('bgcolor_overlay');
                    if (marked.length > 0)
                    {
                        if (marked[0].previousSibling != null && marked[0].previousSibling.tagName == 'H3')
                            marked[0].previousSibling.scrollIntoView(true);
                        else
                            marked[0].scrollIntoView(true);
                    }");

                    /*presentation.Control.Web.ExecuteJavascript(@"
                            document.getElementsByClassName('top')[0].style.display = 'none';
                            document.getElementsByClassName('navi')[0].style.display = 'none';
                            document.getElementsByClassName('navi')[1].style.display = 'none';");*/

                }
            };

            presentation.Control.Web.LoadingFrame += (s, args) =>
            {
                // TODO
                this.urlTextBox.Text = args.Url.ToString();
            };
        }