﻿jQuery(document).ready(function () {


    //SLIDER
    jQuery(".peKenBurns").peKenburnsSlider();


    //LANDING BANNER
    jQuery('#yourSliderId').DDSlider({

        nextSlide: '.slider_arrow_right',
        prevSlide: '.slider_arrow_left',
        selector: '.slider_selector',
        trans: 'fading',
        delay: 50,
        ease: 'swing',
        waitTime: 6000,
        duration: 3500
    });

    //SLIDEUP SOLUTION BLOCK
    jQuery('.show_cover').click(function () {
        var id = $(this).attr("rel");
        jQuery("#" + id).animate({ top: '0px' }, { queue: false, duration: 1000, easing: "easeOutBounce" }).end().addClass("hover");
    });

    jQuery('.hide_cover, .BlockTitleCover').click(function () {
        jQuery(this).parent().stop().animate({ top: '208px' }, { queue: false, duration: 800, easing: "easeInCirc" }).end().removeClass("hover");
    });

    //SlIDEUP SOLUTION TITLE
    jQuery('.show_cover_solutions').click(function () {
        var id = $(this).attr("rel");
        jQuery("#" + id).animate({ top: '0px' }, { queue: false, duration: 1000, easing: "easeOutBounce" }).end().addClass("hover");
    });

    //NEWSLETTER BOX
    jQuery(".newsletter").fancybox({
        'width': '75%',
        'height': '75%',
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'

    });


    //DROPDOWN MENU
    jQuery("ul.sf-menu").superfish();

    //NEWSTICKER
    jQuery("#news").newsTicker();

    //TOOLTIP FADE
    jQuery('.tipfade').tipsy({ fade: true });

    //DROPDOWN TEST MENU
    jQuery("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)

    jQuery("ul.topnav li span").hover(function () { //When trigger is clicked...

        //Following events are applied to the subnav itself (moving subnav up and down)
        jQuery(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click

        jQuery(this).parent().hover(function () {
        }, function () {
            jQuery(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
        });

        //Following events are applied to the trigger (Hover events for the trigger)
    }).hover(function () {
        jQuery(this).addClass("subhover"); //On hover over, add class "subhover"
    }, function () {	//On Hover Out
        jQuery(this).removeClass("subhover"); //On hover out, remove class "subhover"
    });

});
