jQuery.noConflict();
(function($){
    $(function(){
    
    
        /*===========================
         *
         * Date Created: 03/09/2011
         * Last Update: 03/09/2011
         * Source: -
         * Description: -
         *
         *===========================*/
		
		$('.search-result:last-child').addClass('last');
		$('.searchmodeextended td:first-child').addClass('first-child');
		$('.searchmodeextended td:last-child').addClass('last-child');
		
        // CLEAR INPUT FIELD
        $('.setclear').each(function(){
            var default_value = this.value;
            $(this).focus(function(){
                if (this.value == default_value) {
                    this.value = '';
                }
            });
            
            $(this).blur(function(){
                if (this.value == '') {
                    this.value = default_value;
                }
            });
        });
		
		/*
		bgImageTotal = 3; 
        randomNumber = Math.round( Math.random() * ( bgImageTotal + 1 ) ); 
		console.log(randomNumber);    
        imgPathHeader = 'fileadmin/templates/images/random/header/' + randomNumber + '.jpg';
        imgPathFooter = 'fileadmin/templates/images/random/footer/' + randomNumber + '.png';
        $( '.keyvisual' ).css( 'background-image', ( 'url( "' + imgPathHeader + '" )' ) );
        $( '.keyvisualfooter' ).css( 'background-image', ( 'url( "' + imgPathFooter + '" )' ) );
        */
		
		/*===========================
		*
		* Pluginname: Fancybox - Fancy lightbox alternative
		* Date Created: 25/02/2011
		* Last Update: 25/02/2011
		* Source: http://fancybox.net/
		* Description: lightbox
		*
		*===========================*/
		
		if ($('a[rel="fancybox"]').length) {
		  	$('a[rel="fancybox"]').fancybox({
		  		overlayOpacity: '0.7',
		  		overlayColor: '#000'
		  	});
	  	}
		
    })
})(jQuery)

