$(document).ready(function() {
 
    /*$(window).load(function() {
        $('#slider').nivoSlider();
    });
   */
    
    $(window).load(function() {
$('#slider').nivoSlider({
effect: 'random',
slices: 15,
boxCols: 8,
boxRows: 4,
animSpeed: 500,
pauseTime: 6000,
startSlide: 0,
directionNav: true,
controlNav: true,
controlNavThumbs: false,
pauseOnHover: false,
manualAdvance: false,
prevText: 'Prev',
nextText: 'Next',
randomStart: false,
beforeChange: function(){},
afterChange: function(){},
slideshowEnd: function(){},
lastSlide: function(){},
afterLoad: function(){}
});
});
    
    
 
    

    /*  scroll-top*/

    //jQuery for page scrolling feature - requires jQuery Easing plugin
    $(function() {
        $(document).on('click', 'a.page-scroll', function(event) {
            var $anchor = $(this);
            $('html, body').stop().animate({
                scrollTop: $($anchor.attr('href')).offset().top - 80
            }, 1600, 'easeInOutExpo');
            event.preventDefault();
        });
    });


    /* multi-slider*/

    $('#itemslider').carousel({
        interval: 2000
    });

    $('.carousel-showmanymoveone .item').each(function() {
        var itemToClone = $(this);

        for (var i = 1; i < 6; i++) {
            itemToClone = itemToClone.next();

            if (!itemToClone.length) {
                itemToClone = $(this).siblings(':first');
            }

            itemToClone.children(':first-child').clone()
                .addClass("cloneditem-" + (i))
                .appendTo($(this));
        }
    });


    $(window).scroll(function() {
        if ($(".navbar").offset().top > 50) {
            $(".navbar-fixed-top").addClass("top-nav-collapse");
        } else {
            $(".navbar-fixed-top").removeClass("top-nav-collapse");
        }
    });



    /* search-box*/

    $(".search-input-group").click(function() {
        $(".srch-lists").toggle();
    });



    /*    slim-scroll*/

    $('.scroll').slimScroll({
        start: 'bottom'
    });

    $("#scheduler").kendoScheduler({
        date: new Date("2013/6/13"),
        startTime: new Date("2013/6/13 07:00 AM"),
        height: 300,
        views: [{
                type: "week",
                selectedDateFormat: "{0:dd-MMM-yyyy} - {1:dd-MMM-yyyy}"
            },
            {
                type: "month",
                selected: true
            }
        ],
        timezone: "Etc/UTC",
        dataSource: {
            batch: true,
            transport: {
                read: {
                    url: "https://demos.telerik.com/kendo-ui/service/tasks",
                    dataType: "jsonp"
                },
                update: {
                    url: "https://demos.telerik.com/kendo-ui/service/tasks/update",
                    dataType: "jsonp"
                },
                create: {
                    url: "https://demos.telerik.com/kendo-ui/service/tasks/create",
                    dataType: "jsonp"
                },
                destroy: {
                    url: "https://demos.telerik.com/kendo-ui/service/tasks/destroy",
                    dataType: "jsonp"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {
                            models: kendo.stringify(options.models)
                        };
                    }
                }
            },
            schema: {
                model: {
                    id: "taskId",
                    fields: {
                        taskId: {
                            from: "TaskID",
                            type: "number"
                        },
                        title: {
                            from: "Title",
                            defaultValue: "No title",
                            validation: {
                                required: true
                            }
                        },
                        start: {
                            type: "date",
                            from: "Start"
                        },
                        end: {
                            type: "date",
                            from: "End"
                        },
                        startTimezone: {
                            from: "StartTimezone"
                        },
                        endTimezone: {
                            from: "EndTimezone"
                        },
                        description: {
                            from: "Description"
                        },
                        recurrenceId: {
                            from: "RecurrenceID"
                        },
                        recurrenceRule: {
                            from: "RecurrenceRule"
                        },
                        recurrenceException: {
                            from: "RecurrenceException"
                        },
                        ownerId: {
                            from: "OwnerID",
                            defaultValue: 1
                        },
                        isAllDay: {
                            type: "boolean",
                            from: "IsAllDay"
                        }
                    }
                }
            },
            filter: {
                logic: "or",
                filters: [{
                        field: "ownerId",
                        operator: "eq",
                        value: 1
                    },
                    {
                        field: "ownerId",
                        operator: "eq",
                        value: 2
                    }
                ]
            }
        }
    });




});
