﻿$(document).ready(function() {
    
   


    $(".modalMovie").click(
        function(event){
            event.preventDefault();
                $("body").append("<div id='videoframe'><iframe height='290' width='500' scrolling='none' id='externalSite' class='' frameborder='0' src='Assets/demovideo.htm'/></div>");
                $('#videoframe').dialog({
                    title: 'AppointMate Demo',
                    autoOpen: true,
                    width:538,
                    height: 338,
                    modal: true,
                    resizable: false,
		            autoResize: true,
		            scrolling: false,
                    overlay: {
                        opacity: 0.5,
                        background: "black"
                    },
                    close: function(event, ui){$('#videoframe').dialog('destroy'); $('#videoframe').remove();}
                })
		});

                            
                            
                            
    //NAV:
    $("li.mainNavItem").hover(
                        function(){
                            $(this).children("ul.subNav").fadeIn(200);
                        },
                        function(){
                            $(this).children("ul.subNav").fadeOut(200);     
                        }
                   );
    // END NAV
                
    
    //SIDE BAR SELCTOR:
    $(".sideSelectItem").hover(
        function(){
           // alert($(this).children(".side_info").html());
           //alert($(this).children("img").attr("src").replace("_down","_over"));
            $(this).children("img").attr("src", $(this).children("img").attr("src").replace("_down","_over"));
            $("#sidebar .sidebar_text").html($(this).children(".side_info").html());//+"<br/><a href='"+$(this).attr("href")+"'>Read More</a>"
        },
        function(){
            $(this).children("img").attr("src",$(this).children("img").attr("src").replace("_over","_down"));
        }
    );
    //END SIDE BAR SELECTOR
	$('#fade').list_ticker({
			speed:5000,
			effect:'fade'
		});
		
});//end Document ready;

