$(function(){
    $("#main_menu a,#sub_menu a").blend();
});



jQuery(document).ready(function($) {
	var postfix = '_on';
	$('.page_top_wide a img,.page_top_750 a img').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_on = src.substr(0, src.lastIndexOf('.'))
		           + postfix
		           + src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_on);
		img.hover(
			function() {
				img.attr('src', src_on);
			},
			function() {
				img.attr('src', src);
			}
		);
	});
});

$(document).ready(function(){
        $(".yoxview").yoxview();
    });

/*document.write('<script type="text/javascript" src="common/js/ui.core.js"></script>');*/

//$(function() {
//
//    var $sidebar   = $("#shop_side"),
//        $window    = $(window),
//        offset     = $sidebar.offset(),
//        topPadding = 15;
//
//    $window.scroll(function() {
//        if ($window.scrollTop() > offset.top) {
//            $sidebar.stop().animate({
//                marginTop: $window.scrollTop() - offset.top + topPadding
//            });
//        } else {
//            $sidebar.stop().animate({
//                marginTop: 0
//            });
//        }
//    });
//
//});


$(function () {
    if (! $.browser.safari) {
        $('.page_top_750 a').click(function () {
            $(this).blur();

            $('html,body').animate({ scrollTop: 0 }, 'slow');

            return false;
        });
    }
});
