﻿$(document).ready(function () {
    window.fbAsyncInit = function () {
        FB.init({
            appId: '135948416418105', // App ID
            channelURL: '//www.chicobag.com/channel.htm', // Channel File
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            oauth: true, // enable OAuth 2.0
            xfbml: true  // parse XFBML
        });

        // Additional initialization code here
    };

    // Load the SDK Asynchronously
    (function (d) {
        var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; }
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        d.getElementsByTagName('head')[0].appendChild(js);
    } (document));

    $("ul.mainnav li").hover(function () {
        $(this).find("a:first").css({ "color": "#bdbdbd" });
        $(this).find(".sub").each(function () {
            $(this).stop().fadeTo('slow', .9).show();
            $(this).corner("round bottom 10px");
        });
    }, function () {
        $(this).find("a:first").css({ "color": "#fff" });
        $(this).find(".sub").each(function () {
            $(this).stop().fadeTo('slow', .9).hide();
            $(this).corner("round bottom 10px");
        });

    }
    );
    $(".mainlogo").click(function () { window.location = "/"; });
    //$(".addtocart").corner();
    //$(".rounded").corner();
    //$(".sidebaritems").corner("round bottom 10px");
    //$(".sidebar h3").corner("round top 10px");
    //    $(".rounded-bottom").corner("round bottom 10px");
    //    $(".rounded-right").corner("round tr br 10px");

//    $("#freeshippingdialog").dialog({ modal: true, autoOpen: false,title:'Free Shipping' });
//    $("#freeshippinglink").click(function () { $("#freeshippingdialog").dialog('open') });
});
