$(document).ready(function() {  /* when the document is ready... */


    ///////////////////////////////////////////////////////////////
    // carousel
    jQuery('#mycarousel').jcarousel({
        wrap: 'circular',
        visible: 6,
        scroll: 6
    });


    $('#headslide').anythingSlider({

        buildStartStop      : false,
        buildNavigation     : false,
        autoPlay            : true,
        delay               : 6000,
        resumeDelay         : 15000
    });


    ///////////////////////////////////////////////////////////////
    // hints for innerpage.css
    //$('.infm:last').addClass('no-margin');
    //$('.places li:first').addClass('none-border');


    ///////////////////////////////////////////////////////////////
    // lang bar
    $("a#chlang").click(function(){
        $("#lngbar").toggle();
        return false
    });

    $("a.sortlnk").click(function(){
        $(this).parent().children('ul.sortlist').toggle();
        return false
    });


    // about azerbaijan
    function mycarousel_initCallback(carousel) {

        jQuery('#mycarousel-next').bind('click', function() {
            carousel.next();
            return false;
        });

        jQuery('#mycarousel-next-big').bind('click', function() {
            carousel.next();
            return false;
        });

        jQuery('#mycarousel-prev').bind('click', function() {
            carousel.prev();
            return false;
        });
    };


    jQuery("#azerbaijan").jcarousel({
        scroll: 1,
        initCallback: mycarousel_initCallback,
        wrap: 'circular',
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });

    jQuery("#azerbaijan-1").jcarousel({
        scroll: 1,
        initCallback: mycarousel_initCallback,
        wrap: 'circular',
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });




	///////////////////////////////////////////////////////////////
    // csspie
	$(function() {
	    if (window.PIE) {
	        $('div.headkant, #site, #site div.naviarea, div.searchbox, menu.menu ul.menulist li.main a, div.megamenu, #site div.wbox, #site div.rbox, div.tumblarzone, div.inhead div.langbar, div.contactform input.txt, div.contactform textarea.burayaz, div.contactform input.eurobtn, ul.proporties div.sorting, .theme-lab .nivo-controlNav, .behavior ').each(function() {
	            PIE.attach(this);
	        });
	    }
	});
	///////////////////////////////////////////////////////////////






    /* jQuery did his function */ });






















