(function ($) {
// VERTICALLY ALIGN FUNCTION
$.fn.vAlign = function() {
	return this.each(function(i){
	var ah = $(this).height();
	var ph = $(window).height();
	var mh = Math.ceil((ph-ah) / 2);
	$(this).css('top', mh);
	});
};
})(jQuery);


(function ($) {
// HORIZONTALLY ALIGN FUNCTION
$.fn.hAlign = function() {
	return this.each(function(i){
	var aw = $(this).width();
	var pw = $(this).parent().width();
	var mw = Math.ceil((pw-aw) / 2);
	$(this).css('left', mw);
	});
};

})(jQuery);



(function ($) {
// set width 
$.fn.setWidth = function() {
	return this.each(function(i){
	var ard = $(this).width();
	$(this).css('width', ard +'px');
	});
};

})(jQuery);


//GET MOUSE POSITION
(function ($) {
$.fn.mPos = function() {
	return this.each(function(i){
	var px = pageX+10;
	var py = pageY+10;
	$(this).css('top', px);
	$(this).css('left', py);
	$(this).css('display', 'block');
	});
};
})(jQuery);


(function ($) {
// SCALE GALLERY ITEMS FUNCTION
$.fn.galleryS = function() {
	return this.each(function(i){
	var aw2 = $(window).height();
	var mw2 = ((aw2-73) / 4) ;
	$(this).height(mw2);
	});
};

})(jQuery);


(function ($) {
// SCALE GALLERY LARGE FUNCTION
$.fn.galleryL = function() {
	return this.each(function(i){
	var aw5 = $(window).height();
	document.write('<img src="dufflebag-big.jpg" height='+ aw5 + '/>');
	});
};

})(jQuery);

(function ($) {
// SCALE SHOP BODY
$.fn.shopSize = function() {
	return this.each(function(i){
	var shop = $(window).height();
	$(this).height(shop);
	});
};

})(jQuery);

