%PDF- %PDF-
Direktori : /home/nailstv/public_html/js/ |
Current File : /home/nailstv/public_html/js/functions.js |
var html5Support = !!document.createElement('canvas').getContext; $(document).ready(function() { blankTarget(); $("a.fancybox").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true, 'hideOnContentClick': false, 'titlePosition' : 'over', 'autoDimensions' : true, 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + '</span>'; } }); $("a.fancybox_notitle").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true, 'hideOnContentClick': false, 'titleShow': false, 'autoDimensions' : true }); $("a.iframe").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true, 'overlayOpacity': 0.7, 'overlayColor': '#a4a4a4', 'hideOnContentClick': false, 'width': 500, 'height': 325+19 }); $("a.popup_fancybox").fancybox({ 'transitionIn' : 'none', 'transitionOut' : 'none', 'titleShow' : false, 'autoDimensions' : true, 'onComplete' : function() { $.fancybox.resize(); }, 'scrolling' : 'no' }); $("a.popup_fancybox").fancybox({ 'transitionIn' : 'none', 'transitionOut' : 'none', 'titleShow' : false, 'autoDimensions' : true, 'onComplete' : function() { $.fancybox.resize(); }, 'scrolling' : 'no' }); }); function blankTarget() { if(!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for(var i=0; i<anchors.length; i++) { var anchor = anchors[i]; anchor.tabindex = i; if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") { anchor.target = "_blank"; } } } function ajax(url, data, async, type, target, readyfunction) { if(typeof async == 'undefined') { async = true; } if(typeof type == 'undefined') { type = 'html'; } $.ajax({ type: "POST", url: url, data: data, dataType: type, async: async, complete: function(xhr) { if(typeof target == 'undefined' && xhr.responseText != '') { //alert(xhr.responseText); } else if(typeof target != 'undefined') { $( target ).html( xhr.responseText ); if(typeof readyfunction != 'undefined') { eval(readyfunction); } } } }); } function setFontSize(size, item) { $('.font_size1').removeClass('actual'); $('.font_size2').removeClass('actual'); $('.font_size3').removeClass('actual'); $(item).addClass('actual'); $('p.lead').css('font-size', size+'px'); $('div.ck').css('font-size', size+'px'); } function addBookmark(title, url) { if(window.sidebar) { window.sidebar.addPanel(title, url, ""); } else if(document.all) { window.external.AddFavorite(url, title); } else if(window.opera && window.print) { return true; } } function changeThumb(index, i, path) { if (changing_thumbs[index]) { var src = path + i + '.jpg'; if (path.indexOf("{index}") != -1) { src = path.replace("{index}", i); } currentThumbnailFlip.attr('src', src); var maxcnt = 10; if($j('#' + index).attr('maxnum')) { maxcnt = parseInt($j('#' + index).attr('maxnum')); } if (++i > maxcnt) i=1; changing_thumbs[index] = setTimeout("changeThumb('" + index + "'," + i + ",'" + path + "')", 600); } } function endThumbChange(index) { clearTimeout(changing_thumbs[index]); currentThumbnailFlip.attr('src', first_thumbs[index]); changing_thumbs[index] = false; } function startThumbChange(index, path) { changing_thumbs[index] = true; changeThumb(index, 2, path); }