﻿jQuery(document).ready(function () {

    // Banner rotator
    jQuery('#banners').innerfade({ speed: 'slow', timeout: 4000, type: 'random', containerheight: '220px' });

    // Side banner rotator
    jQuery('#banners_side').innerfade({ speed: 'slow', timeout: 5000, type: 'random', containerheight: '220px' });

    // Product slider mycarousel
    jQuery('#mycarousel').jcarousel();

    // Tabs support
    jQuery("#tabs").tabs();

    // Fancybox
    jQuery("#advice").fancybox({
        'height': 500,
        'width': 660,
        'autoDimensions': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });

    jQuery("#prodajna_mesta").fancybox({
        'height': 500,
        'width': 660,
        'autoDimensions': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });
    
    jQuery("#survey123").fancybox({
        'height': 640,
        'width': 655,
        'autoDimensions': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });

    jQuery("a.grouped_elements").fancybox({
        'titleShow': false,
        'transitionIn': 'none',
        'transitionOut': 'none'
    });

    // TextBox watermark
    jQuery(function ($j) {
        //        $j("#Name").Watermark("  ime priimek");
        //        $j("#Address").Watermark("  ulica in hišna številka");
        //        $j("#PostNumber").Watermark("  poštna št.");
        //        $j("#City").Watermark("  kraj");
        //        $j("#Country").Watermark("  država");
    });

    jQuery("div.panel_button").click(function () {
        jQuery("div#panel").animate({
            height: "100px"
        })
		.animate({
		    height: "100px"
		}, "fast");
        jQuery("div.panel_button").toggle();

    });

    jQuery("div#hide_button").click(function () {
        jQuery("div#panel").animate({
            height: "0px"
        }, "fast");


    });

});
