var basePath = basePath || '../';

$(document).ready(function(){

	$('a.external').click(function(){return !window.open($(this).attr("href"))});

	$('.product .photo a, .product .more-photos a, .gallery a').prettyPhoto({show_title: false, overlay_gallery: false, theme: 'dark_square'});

	$('#cart-order').bind('click',function(){
		$('#order-form').slideDown('slow');
		$(this).hide('fast');
		return false;
	});


	$('table.cart-content tbody tr:nth-child(even), table.order-form tbody tr:nth-child(even)').addClass('even');

	$('.fb-like-box').attr({'data-href':'http://www.facebook.com/lovemusiccz','data-width': '294', 'data-show-faces': 'true', 'data-stream': 'false', 'data-header': 'true'});

	$('.fb-like').each(function (){
		$(this).html('<iframe src="http://www.facebook.com/plugins/like.php?href='+$(this).html()+'&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=33" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:33px; margin-top: 5px; margin-left: 10px; " allowTransparency="true"></iframe>');
	});

	if ($.browser.msie && $.browser.version.substr(0,1)<7) {
		// search for selectors you want to add hover behavior to
		$('#pagesmenu li').hover(
			function() {
				$(this).addClass('hover');
			},
			function() {
				$(this).removeClass('hover');
			}
		);
	};

});


function googleTranslateElementInit() {
	new google.translate.TranslateElement({
		pageLanguage: 'cs',
		includedLanguages: 'en,zh-TW,de',
		autoDisplay: false,
		multilanguagePage: true,
		layout: google.translate.TranslateElement.InlineLayout.SIMPLE
	}, 'google_translate_element');
};

