	   function initFunc() {
	   	
		$("#vimeo-list").append('<ul id="divEventCal"></ul><div class="page_navigation"></div>')
	   	$("#divEventCal li").remove();
	   	
		$("body").append("<input type='hidden' id='current_page' /><input type='hidden' id='show_per_page' />")
		$("body").prepend('<div id="home_images"><a href="#" onclick="return false" target="_blank"><img src="images/big_logo_color.png" style="padding-left:270px;padding-bottom:30px;width:400px" /></a><br clear="all" /><div>' + 
				'<a href="http://domchieraphotography.blogspot.com/" target="_blank"><img class="home_left" src="images/home_left.jpg" /></a><br />' +
				'<p><a href="http://domchieraphotography.blogspot.com/" target="_blank">Photo of the Day</a></p></div>' +
				'<div><a href="#" onclick="return false" target="_blank"><img class="home_middle" src="images/home_middle.jpg" /></a><br />' +
				'<p><a href="#">Main Website</a></p></div>' + 
				'<div><a href="https://www.facebook.com/pages/Dom-Chiera-Photography/115677188498301?sk=app_4949752878" target="_blank"><img class="home_right" src="images/home_right.jpg" /></a><br />' + 
				'<p><a href="https://www.facebook.com/pages/Dom-Chiera-Photography/115677188498301?sk=app_4949752878" target="_blank">Facebook</a>: Look here for current photos.</p></div>' +
				'</div><div class="stop"></div>');
        
                var window_width = $(window).width();
                var home_box_width = 920;
                //alert($("#home_images").width())
                $("#home_images").css('width', '920px')
                var window_height = $(window).height();
                var home_box_height = $("#home_images").height();
                
                var home_divideMe = window_width - home_box_width;
                var home_divideMe_Height = window_height - home_box_height;
                
                $("#home_images").css('left', home_divideMe/2)
                $("#home_images").css('bottom', home_divideMe_Height/2)
                
                $("#home_images a, .stop").click(function(){
                        $("#home_images, .stop").fadeOut();
                });
                
                $.getJSON('http://vimeo.com/api/v2/channel/253739/videos.json?callback=?', function (data) {
        
               $("#content").html('');
                
        $.each(data, function (i, item) {
          $("#divEventCal").append('<li class="eppsEvent"><a href="#http://player.vimeo.com/video/' + item.id + '?title=0&amp;byline=0&amp;portrait=0"><img width="140" src="' + item.thumbnail_medium + '" /><\/a><br /><span class="vimeo_title">' + item.title + '<\/span><\/li>');
        });
                
                $("#divEventCal li a").click(function(){
                        var getVimeoLink = $(this).attr('href');
                        var getVimeoLinkArr = getVimeoLink.split("#");
                        $("#vimeo_iframe").attr("src",getVimeoLinkArr[1])
                        $("#vimeo_desc").empty();
                        $("#vimeo_desc").append($(this).next().next().html())
                });
                
            //how much items per page to show
            var show_per_page = 3;
            //getting the amount of elements inside content div
            var number_of_items = $('#divEventCal').children(".eppsEvent").size();
            //calculate the number of pages we are going to have
            var number_of_pages = Math.ceil(number_of_items / show_per_page);

            //set the value of our hidden input fields
            $('#current_page').val(0);
            $('#show_per_page').val(show_per_page);

            var navigation_html = '<a class="previous_link" href="javascript:previous();">Prev<\/a>';
            var current_link = 0;
            while (number_of_pages > current_link) {
                navigation_html += '<a class="page_link" href="javascript:go_to_page(' + current_link + ')" longdesc="' + current_link + '">' + (current_link + 1) + '<\/a>';
                current_link++;
            }
            navigation_html += '<a class="next_link" href="javascript:next();">Next<\/a>';

            $('.page_navigation').html(navigation_html);

            //add active_page class to the first page link
            $('.page_navigation .page_link:first').addClass('active_page');

            //hide all the elements inside content div
            $('#divEventCal').children(".eppsEvent").css('display', 'none');

            //and show the first n (show_per_page) elements
            $('#divEventCal').children(".eppsEvent").slice(0, show_per_page).css('display', 'block');

    })}
	 function previous() {

            new_page = parseInt($('#current_page').val()) - 1;
            //if there is an item before the current active link run the function
            if ($('.active_page').prev('.page_link').length == true) {
                go_to_page(new_page);
            }

        }

        function next() {
            new_page = parseInt($('#current_page').val()) + 1;
            //if there is an item after the current active link run the function
            if ($('.active_page').next('.page_link').length == true) {
                go_to_page(new_page);
            }

        }
        function go_to_page(page_num) {
            //get the number of items shown per page
            var show_per_page = parseInt($('#show_per_page').val());

            //get the element number where to start the slice from
            start_from = page_num * show_per_page;

            //get the element number where to end the slice
            end_on = start_from + show_per_page;

            //hide all children elements of content div, get specific items and show them
            $('#divEventCal').children(".eppsEvent").css('display', 'none').slice(start_from, end_on).css('display', 'block');

            /*get the page link that has longdesc attribute of the current page and add active_page class to it
            and remove that class from previously active page link*/
            $('.page_link[longdesc=' + page_num + ']').addClass('active_page').siblings('.active_page').removeClass('active_page');

            //update the current page input field
            $('#current_page').val(page_num);
        }
