/***
 * _shop.js
 *
 * @version		1.0
 * @license		MIT-style license
 * @author		Pitoo < contact (at) pitoo.com >
 * @infos		http://www.pitoo.com
 * @copyright	Author
 * 
 * general webshop javascript functions
 * needs MooTools v1.2
*/

	var ajax_loadDiv = function(div,url)
	{
		$(div).load(url);
		$(div).innerHTML = '<img src="/images/spinner.gif" />';
	}

	$(document).ready(function(){
	
/*		$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
*/			
		$("ul.topnav li a").mouseover(function() { //When trigger is clicked...
			
			//Following events are applied to the subnav itself (moving subnav up and down)
			$(this).parent().find("ul.subnav").stop(true, true).slideDown('fast').show(); //Drop down the subnav on click
	
			$(this).parent().hover(function() {
			}, function(){	
				$(this).parent().find("ul.subnav").slideUp(); //When the mouse hovers out of the subnav, move it back up
			});
		});
		
		$('.body-frame').jScrollPane({'showArrows':true, 'reinitialiseOnImageLoad':true});
		
		$("a[rel=lightbox]").fancybox();
	
	});

