jQuery.noConflict();

jQuery(document).ready(function($){

    //png fix
    $(document).pngFix();
			
    //form text swap
    swapValues = [];
    $(".swap_value").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });
    
	//IE7 z-index bugfix
    if ( $.browser.msie && $.browser.version < 8 ) {
        var zIndexNumber = 1000;
        $('div').each(function() {
            $(this).css('z-index', zIndexNumber);
            zIndexNumber -= 10;
        });
    } 
	    
    //changepassword
    $("#changepassword").click(function(){

        if( $('#changepassword').attr('checked') ){
            $("#s_password, #s_passwordagain").css('display','');
        }else{
            $("#s_password, #s_passwordagain").css('display','none');
        }
	    	
    });
	  	
    $("#jump_to_the_top, .fel").click(function(){
        scrollTo(0,0);
        return false;
    });


    //dropdown menu
    $("#menu li a").hover(function(){
        $(this).parent().find("ul.subnav").slideDown(250);
        $(this).parent().hover(function() {
            $(this).addClass("menu_item_hover");
        }, function() {
            // On hovering out slide subnav menus back up
            $(this).parent().find("ul.subnav").slideUp(250);
            $(this).removeClass("menu_item_hover");

        })
    });


    //news slider
    $("#slider").easySlider({

        controlsShow:   false,
        controlsBefore: '',
        controlsAfter:  '',
        controlsFade:   true,
        insertAfter:    true,
        firstShow:      false,
        lastShow:       false,
        vertical:       true,
        speed:          1200,
        ease:           'swing',
        auto:           true,
        pause:          4000,
        continuous:     true,
        prevNext:       false,
        numeric:        false,
        numericId:      'controls'
    }); 

   

    //lightbox
    $(".lightbox").lightbox({
        fileLoadingImage : '/images/loading.gif',
        fileBottomNavCloseImage : '/images/closelabel.gif',
        strings : {
            prevLinkTitle: '',
            nextLinkTitle: '',
            prevLinkText:  '',
            nextLinkText:  '',
            closeTitle: '',
            image: '',
            of: ' / '
        }

    });
    
    /*
    $("#product_box_pictures").hover(function(){
        $(this).css({"border": "1px solid black"})
    }, function(){
        $(this).css({"border": "0px solid"})
    })
    */

     //slider hax
    $("#slider").css({
        //"height": "170px"
        "height": "260px"
    })

 /*
$(document).ready(function () {
    $('#container').fadeOut(2000);
});
*/
});

