/* 
 *  Default Javascript for Kutter-Handel.
 *  Make sure JQuery has been loaded before.
 */

$(document).ready(function(){
/* Enable CSS-Drodown menue in IE6 */
$('#topnavigation li').hover(
    function() { $('ul', this).css('display', 'block'); },
    function() { $('ul', this).css('display', 'none');
});

$("#topSlider").easySlider({
        loop: true,
        autoplayDuration: 10000,
        restartDuration: 2500,
        pauseable: false
});

 /* Default image Zoom */
 $("a.fancy").fancybox({
    'titleShow'		: false,
    'transitionIn'	: 'elastic',
    'transitionOut'	: 'elastic',
    'speedIn'		:	400,
    'speedOut'		:	300,
    'overlayOpacity'    : 0
});

var defaultSearchValue = "Shop Suche";

$.fn.clearSearchField = function() {
    if($(this).val() == defaultSearchValue){
        $(this).removeClass('italic');
        $(this).val('');
    }
    return $(this);
}

$.fn.resetSearchField = function() {
     if($(this).val() == ''){
         $(this).addClass('italic');
         $(this).val(defaultSearchValue);
     }
     return $(this);
}

$('.sTopSearch').resetSearchField();
$('.sTopSearch').select();

$('.sTopSearch').focus(function(){
 $('.sTopSearch').clearSearchField();
});

$('.sTopSearch').blur(function(){
     $('.sTopSearch').resetSearchField();
});

});
