﻿$(document).ready(function() {
//hover efect main site nuv
    $('.site_nuv li a').hover(
  function() {
      var currentId = $(this).parent().attr("id");
      if (currentId != "in" + liop && currentId != "share_link") {
          $(this).css({ "background": "url('images/menu_link_hover.jpg') no-repeat center top" });
      }
      //mouseover
  },
    function() {
        $(this).css('background-image', 'none'); // mouseout
    }
    );
    //end hover efect main site nuv

    //corrent page site nuv

    $("#in" + liop).removeClass("none");
        $("#in" + liop).addClass("corrent");
        $("#in" + (liop - 1)).css("background-image", "none");
        //end corrent page site nuv


        //corrent pager

        

        $(".pager ul li span").click(function() {
        $('.pager ul li').children().removeAttr("class");
            $(this).attr("class", "on");
            $(".pager ul li span").last().addClass('last');


        })
        //end corrent pager

        //corrent nuv catalog page
        
        $(".side_nuv li").click(function() {
        $('.side_nuv').children().removeAttr("class");
            $(this).attr("class", "corrent");
            $(".side_nuv li").last().css("background-image", "none");;


        })

        //end corrent nuv catalog page
        

    $('#mail_txt_box').focus(function() {
        this.value = $(this).attr('title');
        if (this.value == $(this).attr('title')) {
            this.value = '';
        }

    });

    $('#mail_txt_box').blur(function() {
        if (this.value == '') {
            this.value = $(this).attr('title');
        }
    });


});

//facebook share script
function fbs_click() {
    u = location.href;
    if (u.indexOf("aspx") == -1) {
        if (u.indexOf("?") == -1) {
            u += ".aspx";
        }
        else {
            var newurl = u.split("?");
            u = newurl[0] + ".aspx?" + newurl[1];
        }

    }
    t = document.title;
    window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
    return false;
}
//end facebook share script



