﻿$(function(){

	/**
	 * jQuery colorbox default settings
	 */
	$.fn.colorbox.settings.opacity = '0.75';
	$.fn.colorbox.settings.previous = 'poprzednie';
	$.fn.colorbox.settings.next = 'następne';
	$.fn.colorbox.settings.close = 'zamknij';
	$.fn.colorbox.settings.current = '{current}/{total}';
	
	$('.content .gallery li a').colorbox({rel: 'article'});
	$('.portfolio ul li a').colorbox({rel: 'portfolio'});
	
	/**
	 * INPUT:FOCUS HACK FOR IE
	 */
	$('input:text, textarea')
		.focus(function(){
			$(this).addClass('focus');
		})
		.blur(function(){
			$(this).removeClass('focus');
		});
		
	/**
	 * Popup layer
	
	if (($.cookie('popup') != 1) && ($('#popup-content').html().length > 10) && ($('.sOverlibDiv').size() < 1)) {
		$.cookie('popup', 1, {path: '/', expires: 1});
		$('#popup-content')
			.show()
			.before('<div id="overlay"></div>')
			.prepend('<a href="#close" class="close">x</a>')
			.find('.close')
			.click(function(){
				$('#popup-content').hide();
				$('#overlay').hide();
				return false;
			});
		$('#overlay')
			.css({height: $(document).height() + 'px', opacity: '0.6', zIndex: '950'})
			.click(function(){
				$('#popup-content').hide();
				$('#overlay').hide();
			});
	}*/
	
});