/* 
 * @author ljuvligt.com - Andreas Psaros
 */


jQuery(document).ready(function(){


$('div.banner').parallax({
      'elements': [

        // Regular
        /*
        {
          'selector': 'div.banner',
          'properties': {
            'x': {
              'background-position-x': {
                'initial': 0,
                'multiplier': 0.03,
                'invert': true
              }
            }
          }
        },
        */
        // Banner fixed
        {
          'selector': 'div.layerDefault',
          'properties': {
            'x': {
              'background-position-x': {
                'initial': 0,
                'multiplier': 0.03,
                'invert': true
              }
            }
          }
        },

        {
          'selector': 'div.layer1',
          'properties': {
            'x': {
              'background-position-x': {
                'initial': 0,
                'multiplier': 0.01,
                'invert': true
              }
            }
          }
        },
        {
          'selector': 'div.layer2',
          'properties': {
            'x': {
              'background-position-x': {
                'initial': 0,
                'multiplier': 0.03,
                'invert': true
              }
            }
          }
        },
        {
          'selector': 'div.layer3',
          'properties': {
            'x': {
              'background-position-x': {
                'initial': 0,
                'multiplier': 0.06,
                'invert': true
              }
            }
          }
        }
    ]
});





/*
$('div.parallax').parallax({
  'elements': [
    {
      'selector': 'div.banner',
      'properties': {
        'x': {
          'background-position-x': {
            'initial': 0,
            'multiplier': 0.1,
            'invert': true
          }
        }
      }
    },
    {
      'selector': 'div.outer',
      'properties': {
        'x': {
          'background-position-x': {
            'initial': 50,
            'multiplier': 0.02,
            'unit': '%'
          }
        }
      }
    },
    {
      'selector': 'div.inner',
      'properties': {
        'x': {
          'background-position-x': {
            'initial': 0,
            'multiplier': 0.3
          }
        }
      }
    }
  ]
});
*/




// mouseover for tabs in gridview
$(".gridview li").hover(
    function(){
        $('span', this).animate({ backgroundColor: "#00B0EB" }, 'slow');
    },
    function(){
        $('span', this).animate({ backgroundColor: "#666" }, 'slow');
    }
);

/*
activeSubPage = 1;

// Toogle subpage
			$(".submenu").click(function() {
				var id = $(this).attr('id'); // get id

				if(activeSubPage!=id && !$(".subpage").is(':animated')){
				
				activeSubPage = id;
				$(".subpage").fadeOut(300, function (){ //fade out all
					$("#subpage"+id).delay(400).fadeIn(300); // fade in clicked page
				});
				
				// add active class to link
				$(this).addClass('active');
				
				}
				
			});
*/
});
